From 1015bc08af9e0a8cca7b72b081cf1c6152448ced Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 16 Apr 2024 20:19:02 +0800 Subject: [PATCH] remove OOBE key That's not used elsewhere. --- scripts/fc.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/fc.js b/scripts/fc.js index 2c9cc23..3209a20 100644 --- a/scripts/fc.js +++ b/scripts/fc.js @@ -33,9 +33,13 @@ export default class fc { .then((response) => response.json()) .then(async (jsonData) => { let configuration = jsonData; - + // Run the storage initialization. + delete configuration[`OOBE`]; init(configuration); + + // Update the filters to sync with synchronized storage data. + (new filters).update(); }) .catch((error) => { console.error(error); @@ -44,9 +48,7 @@ export default class fc { static trigger() { chrome.runtime.onInstalled.addListener(function (details) { - if (details.reason == chrome.runtime.OnInstalledReason.INSTALL) { - fc.hello(); - } + (details.reason == chrome.runtime.OnInstalledReason.INSTALL) ? fc.hello() : null; fc.setup(); }); } @@ -71,13 +73,13 @@ export default class fc { if (((typeof DURATION_PREFERENCES).includes(`obj`) && DURATION_PREFERENCES != null && !Array.isArray(DURATION_PREFERENCES)) ? ((DURATION_PREFERENCES[`duration`]) ? (DURATION_PREFERENCES[`duration`] > 0) : false) : false) { // Convert DURATION_PREFERENCES[`duration`]) from hrs to milliseconds. DURATION_PREFERENCES[`duration`] = DURATION_PREFERENCES[`duration`] * (60 ** 2) * 1000; - let FILTERS = new filters; + let filter = new filters; // Now, set the interval. let updater_set = () => { setInterval(async () => { // Update the filters. - filters.update(); + filter.update(); }, DURATION_PREFERENCES[`duration`]); };