Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f4bcd30434 | |||
| c2ff3f00f2 | |||
| 6494b98157 | |||
| c371cd11d0 | |||
| 1b22753811 | |||
| e7af96b625 | |||
| 0c04b83207 | |||
| 6b73cee79e | |||
| d7688cb1f5 | |||
| c03df9d246 | |||
| f0afc0da36 | |||
| fc070b2d0d | |||
| 899476e81a | |||
| 518f1cca89 | |||
| 997fe4db12 | |||
| a5f6f8381a | |||
| 46d76dfaa3 | |||
| 9c80781e3f |
+3
-3
@@ -2,7 +2,7 @@
|
||||
"name": "testpilot-containers",
|
||||
"title": "Multi-Account Containers",
|
||||
"description": "Containers helps you keep all the parts of your online life contained in different tabs. Custom labels and color-coded tabs help keep different activities — like online shopping, travel planning, or checking work email — separate.",
|
||||
"version": "7.0.2",
|
||||
"version": "7.2.0",
|
||||
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mozilla/multi-account-containers/issues"
|
||||
@@ -22,10 +22,10 @@
|
||||
"nyc": "^15.0.0",
|
||||
"sinon": "^7.5.0",
|
||||
"sinon-chai": "^3.3.0",
|
||||
"stylelint-order": "^4.0.0",
|
||||
"stylelint": "^13.5.0",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"web-ext": "^2.9.3",
|
||||
"stylelint-order": "^4.0.0",
|
||||
"web-ext": "^5.4.1",
|
||||
"webextensions-jsdom": "^1.2.1"
|
||||
},
|
||||
"homepage": "https://github.com/mozilla/multi-account-containers#readme",
|
||||
|
||||
@@ -18,7 +18,6 @@ main {
|
||||
button .container-name,
|
||||
#current-container-name {
|
||||
font-weight: bold;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1300px) {
|
||||
|
||||
@@ -931,3 +931,99 @@ tr > td > .trash-button {
|
||||
tr:hover > td > .trash-button {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--title-text-color: #fff;
|
||||
--text-normal-color: #f9f9fa;
|
||||
--text-heading-color: #fff;
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: #4a4a4a;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #fff;
|
||||
|
||||
--hr-grey: #38383d;
|
||||
--text-grey: #f9f9fa;
|
||||
}
|
||||
|
||||
h3.title {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
background-color: #737373;
|
||||
border: solid 1px #737373;
|
||||
}
|
||||
|
||||
.btn-return.arrow-left {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.onboarding-title,
|
||||
.delete-container-confirm-title {
|
||||
color: #ededf0;
|
||||
}
|
||||
|
||||
input {
|
||||
border: solid 1px #737373;
|
||||
}
|
||||
|
||||
#edit-container-panel-name-input {
|
||||
background-color: #38383d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.delete-container {
|
||||
background-color: #4a4a4a;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
background-color: #737373;
|
||||
color: #f9f9fa;
|
||||
}
|
||||
|
||||
.cancel-button,
|
||||
.grey-button {
|
||||
background-color: #737373;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.button.secondary:hover,
|
||||
.button.secondary:focus {
|
||||
background-color: #676767;
|
||||
}
|
||||
|
||||
.panel-footer {
|
||||
border-block-end: solid 1px #4a4a4a;
|
||||
}
|
||||
|
||||
img.menu-icon,
|
||||
.menu-icon > img,
|
||||
.menu-arrow > img,
|
||||
.info-icon > img,
|
||||
.btn-return.arrow-left {
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
#edit-sites-assigned .menu-icon,
|
||||
#container-info-table .menu-icon {
|
||||
filter: invert(0);
|
||||
}
|
||||
|
||||
.truncate-text::after {
|
||||
background: #4a4a4a;
|
||||
mask-image: linear-gradient(to right, transparent, #4a4a4a 70%);
|
||||
}
|
||||
|
||||
[data-identity-color="grey"] {
|
||||
--identity-icon-color: #ededf0;
|
||||
}
|
||||
|
||||
[type="radio"]:checked + [data-identity-color="grey"] {
|
||||
--identity-icon-color: #616161;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,11 @@ window.assignManager = {
|
||||
return !!syncEnabled;
|
||||
},
|
||||
|
||||
async getReplaceTabEnabled() {
|
||||
const { replaceTabEnabled } = await browser.storage.local.get("replaceTabEnabled");
|
||||
return !!replaceTabEnabled;
|
||||
},
|
||||
|
||||
getByUrlKey(siteStoreKey) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.area.get([siteStoreKey]).then((storageResponse) => {
|
||||
@@ -233,9 +238,11 @@ window.assignManager = {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
const replaceTabEnabled = await this.storageArea.getReplaceTabEnabled();
|
||||
const removeTab = backgroundLogic.NEW_TAB_PAGES.has(tab.url)
|
||||
|| (messageHandler.lastCreatedTab
|
||||
&& messageHandler.lastCreatedTab.id === tab.id);
|
||||
&& messageHandler.lastCreatedTab.id === tab.id)
|
||||
|| replaceTabEnabled;
|
||||
const openTabId = removeTab ? tab.openerTabId : tab.id;
|
||||
|
||||
if (!this.canceledRequests[tab.id]) {
|
||||
|
||||
+10
-10
@@ -16,25 +16,24 @@ async function requestPermissions() {
|
||||
|
||||
async function enableDisableSync() {
|
||||
const checkbox = document.querySelector("#syncCheck");
|
||||
if (checkbox.checked) {
|
||||
await browser.storage.local.set({syncEnabled: true});
|
||||
} else {
|
||||
await browser.storage.local.set({syncEnabled: false});
|
||||
}
|
||||
await browser.storage.local.set({syncEnabled: !!checkbox.checked});
|
||||
browser.runtime.sendMessage({ method: "resetSync" });
|
||||
}
|
||||
|
||||
async function enableDisableReplaceTab() {
|
||||
const checkbox = document.querySelector("#replaceTabCheck");
|
||||
await browser.storage.local.set({replaceTabEnabled: !!checkbox.checked});
|
||||
}
|
||||
|
||||
async function setupOptions() {
|
||||
const hasPermission = await browser.permissions.contains({permissions: ["bookmarks"]});
|
||||
const { syncEnabled } = await browser.storage.local.get("syncEnabled");
|
||||
const { replaceTabEnabled } = await browser.storage.local.get("replaceTabEnabled");
|
||||
if (hasPermission) {
|
||||
document.querySelector("#bookmarksPermissions").checked = true;
|
||||
}
|
||||
if (syncEnabled) {
|
||||
document.querySelector("#syncCheck").checked = true;
|
||||
} else {
|
||||
document.querySelector("#syncCheck").checked = false;
|
||||
}
|
||||
document.querySelector("#syncCheck").checked = !!syncEnabled;
|
||||
document.querySelector("#replaceTabCheck").checked = !!replaceTabEnabled;
|
||||
setupContainerShortcutSelects();
|
||||
}
|
||||
|
||||
@@ -82,6 +81,7 @@ function resetOnboarding() {
|
||||
document.addEventListener("DOMContentLoaded", setupOptions);
|
||||
document.querySelector("#bookmarksPermissions").addEventListener( "change", requestPermissions);
|
||||
document.querySelector("#syncCheck").addEventListener( "change", enableDisableSync);
|
||||
document.querySelector("#replaceTabCheck").addEventListener( "change", enableDisableReplaceTab);
|
||||
document.querySelector("button").addEventListener("click", resetOnboarding);
|
||||
|
||||
for (let i=0; i < NUMBER_OF_KEYBOARD_SHORTCUTS; i++) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Firefox Multi-Account Containers",
|
||||
"version": "7.0.2",
|
||||
"version": "7.2.0",
|
||||
"incognito": "not_allowed",
|
||||
"description": "Multi-Account Containers helps you keep all the parts of your online life contained in different tabs. Custom labels and color-coded tabs help keep different activities — like online shopping, travel planning, or checking work email — separate.",
|
||||
"icons": {
|
||||
|
||||
@@ -20,6 +20,13 @@
|
||||
Enable Sync
|
||||
</label>
|
||||
<p><em>This setting allows you to sync your containers and site assignments across devices.</em></p>
|
||||
<h3>Tab behaviour:</h3>
|
||||
<label>
|
||||
<input type="checkbox" id="replaceTabCheck">
|
||||
Replace tab instead of creating a new one
|
||||
</label>
|
||||
<p><em>Replace the current tab if a page which is assigned to another container is opened (instead of keeping the current tab open).
|
||||
Opening tabs with middle mouse button is not affected.</em></p>
|
||||
<h3>Keyboard Shortcuts:</h3>
|
||||
<p><em>Edit which container is opened when using the numbered shortcuts.</em></p>
|
||||
<p><label>
|
||||
|
||||
+2
-1
@@ -87,7 +87,8 @@ const initializeWithTab = async (details = {
|
||||
"browserActionBadgesClicked": [],
|
||||
"onboarding-stage": 7,
|
||||
"achievements": [],
|
||||
"syncEnabled": true
|
||||
"syncEnabled": true,
|
||||
"replaceTabEnabled": false
|
||||
});
|
||||
window.browser.storage.local.set.resetHistory();
|
||||
window.browser.storage.sync.clear();
|
||||
|
||||
Reference in New Issue
Block a user