address feedback 03
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
/* global MAC_CONSTANTS */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
/* global MAC_CONSTANTS */
|
||||||
|
|
||||||
const DEFAULT_TAB = "about:newtab";
|
const DEFAULT_TAB = "about:newtab";
|
||||||
|
|
||||||
const backgroundLogic = {
|
const backgroundLogic = {
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// Shared constants for background scripts
|
// Shared constants for background scripts
|
||||||
window.MAC_CONSTANTS = {
|
window.MAC_CONSTANTS = {
|
||||||
OPEN_CONTAINER_PREFIX: "open_container_",
|
OPEN_CONTAINER_PREFIX: "open_container_",
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
/* global MAC_CONSTANTS */
|
/* global MAC_CONSTANTS */
|
||||||
window.identityState = {
|
window.identityState = {
|
||||||
keyboardShortcut: {},
|
keyboardShortcut: {},
|
||||||
@@ -54,20 +58,19 @@ window.identityState = {
|
|||||||
for (let i=0; i < MAC_CONSTANTS.NUMBER_OF_KEYBOARD_SHORTCUTS; i++) {
|
for (let i=0; i < MAC_CONSTANTS.NUMBER_OF_KEYBOARD_SHORTCUTS; i++) {
|
||||||
const openKey = MAC_CONSTANTS.OPEN_CONTAINER_PREFIX + i;
|
const openKey = MAC_CONSTANTS.OPEN_CONTAINER_PREFIX + i;
|
||||||
const reopenKey = MAC_CONSTANTS.REOPEN_IN_CONTAINER_PREFIX + i;
|
const reopenKey = MAC_CONSTANTS.REOPEN_IN_CONTAINER_PREFIX + i;
|
||||||
const storageObject = await this.area.get(openKey);
|
|
||||||
|
|
||||||
if (storageObject[openKey]){
|
for (const key of [openKey, reopenKey]) {
|
||||||
identityState.keyboardShortcut[openKey] = storageObject[openKey];
|
const storageObject = await this.area.get(key);
|
||||||
identityState.keyboardShortcut[reopenKey] = storageObject[openKey];
|
|
||||||
continue;
|
if (storageObject[key]){
|
||||||
|
identityState.keyboardShortcut[key] = storageObject[key];
|
||||||
|
} else if (identities[i]) {
|
||||||
|
identityState.keyboardShortcut[key] = identities[i].cookieStoreId;
|
||||||
|
} else {
|
||||||
|
identityState.keyboardShortcut[key] = "none";
|
||||||
}
|
}
|
||||||
if (identities[i]) {
|
|
||||||
identityState.keyboardShortcut[openKey] = identities[i].cookieStoreId;
|
|
||||||
identityState.keyboardShortcut[reopenKey] = identities[i].cookieStoreId;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
identityState.keyboardShortcut[openKey] = "none";
|
|
||||||
identityState.keyboardShortcut[reopenKey] = "none";
|
|
||||||
}
|
}
|
||||||
return identityState.keyboardShortcut;
|
return identityState.keyboardShortcut;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user