remove OOBE key

That's not used elsewhere.
This commit is contained in:
buzz-lightsnack-2007 2024-04-16 20:19:02 +08:00
parent 423f942cee
commit 1015bc08af

View file

@ -33,9 +33,13 @@ export default class fc {
.then((response) => response.json()) .then((response) => response.json())
.then(async (jsonData) => { .then(async (jsonData) => {
let configuration = jsonData; let configuration = jsonData;
// Run the storage initialization. // Run the storage initialization.
delete configuration[`OOBE`];
init(configuration); init(configuration);
// Update the filters to sync with synchronized storage data.
(new filters).update();
}) })
.catch((error) => { .catch((error) => {
console.error(error); console.error(error);
@ -44,9 +48,7 @@ export default class fc {
static trigger() { static trigger() {
chrome.runtime.onInstalled.addListener(function (details) { chrome.runtime.onInstalled.addListener(function (details) {
if (details.reason == chrome.runtime.OnInstalledReason.INSTALL) { (details.reason == chrome.runtime.OnInstalledReason.INSTALL) ? fc.hello() : null;
fc.hello();
}
fc.setup(); 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) { 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. // Convert DURATION_PREFERENCES[`duration`]) from hrs to milliseconds.
DURATION_PREFERENCES[`duration`] = DURATION_PREFERENCES[`duration`] * (60 ** 2) * 1000; DURATION_PREFERENCES[`duration`] = DURATION_PREFERENCES[`duration`] * (60 ** 2) * 1000;
let FILTERS = new filters; let filter = new filters;
// Now, set the interval. // Now, set the interval.
let updater_set = () => { let updater_set = () => {
setInterval(async () => { setInterval(async () => {
// Update the filters. // Update the filters.
filters.update(); filter.update();
}, DURATION_PREFERENCES[`duration`]); }, DURATION_PREFERENCES[`duration`]);
}; };