mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
background changes done
This commit is contained in:
+3
-3
@@ -128,7 +128,7 @@ function GetNews(sendResponse: any) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultValues = {
|
const DefaultValues: any = {
|
||||||
onoff: true,
|
onoff: true,
|
||||||
animatedbk: true,
|
animatedbk: true,
|
||||||
bksliderinput: 50,
|
bksliderinput: 50,
|
||||||
@@ -238,13 +238,13 @@ function UpdateCurrentValues() {
|
|||||||
|
|
||||||
function migrateOldStorage() {
|
function migrateOldStorage() {
|
||||||
const result = browser.storage.local.get()
|
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
|
let shouldUpdate = false; // Flag to check if there is anything to update
|
||||||
|
|
||||||
// Check for the old "Name" field and convert it to "name"
|
// Check for the old "Name" field and convert it to "name"
|
||||||
if (items.shortcuts && items.shortcuts.length > 0 && 'Name' in items.shortcuts[0]) {
|
if (items.shortcuts && items.shortcuts.length > 0 && 'Name' in items.shortcuts[0]) {
|
||||||
shouldUpdate = true;
|
shouldUpdate = true;
|
||||||
items.shortcuts = items.shortcuts.map((shortcut) => {
|
items.shortcuts = items.shortcuts.map((shortcut: any) => {
|
||||||
return {
|
return {
|
||||||
name: shortcut.Name, // Convert "Name" to "name"
|
name: shortcut.Name, // Convert "Name" to "name"
|
||||||
enabled: shortcut.enabled // Keep the "enabled" field as is
|
enabled: shortcut.enabled // Keep the "enabled" field as is
|
||||||
|
|||||||
Reference in New Issue
Block a user