From fd01999154a7f9542189ec9929804b7a5b808a8b Mon Sep 17 00:00:00 2001 From: Ivan Amaya Vazquez Date: Fri, 9 Dec 2022 01:40:04 -0600 Subject: [PATCH] Move constant from backgroundLogic.js to identityState.js --- src/js/background/backgroundLogic.js | 1 - src/js/background/identityState.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/background/backgroundLogic.js b/src/js/background/backgroundLogic.js index f91821b..d3d23ac 100644 --- a/src/js/background/backgroundLogic.js +++ b/src/js/background/backgroundLogic.js @@ -11,7 +11,6 @@ const backgroundLogic = { "about:home", "about:blank" ]), - NUMBER_OF_KEYBOARD_SHORTCUTS: 10, unhideQueue: [], init() { browser.commands.onCommand.addListener(function (command) { diff --git a/src/js/background/identityState.js b/src/js/background/identityState.js index 9114240..21234f1 100644 --- a/src/js/background/identityState.js +++ b/src/js/background/identityState.js @@ -1,6 +1,7 @@ window.identityState = { keyboardShortcut: {}, storageArea: { + NUMBER_OF_KEYBOARD_SHORTCUTS: 10, area: browser.storage.local, getContainerStoreKey(cookieStoreId) { @@ -50,7 +51,7 @@ window.identityState = { async loadKeyboardShortcuts () { const identities = await browser.contextualIdentities.query({}); - for (let i=0; i < backgroundLogic.NUMBER_OF_KEYBOARD_SHORTCUTS; i++) { + for (let i=0; i < this.NUMBER_OF_KEYBOARD_SHORTCUTS; i++) { const key = "open_container_" + i; const storageObject = await this.area.get(key); if (storageObject[key]){