mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
fix: initial install not loading seqta
This commit is contained in:
+11
-10
@@ -2,8 +2,12 @@ import {
|
||||
settingsState,
|
||||
} from "@/seqta/utils/listeners/SettingsState"
|
||||
import documentLoadCSS from "@/css/documentload.scss?inline"
|
||||
|
||||
import icon48 from "@/resources/icons/icon-48.png?base64"
|
||||
import browser from "webextension-polyfill"
|
||||
|
||||
import * as plugins from "@/plugins"
|
||||
import { main } from "@/seqta/main"
|
||||
|
||||
|
||||
export let MenuOptionsOpen = false
|
||||
|
||||
@@ -19,9 +23,6 @@ if (document.childNodes[1]) {
|
||||
init()
|
||||
}
|
||||
|
||||
import * as plugins from "@/plugins"
|
||||
import { main } from "@/seqta/main"
|
||||
|
||||
async function init() {
|
||||
const hasSEQTATitle = document.title.includes("SEQTA Learn")
|
||||
|
||||
@@ -37,16 +38,16 @@ async function init() {
|
||||
icon.href = icon48 // Change the icon
|
||||
|
||||
try {
|
||||
if (typeof settingsState.onoff === "undefined") {
|
||||
browser.runtime.sendMessage({ type: "setDefaultStorage" })
|
||||
}
|
||||
|
||||
await main()
|
||||
|
||||
if (settingsState.onoff) {
|
||||
// Initialize legacy plugins
|
||||
const legacyPlugins = [plugins.Monofile];
|
||||
legacyPlugins.forEach(plugin => {
|
||||
if (typeof plugin === 'function') {
|
||||
plugin();
|
||||
}
|
||||
});
|
||||
console.log('init legacy plugins')
|
||||
plugins.Monofile()
|
||||
|
||||
// Initialize new plugin system
|
||||
await plugins.initializePlugins();
|
||||
|
||||
@@ -55,6 +55,7 @@ const rssFeedsByCountry: Record<string, string[]> = {
|
||||
export async function fetchNews(source: string, sendResponse: any) {
|
||||
const parser = new Parser();
|
||||
let feeds: string[];
|
||||
console.log('fetchNews', source)
|
||||
|
||||
if (source === "australia") {
|
||||
const date = new Date();
|
||||
|
||||
@@ -14,7 +14,6 @@ pluginManager.registerPlugin(notificationCollectorPlugin);
|
||||
pluginManager.registerPlugin(themesPlugin);
|
||||
//pluginManager.registerPlugin(testPlugin);
|
||||
|
||||
// Legacy plugin exports
|
||||
export { init as Monofile } from './monofile';
|
||||
|
||||
export async function initializePlugins(): Promise<void> {
|
||||
|
||||
@@ -585,10 +585,6 @@ export function showConflictPopup() {
|
||||
}
|
||||
|
||||
export function init() {
|
||||
if (typeof settingsState.onoff === "undefined") {
|
||||
browser.runtime.sendMessage({ type: "setDefaultStorage" })
|
||||
}
|
||||
|
||||
const handleDisabled = () => {
|
||||
waitForElm(".code", true, 50).then(AppendElementsToDisabledPage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user