mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
dynamically import all plugins
This commit is contained in:
+6
-1
@@ -23,6 +23,8 @@ if (document.childNodes[1]) {
|
||||
|
||||
import * as plugins from "@/plugins" // Import the plugins from folder
|
||||
|
||||
|
||||
|
||||
async function init() {
|
||||
const hasSEQTATitle = document.title.includes("SEQTA Learn")
|
||||
|
||||
@@ -42,7 +44,10 @@ async function init() {
|
||||
await initializeSettingsState()
|
||||
|
||||
if (settingsState.onoff) {
|
||||
plugins.Monofile() // Init plugins
|
||||
Object.values(plugins).forEach(plugin => {
|
||||
plugin();
|
||||
})
|
||||
|
||||
}
|
||||
console.info(
|
||||
"[BetterSEQTA+] Successfully initalised BetterSEQTA+, starting to load assets.",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export async function init() {
|
||||
console.log('Hello, world!')
|
||||
}
|
||||
@@ -1 +1,2 @@
|
||||
export { init as Monofile } from './monofile'
|
||||
export { init as Hello } from './hello'
|
||||
Reference in New Issue
Block a user