diff --git a/manifest.json b/manifest.json index 9cd12f5..a1fae5a 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "permissions": ["tabs", "storage", "unlimitedStorage", "contextMenus"], "background": { - "service_worker": "scripts/background/shopAI.js", "type": "module" + "scripts": ["scripts/background/shopAI.js"] }, "action": {}, "content_scripts": [ @@ -27,8 +27,16 @@ "1024": "media/icons/logo.png", "512": "media/icons/logo_tiny.png" }, - - "options_page": "pages/settings.htm", + + "options_ui": { + "page": "pages/settings.htm" + }, + + "browser_specific_settings": { + "gecko": { + "id": "{db2d6746-5711-4c83-90c7-107057f37732}" + } + }, "default_locale": "en" } diff --git a/scripts/background/shopAI.js b/scripts/background/shopAI.js index 6f2da7c..1ef500b 100644 --- a/scripts/background/shopAI.js +++ b/scripts/background/shopAI.js @@ -2,10 +2,12 @@ Shop wisely with AI! */ -import fc from './fc.js'; -import BackgroundCheck from "./background.check.js"; -import BackgroundMessaging from "./background.messaging.js"; - -fc.run(); -BackgroundCheck.init(); -new BackgroundMessaging(); \ No newline at end of file +(async () => { + const fc = (await import(browser.runtime.getURL("scripts/external/watch.js"))).default; + const BackgroundCheck = (await import(browser.runtime.getURL("/scripts/background/background.check.js"))).default; + const BackgroundMessaging = (await import(browser.runtime.getURL("/scripts/background/background.messaging.js"))).default; + + fc.run(); + BackgroundCheck.init(); + new BackgroundMessaging(); +}) \ No newline at end of file diff --git a/scripts/secretariat.js b/scripts/secretariat.js index 8f9a8a2..91799f9 100644 --- a/scripts/secretariat.js +++ b/scripts/secretariat.js @@ -78,8 +78,8 @@ class global { // Override the data with managed data if available. if ((NAME != null) ? NAME.length : false) { - DATA[`managed`] = await managed.read((NAME) ? [...NAME] : null); - DATA_RETURNED[`value`] = (DATA[`managed`] != null) ? DATA[`managed`] : DATA_RETURNED[`value`]; + // DATA[`managed`] = await managed.read((NAME) ? [...NAME] : null); + // DATA_RETURNED[`value`] = (DATA[`managed`] != null) ? DATA[`managed`] : DATA_RETURNED[`value`]; }; return DATA_RETURNED[`value`];