From d98d0f16974f4310b479fc17eae99a1b8745f550 Mon Sep 17 00:00:00 2001 From: Kendall Werts Date: Mon, 16 Dec 2019 14:59:11 -0600 Subject: [PATCH] a little linting, but not all the linting --- src/js/background/assignManager.js | 10 +++++----- src/js/background/identityState.js | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/js/background/assignManager.js b/src/js/background/assignManager.js index e3ceec5..a654c1d 100644 --- a/src/js/background/assignManager.js +++ b/src/js/background/assignManager.js @@ -632,13 +632,13 @@ async function restore(inSync) { const browserIdentities = await browser.contextualIdentities.query({}); for (const syncIdentity of syncIdentities) { - const compareNames = function (browserIdentity) { return (browserIdentity.name == syncIdentity.name); }; + const compareNames = function (browserIdentity) { return (browserIdentity.name === syncIdentity.name); }; const match = browserIdentities.find(compareNames); if (!match) { browser.contextualIdentities.create({name: syncIdentity.name, color: syncIdentity.color, icon: syncIdentity.icon}); continue; } else { - if (syncIdentity.color == match.color && syncIdentity.icon == match.icon) { + if (syncIdentity.color === match.color && syncIdentity.icon === match.icon) { console.log("everything is the same:", syncIdentity, match); continue; } @@ -655,14 +655,14 @@ async function restoreFirstRun(inSync) { const browserIdentities = await browser.contextualIdentities.query({}); const syncIdentities = inSync.identities; for (const syncIdentity of inSync.identities) { - const compareNames = function (browserIdentity) { return (browserIdentity.name == syncIdentity.name); }; + const compareNames = function (browserIdentity) { return (browserIdentity.name === syncIdentity.name); }; const match = browserIdentities.find(compareNames); if (!match) { newIdentity = await browser.contextualIdentities.create({name: syncIdentity.name, color: syncIdentity.color, icon: syncIdentity.icon}); identityState.updateUUID(newIdentity.cookieStoreId, syncIdentity.macUUID); continue; } else { - if (syncIdentity.color == match.color && syncIdentity.icon == match.icon) { + if (syncIdentity.color === match.color && syncIdentity.icon === match.icon) { console.log("everything is the same:", syncIdentity, match); continue; } @@ -678,7 +678,7 @@ async function restoreFirstRun(inSync) { if (assignedSitesBrowser.hasOwnProperty(key)) { const syncCookieStoreId = "firefox-container-" + syncAssignedSites[key].userContextId; const browserCookieStoreId = "firefox-container-" + assignedSitesBrowser[key].userContextId; - if (inSync.cookieStoreIDmap[syncCookieStoreId] == identityState.storageArea.get(browserCookieStoreId).macUUID) { + if (inSync.cookieStoreIDmap[syncCookieStoreId] === identityState.storageArea.get(browserCookieStoreId).macUUID) { continue; } else { // ask user diff --git a/src/js/background/identityState.js b/src/js/background/identityState.js index ef29bc3..843564a 100644 --- a/src/js/background/identityState.js +++ b/src/js/background/identityState.js @@ -77,12 +77,10 @@ const identityState = { }, async lookupCookieStoreId(macUUID) { - console.log("luCSI"); const macConfigs = await this.storageArea.area.get(); for(const key of Object.keys(macConfigs)) { if (key.includes("identitiesState@@_")) { if(macConfigs[key].macUUID === macUUID) { - console.log(key); return key.replace(/^firefox-container-@@_/, ""); } }