Fix import error and update standby state recording

This commit is contained in:
buzzcode2007 2024-04-02 16:39:46 +08:00
parent feffd0d445
commit 52f7a29969

View file

@ -7,7 +7,7 @@ Be sensitive to changes and update the state.
let secretariat = await import( let secretariat = await import(
chrome.runtime.getURL("scripts/secretariat.js") chrome.runtime.getURL("scripts/secretariat.js")
); );
let filters = (await import(chrome.runtime.getURL("scripts/filters.js"))).default; let filters = new ((await import(chrome.runtime.getURL("scripts/filters.js"))).default);
// let reader = await import(chrome.runtime.getURL("scripts/reader.js")); // let reader = await import(chrome.runtime.getURL("scripts/reader.js"));
class watchman { class watchman {
@ -34,15 +34,15 @@ Be sensitive to changes and update the state.
console.log( console.log(
"ShopAI works here! Click on the button in the toolbar or website to start.", "ShopAI works here! Click on the button in the toolbar or website to start.",
); );
secretariat.write("state", true);
// TODO // TODO
} }
/* Set the program to standby utnil next load. /* Set the program to standby utnil next load.
*/ */
static standby() { static standby() {
console.log( // Set the icon to indicate that it's not active.
"ShopAI doesn't work here (yet). Expecting something? Try checking your filters. If you know what you're doing, feel free to create a filter yourself.", secretariat.write("state", false);
);
} }
static async job() { static async job() {