From 8e7d9f7574fd4834b72d217fb3f63c697cd46b72 Mon Sep 17 00:00:00 2001 From: Danny Colin Date: Fri, 18 Nov 2022 23:40:58 -0500 Subject: [PATCH] Revert "Excluding containers from sync with RegExp" This reverts commit bf31fa9196d5051aa00f3f6104574f403fa78378. --- src/css/options.css | 10 ---------- src/js/background/backgroundLogic.js | 12 ------------ src/js/background/sync.js | 7 ------- src/js/options.js | 7 ------- src/options.html | 9 --------- 5 files changed, 45 deletions(-) diff --git a/src/css/options.css b/src/css/options.css index 99036f65..5a6baf0f 100644 --- a/src/css/options.css +++ b/src/css/options.css @@ -37,16 +37,6 @@ form { margin-block: 4px 8px; } -.settings-group-column { - display: flex; - flex-direction: column; -} - -.settings-group-column label, -.settings-group-column p { - margin-block: 4px 8px; -} - input[type="checkbox"] { margin-inline: 0 8px; margin-block: 1px auto; diff --git a/src/js/background/backgroundLogic.js b/src/js/background/backgroundLogic.js index a4d42d89..1050d400 100644 --- a/src/js/background/backgroundLogic.js +++ b/src/js/background/backgroundLogic.js @@ -27,7 +27,6 @@ const backgroundLogic = { browser.permissions.onAdded.addListener(permissions => this.resetPermissions(permissions)); browser.permissions.onRemoved.addListener(permissions => this.resetPermissions(permissions)); - backgroundLogic.setSyncExclusion(); }, resetPermissions(permissions) { @@ -400,17 +399,6 @@ const backgroundLogic = { cookieStoreId(userContextId) { if(userContextId === 0) return "firefox-default"; return `firefox-container-${userContextId}`; - }, - - async setSyncExclusion() { - // Default container sync exclude regexp to "^tmp\d+$" to prevent - // https://github.com/mozilla/multi-account-containers/issues/1675 - // https://github.com/stoically/temporary-containers/issues/371 - // for future users of the MAC + TC combination. - const { syncExcludeRegExp } = await browser.storage.local.get("syncExcludeRegExp"); - if (syncExcludeRegExp === undefined) { - browser.storage.local.set({syncExcludeRegExp: "^tmp\\d+$"}); - } } }; diff --git a/src/js/background/sync.js b/src/js/background/sync.js index fc6d8756..6dfb6294 100644 --- a/src/js/background/sync.js +++ b/src/js/background/sync.js @@ -128,16 +128,9 @@ const sync = { await sync.checkForListenersMaybeAdd(); async function updateSyncIdentities() { - const { syncExcludeRegExp } = await browser.storage.local.get("syncExcludeRegExp"); - const excludeRegExp = new RegExp(syncExcludeRegExp, "i"); const identities = await browser.contextualIdentities.query({}); for (const identity of identities) { - // skip excluded identities - if (identity.name.match(excludeRegExp)) { - continue; - } - delete identity.colorCode; delete identity.iconUrl; identity.macAddonUUID = await identityState.lookupMACaddonUUID(identity.cookieStoreId); diff --git a/src/js/options.js b/src/js/options.js index d3daf541..7679e2b3 100644 --- a/src/js/options.js +++ b/src/js/options.js @@ -63,12 +63,10 @@ async function setupOptions() { const { syncEnabled } = await browser.storage.local.get("syncEnabled"); const { replaceTabEnabled } = await browser.storage.local.get("replaceTabEnabled"); const { currentThemeId } = await browser.storage.local.get("currentThemeId"); - const { syncExcludeRegExp } = await browser.storage.local.get("syncExcludeRegExp"); document.querySelector("#syncCheck").checked = !!syncEnabled; document.querySelector("#replaceTabCheck").checked = !!replaceTabEnabled; document.querySelector("#changeTheme").selectedIndex = currentThemeId; - document.querySelector("#syncExcludeRegExp").value = syncExcludeRegExp || ""; setupContainerShortcutSelects(); } @@ -122,15 +120,10 @@ async function resetPermissionsUi() { browser.permissions.onAdded.addListener(resetPermissionsUi); browser.permissions.onRemoved.addListener(resetPermissionsUi); -function updateSyncExcludeRegExp(event) { - browser.storage.local.set({syncExcludeRegExp: event.target.value}); -} - document.addEventListener("DOMContentLoaded", setupOptions); document.querySelector("#syncCheck").addEventListener( "change", enableDisableSync); document.querySelector("#replaceTabCheck").addEventListener( "change", enableDisableReplaceTab); document.querySelector("#changeTheme").addEventListener( "change", changeTheme); -document.querySelector("#syncExcludeRegExp").addEventListener( "change", updateSyncExcludeRegExp); maybeShowPermissionsWarningIcon(); for (let i=0; i < NUMBER_OF_KEYBOARD_SHORTCUTS; i++) { diff --git a/src/options.html b/src/options.html index efd15f52..c8b8ff9a 100644 --- a/src/options.html +++ b/src/options.html @@ -48,15 +48,6 @@

-
- - -

-