From ef861f48eae83500fa6b7275ca124214f5712660 Mon Sep 17 00:00:00 2001 From: Crazypersonalph <93847055+Crazypersonalph@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:06:00 +0800 Subject: [PATCH] background changes done --- src/background.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/background.ts b/src/background.ts index 880a2de6..c81b21ef 100644 --- a/src/background.ts +++ b/src/background.ts @@ -128,7 +128,7 @@ function GetNews(sendResponse: any) { }); } -const DefaultValues = { +const DefaultValues: any = { onoff: true, animatedbk: true, bksliderinput: 50, @@ -238,13 +238,13 @@ function UpdateCurrentValues() { function migrateOldStorage() { const result = browser.storage.local.get() - function open (items) { + function open (items: any) { let shouldUpdate = false; // Flag to check if there is anything to update // Check for the old "Name" field and convert it to "name" if (items.shortcuts && items.shortcuts.length > 0 && 'Name' in items.shortcuts[0]) { shouldUpdate = true; - items.shortcuts = items.shortcuts.map((shortcut) => { + items.shortcuts = items.shortcuts.map((shortcut: any) => { return { name: shortcut.Name, // Convert "Name" to "name" enabled: shortcut.enabled // Keep the "enabled" field as is