Excluding containers from sync with RegExp
This commit is contained in:
parent
e3091dad7f
commit
0793e4ee09
1 changed files with 12 additions and 0 deletions
|
@ -33,6 +33,7 @@ const backgroundLogic = {
|
|||
|
||||
browser.permissions.onAdded.addListener(permissions => this.resetPermissions(permissions));
|
||||
browser.permissions.onRemoved.addListener(permissions => this.resetPermissions(permissions));
|
||||
backgroundLogic.setSyncExclusion();
|
||||
|
||||
// Update Translation in Manifest
|
||||
browser.runtime.onInstalled.addListener(this.updateTranslationInManifest);
|
||||
|
@ -504,6 +505,17 @@ 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+$"});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue