Move constant from backgroundLogic.js to identityState.js
This commit is contained in:
parent
bf728d882f
commit
fd01999154
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,6 @@ const backgroundLogic = {
|
||||||
"about:home",
|
"about:home",
|
||||||
"about:blank"
|
"about:blank"
|
||||||
]),
|
]),
|
||||||
NUMBER_OF_KEYBOARD_SHORTCUTS: 10,
|
|
||||||
unhideQueue: [],
|
unhideQueue: [],
|
||||||
init() {
|
init() {
|
||||||
browser.commands.onCommand.addListener(function (command) {
|
browser.commands.onCommand.addListener(function (command) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
window.identityState = {
|
window.identityState = {
|
||||||
keyboardShortcut: {},
|
keyboardShortcut: {},
|
||||||
storageArea: {
|
storageArea: {
|
||||||
|
NUMBER_OF_KEYBOARD_SHORTCUTS: 10,
|
||||||
area: browser.storage.local,
|
area: browser.storage.local,
|
||||||
|
|
||||||
getContainerStoreKey(cookieStoreId) {
|
getContainerStoreKey(cookieStoreId) {
|
||||||
|
@ -50,7 +51,7 @@ window.identityState = {
|
||||||
|
|
||||||
async loadKeyboardShortcuts () {
|
async loadKeyboardShortcuts () {
|
||||||
const identities = await browser.contextualIdentities.query({});
|
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 key = "open_container_" + i;
|
||||||
const storageObject = await this.area.get(key);
|
const storageObject = await this.area.get(key);
|
||||||
if (storageObject[key]){
|
if (storageObject[key]){
|
||||||
|
|
Loading…
Add table
Reference in a new issue