Compare commits

...

52 Commits

Author SHA1 Message Date
luke crouch 50f5ebfcff Merge pull request #2099 from mozilla/version-bump
Update version number to 7.4.0
2021-08-09 09:37:23 -05:00
Maxx Crawford 0b760ce465 Update version number to 7.4.0 2021-08-09 09:32:45 -05:00
luke crouch bedebb7c0e Merge pull request #1620 from Gitoffthelawn/patch-1
Improve accessibility by adjusting AMO links
2021-07-28 14:18:17 -05:00
Maxx Crawford 9447792e53 Merge pull request #1683 from CSCD01/issue-1231
Fixes #1231 confirmation page alignment
2021-07-28 10:22:01 -05:00
luke crouch 8512794b43 Merge pull request #2079 from rpl/fix/add-unlimitedStorage-permission
fix: Add unlimitedStorage permission to make sure storage.local does not hit quota limits or IndexedDB QuotaManager data eviction
2021-07-26 09:22:57 -05:00
luke crouch 081ea0bedb Merge pull request #2052 from cammarin/runtime-geturl
Replace deprecated method `browser.extension.getURL()`
2021-07-26 09:09:17 -05:00
Maxx Crawford d2c00a10cf Merge pull request #2026 from ncallaway/always-open-in-title
Rename 'always open in' title
2021-07-26 08:39:44 -05:00
Luca Greco 56b85a8cdd fix: Add unlimitedStorage permission to make sure storage.local doesn't hit quota limits or IndexedDB QuotaManager data eviction 2021-07-14 20:25:04 +02:00
Carlos Marin 4e4ed390e0 Replace deprecated method
Close #2047
2021-05-18 14:36:29 -03:00
Noah Callaway 86edd8c8a2 Rename 'always open in' title 2021-04-23 00:10:37 -07:00
Maxx Crawford 4b56a2f0bb Merge pull request #1930 from schra/fix/development-instructions
Fix development instructions in README
2021-03-09 13:59:01 -06:00
luke crouch 66be5e288d Merge pull request #1950 from mozilla/version-bump
Bump version from 7.2.0 to 7.3.0
2021-01-22 09:37:27 -06:00
Maxx Crawford 7ebed4521d Bump version from 7.2.0 to 7.3.0 2021-01-22 09:30:17 -06:00
luke crouch 68b1b2fe37 Merge pull request #1608 from sryze/container-reordering
Implement container reordering
2021-01-22 09:14:52 -06:00
Sergey Zolotarev 89719f7243 Implement container reordering 2021-01-21 23:59:31 +06:00
André Schröder 4d76c937fe fix typos 2021-01-11 20:11:06 +01:00
André Schröder 649110ed45 fix concerns 2021-01-11 20:09:11 +01:00
luke crouch f4bcd30434 Merge pull request #1947 from mozilla/1946-minor-release-bump
Fix #1946 - Update package.json/manifest to 7.2.0
2021-01-11 11:24:11 -06:00
Maxx Crawford c2ff3f00f2 Fix #1946 - Update package.json/manifest to 7.2.0 2021-01-11 10:16:53 -06:00
Maxx Crawford 6494b98157 Merge pull request #1945 from mozilla/update-web-ext
update web-ext to 5.4.1
2021-01-11 10:13:36 -06:00
luke crouch c371cd11d0 update web-ext to 5.4.1 2021-01-11 09:33:08 -06:00
luke crouch 1b22753811 Merge pull request #1751 from JakeWharton/patch-1
Remove automatic capitalization of container name
2021-01-11 09:22:07 -06:00
Maxx Crawford e7af96b625 Merge pull request #1944 from dannycolin/dark-mode
Add a dark mode to MAC
2021-01-11 09:16:05 -06:00
Danny Colin 0c04b83207 fix css indentations 2021-01-10 19:02:42 -05:00
Danny Colin 6b73cee79e fix gradient colors in open tabs list 2021-01-10 18:59:16 -05:00
Danny Colin d7688cb1f5 fix stylelint errors 2021-01-08 13:19:18 -05:00
Danny Colin c03df9d246 add a dark theme 2021-01-08 13:11:02 -05:00
Andre Schröder a1d01f8ff2 Fix development instructions in README
web-ext will not work when following the instructions without having
this diff applied:

```
$ ./node_modules/web-ext/bin/web-ext run -s src/
(node:41062) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:41062) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:41062) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
Applying config file: ./package.json
Running web extension from /home/andre/Git/multi-account-containers/src
Use --verbose or open Tools > Web Developer > Browser Console to see logging

WebExtError: Temporary add-on installation is not supported in this version of Firefox (you need Firefox 49 or higher). For older Firefox versions, use --pre-install
    at FirefoxDesktopExtensionRunner._callee6$ (/home/andre/Git/multi-account-containers/node_modules/web-ext/dist/webpack:/src/extension-runners/firefox-desktop.js:273:19)
    at tryCatch (/home/andre/Git/multi-account-containers/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/home/andre/Git/multi-account-containers/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.prototype.<computed> [as throw] (/home/andre/Git/multi-account-containers/node_modules/web-ext/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/home/andre/Git/multi-account-containers/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:1)
    at /home/andre/Git/multi-account-containers/node_modules/web-ext/dist/webpack:/node_modules/babel-runtime/helpers/asyncToGenerator.js:30:1
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
```

web-ext will work when following the instructions with having this diff
applied:

```
$ web-ext run -s src/
Applying config file: ./package.json
Running web extension from /home/andre/Git/multi-account-containers/src
Use --verbose or open Tools > Web Developer > Browser Console to see logging
Installed /home/andre/Git/multi-account-containers/src as a temporary add-on
The extension will reload if any source file changes
Press R to reload (and Ctrl-C to quit)
```

I copied the wording from
https://github.com/mdn/webextensions-examples/blob/2184fee75afcde39328384b36adf9e52c5917949/README.md

I guess the underlying problem is that the web-ext version specified in
the package.json is very outdated. By installing the web-ext tool via
the provided instructions it fixes the problem.

Furthermore, the `webextensions-examples` repo doesn't specify web-ext
in their package.json which means that installing web-ext via the
provided instructions seems to be the preferred way. (So maybe web-ext
should be removed from the package.json entirely?)

Fixes #1926
2020-12-23 04:13:16 +01:00
luke crouch f0afc0da36 Merge pull request #1854 from mozilla/version-bump
Update version number for new release
2020-08-25 11:54:16 -05:00
Maxx Crawford fc070b2d0d Update version number for new release 2020-08-25 11:40:01 -05:00
luke crouch 899476e81a Merge pull request #1835 from Moonloard/replace-tab
Replace tab instead of creating a new one (#1765 #1704 #1590  #1837)
2020-08-14 11:11:19 -05:00
Moonloard 518f1cca89 option name adjusted 2020-07-27 22:49:33 +02:00
Moonloard 997fe4db12 description of option adjusted 2020-07-27 22:42:55 +02:00
Moonloard a5f6f8381a remove unnecessary line breaks 2020-07-27 22:22:42 +02:00
Moonloard 46d76dfaa3 new option to replace current tab when a assigned domain is opened 2020-07-27 22:12:49 +02:00
Maxx Crawford 00a1ce9dca Merge pull request #1815 from mozilla/1781-site-isolation-save-fix
Site isolation saved changes do not affect other containers
2020-07-16 21:09:30 -05:00
Maxx Crawford b6f3c15999 Bumped version number for patch 2020-07-15 10:42:08 -05:00
Maxx Crawford 024fb03c33 Fixed #1781 - Reset checkbox listener to keep event queue to 0 2020-07-15 10:41:12 -05:00
luke crouch de8d0b28ea Merge pull request #1811 from mozilla/1810-restore-new-tab-keyboard-nav
Fixed #1810 - Split container item funcitonality
2020-07-14 19:53:49 -05:00
Maxx Crawford 8cffccccce Merge pull request #1809 from mozilla/fix-manage-site-list
fix space character typo in classList.add argument
2020-07-14 16:56:07 -05:00
Maxx Crawford 7f31a92ede Fixed #1810 - Split container item funcitonality 2020-07-14 16:49:49 -05:00
luke crouch b47291ae87 Merge pull request #1780 from mozilla/1779-manage-site-list-icon-fix
Fixed #1779 - Added CSS override for favicons on the Manage Site List panel
2020-07-14 15:51:16 -05:00
luke crouch 8de231f5e9 fix space character typo in classList.add argument 2020-07-14 15:34:07 -05:00
luke crouch a10d222ce7 Merge pull request #1794 from ericlee4/close-button
fix #1788
2020-07-14 11:07:19 -05:00
luke crouch 487befda65 Merge pull request #1798 from kendallcorner/GH-1785-keyboard-nav
Fixed first panel keyboard arrow nav.  Added second panel keyboard nav.
2020-07-14 11:02:04 -05:00
Kendall Werts 28222e510f Fixed first panel keyboard arrow nav. Added second panel keyboard nav. 2020-07-12 22:01:14 -05:00
Eric Lee a2a11d053b fix #1788
close button not found
2020-07-12 15:36:50 -04:00
Maxx Crawford 5e99af0993 Fixed #1779 - Added CSS override for favicons on the Manage Site List panel 2020-07-09 15:29:33 -05:00
Jake Wharton 9c80781e3f Remove automatic capitalization of container name
The name is not capitalized in the address bar or the list of names in the extension popup.
2020-05-27 14:36:18 -04:00
Khansa Kiasatina 2ed9eaee8a fix lint 2020-03-13 17:25:09 -04:00
Khansa Kiasatina c03c3c118c fix alignment 2020-03-08 17:02:58 -04:00
Gitoffthelawn 4bd412aa9b Improve accessibility by adjusting AMO links
Let's open this to everyone and not assume any specific language or country.
AMO will automatically redirect to user's language and country.
2020-01-23 02:02:12 -08:00
15 changed files with 479 additions and 189 deletions
+35 -9
View File
@@ -2,7 +2,7 @@
The Firefox Multi-Account Containers extension lets you carve out a separate box for each of your online lives no more opening a different browser just to check your work email! [Learn More Here](https://blog.mozilla.org/firefox/introducing-firefox-multi-account-containers/)
[Available on addons.mozilla.org](https://addons.mozilla.org/en-GB/firefox/addon/multi-account-containers/)
[Available on addons.mozilla.org](https://addons.mozilla.org/firefox/addon/multi-account-containers/)
For more info, see:
@@ -18,17 +18,43 @@ For more info, see:
## Development
1. `npm install`
2. `./node_modules/web-ext/bin/web-ext run -s src/`
### Running Locally
#### Via WebExtensions API (web-ext)
1. Install the [web-ext](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext) tool.
2. Run `web-ext run -s src/`. This launches Firefox and installs the extension automatically.
This tool provides some additional development features, such as [automatic reloading](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext#Automatic_extension_reloading).
#### Via about:debugging in Firefox
1. Open the `about:debugging` page in Firefox.
2. Click on `This Firefox`.
3. Click on [Load Temporary Add-on](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox).
4. Select `src/manifest.json`.
Here is a [video](https://www.youtube.com/watch?v=cer9EUKegG4) that demonstrates how to do this.
### Testing
`npm run test`
or
* Install dependencies:
`npm run lint`
```
npm install
```
for just the linter
* Run all tests:
```
npm run test
```
* Only run the linter:
```
npm run lint
```
There is a timeout test that sometimes fails on certain machines, so make sure to run the tests on your clone before you make any changes to see if you have this problem.
@@ -43,12 +69,12 @@ There is a timeout test that sometimes fails on certain machines, so make sure t
#### Publish to AMO
1. `npm run-script build`
2. [Upload the `.zip` to AMO](https://addons.mozilla.org/en-US/developers/addon/multi-account-containers/versions/submit/)
2. [Upload the `.zip` to AMO](https://addons.mozilla.org/developers/addon/multi-account-containers/versions/submit/)
#### Publish to GitHub
Finally, we also publish the release to GitHub for those followers.
1. Download the signed `.xpi` from [the addon versions page](https://addons.mozilla.org/en-US/developers/addon/multi-account-containers/versions)
1. Download the signed `.xpi` from [the addon versions page](https://addons.mozilla.org/developers/addon/multi-account-containers/versions)
2. [Make the new release on
GitHub](https://github.com/mozilla/multi-account-containers/releases/new)
* Use the version number for "Tag version" and "Release title"
+3 -3
View File
@@ -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.0",
"version": "7.4.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",
+6 -2
View File
@@ -18,7 +18,6 @@ main {
button .container-name,
#current-container-name {
font-weight: bold;
text-transform: capitalize;
}
@media only screen and (max-width: 1300px) {
@@ -28,7 +27,7 @@ button .container-name,
/* for a mid sized window we have enough for this but not our image */
.title {
background-image: url("chrome://global/skin/icons/info.svg");
background-image: url('chrome://global/skin/icons/info.svg');
}
}
@@ -77,6 +76,11 @@ dfn {
font-style: normal;
}
#deny,
#confirm {
flex-grow: 1;
}
.button-container > button {
min-inline-size: 240px;
}
+123 -2
View File
@@ -691,6 +691,10 @@ h3.title {
max-inline-size: 300px;
}
.menu-item.drag-over td {
border-block-start: 2px solid var(--text-normal-color);
}
.disabled-menu-item {
color: grey;
cursor: default;
@@ -703,12 +707,16 @@ h3.title {
color: #fff;
}
.menu-text {
.menu-item-name {
display: flex;
inline-size: calc(100% - 40px);
line-height: 24px;
max-inline-size: 260px;
}
.menu-text {
line-height: 24px;
}
.menu-icon {
display: block;
height: 16px;
@@ -721,6 +729,7 @@ h3.title {
}
/* Maintain 1:1 square ratio for Favicons of websites added to a specific container */
#edit-sites-assigned .menu-icon,
#container-info-table .menu-icon {
inline-size: 16px;
}
@@ -926,3 +935,115 @@ tr > td > .trash-button {
tr:hover > td > .trash-button {
display: block;
}
.move-button {
cursor: move;
display: inline-block;
height: 100%;
inline-size: 16px;
margin-block-end: 4px;
margin-block-start: 4px;
margin-inline-end: 10px;
margin-inline-start: auto;
text-align: center;
}
.move-button > img {
height: 16px;
}
@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;
}
}
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><script xmlns=""/>
<defs/>
<g id="All" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="hamburger-menu" fill="#858585">
<g id="Group" transform="translate(2.000000, 6.000000)">
<rect id="Rectangle-path" x="0" y="0" width="26" height="2"/>
<rect id="Rectangle-path" x="0" y="8" width="26" height="2"/>
<rect id="Rectangle-path" x="0" y="16" width="26" height="2"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 706 B

+9 -2
View File
@@ -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]) {
@@ -691,7 +698,7 @@ window.assignManager = {
reloadPageInContainer(url, currentUserContextId, userContextId, index, active, neverAsk = false, openerTabId = null) {
const cookieStoreId = backgroundLogic.cookieStoreId(userContextId);
const loadPage = browser.extension.getURL("confirm-page.html");
const loadPage = browser.runtime.getURL("confirm-page.html");
// False represents assignment is not permitted
// If the user has explicitly checked "Never Ask Again" on the warning page we will send them straight there
if (neverAsk) {
+1 -1
View File
@@ -22,7 +22,7 @@ const backgroundLogic = {
},
async getExtensionInfo() {
const manifestPath = browser.extension.getURL("manifest.json");
const manifestPath = browser.runtime.getURL("manifest.json");
const response = await fetch(manifestPath);
const extensionInfo = await response.json();
return extensionInfo;
+1 -1
View File
@@ -24,7 +24,7 @@ async function addMessage(message) {
divElement.innerText = message.text;
const imageElement = document.createElement("img");
const imagePath = browser.extension.getURL("/img/container-site-d-24.png");
const imagePath = browser.runtime.getURL("/img/container-site-d-24.png");
const response = await fetch(imagePath);
const blob = await response.blob();
const objectUrl = URL.createObjectURL(blob);
+10 -10
View File
@@ -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++) {
+224 -124
View File
@@ -10,6 +10,8 @@ const DEFAULT_ICON = "circle";
const NEW_CONTAINER_ID = "new";
const ONBOARDING_STORAGE_KEY = "onboarding-stage";
const CONTAINER_ORDER_STORAGE_KEY = "container-order";
const CONTAINER_DRAG_DATA_TYPE = "firefox-container";
// List of panels
const P_ONBOARDING_1 = "onboarding1";
@@ -30,9 +32,16 @@ const P_CONTAINER_DELETE = "containerDelete";
const P_CONTAINERS_ACHIEVEMENT = "containersAchievement";
const P_CONTAINER_ASSIGNMENTS = "containerAssignments";
function addRemoveSiteIsolation() {
const identity = Logic.currentIdentity();
browser.runtime.sendMessage({
method: "addRemoveSiteIsolation",
cookieStoreId: identity.cookieStoreId
});
}
async function getExtensionInfo() {
const manifestPath = browser.extension.getURL("manifest.json");
const manifestPath = browser.runtime.getURL("manifest.json");
const response = await fetch(manifestPath);
const extensionInfo = await response.json();
return extensionInfo;
@@ -185,16 +194,29 @@ const Logic = {
elementToEnable.classList.remove("disabled-menu-item");
},
async saveContainerOrder(rows) {
const containerOrder = {};
rows.forEach((node, index) => {
return containerOrder[node.dataset.containerId] = index;
});
await browser.storage.local.set({
[CONTAINER_ORDER_STORAGE_KEY]: containerOrder
});
},
async refreshIdentities() {
const [identities, state] = await Promise.all([
const [identities, state, containerOrderStorage] = await Promise.all([
browser.contextualIdentities.query({}),
browser.runtime.sendMessage({
method: "queryIdentitiesState",
message: {
windowId: browser.windows.WINDOW_ID_CURRENT
}
})
}),
browser.storage.local.get([CONTAINER_ORDER_STORAGE_KEY])
]);
const containerOrder =
containerOrderStorage && containerOrderStorage[CONTAINER_ORDER_STORAGE_KEY];
this._identities = identities.map((identity) => {
const stateObject = state[identity.cookieStoreId];
if (stateObject) {
@@ -204,8 +226,11 @@ const Logic = {
identity.numberOfOpenTabs = stateObject.numberOfOpenTabs;
identity.isIsolated = stateObject.isIsolated;
}
if (containerOrder) {
identity.order = containerOrder[identity.cookieStoreId];
}
return identity;
});
}).sort((i1, i2) => i1.order - i2.order);
},
getPanelSelector(panel) {
@@ -219,14 +244,16 @@ const Logic = {
},
async showPanel(panel, currentIdentity = null, backwards = false) {
// Invalid panel... ?!?
if (!(panel in this._panels)) {
throw new Error("Something really bad happened. Unknown panel: " + panel);
}
if (!backwards || !this._currentPanel) {
this._previousPanelPath.push(this._currentPanel);
}
// If invalid panel, reset panels.
if (!(panel in this._panels)) {
panel = P_CONTAINERS_LIST;
this._previousPanelPath = [];
}
this._currentPanel = panel;
this._currentIdentity = currentIdentity;
@@ -348,6 +375,77 @@ const Logic = {
});
this._listenerSet = true;
}
},
shortcutListener(e){
function openNewContainerTab(identity) {
try {
browser.tabs.create({
cookieStoreId: identity.cookieStoreId
});
window.close();
} catch (e) {
window.close();
}
}
const identities = Logic.identities();
if ((e.keyCode >= 49 && e.keyCode <= 57) &&
Logic._currentPanel === "containersList") {
const identity = identities[e.keyCode - 49];
if (identity) {
openNewContainerTab(identity);
}
}
},
keyboardNavListener(e){
const panelSelector = Logic.getPanelSelector(Logic._panels[Logic._currentPanel]);
const selectables = [...document.querySelectorAll(`${panelSelector} .keyboard-nav[tabindex='0']`)];
const element = document.activeElement;
const backButton = document.querySelector(`${panelSelector} .keyboard-nav-back`);
const index = selectables.indexOf(element) || 0;
function next() {
const nextElement = selectables[index + 1];
if (nextElement) {
nextElement.focus();
}
}
function previous() {
const previousElement = selectables[index - 1];
if (previousElement) {
previousElement.focus();
}
}
switch (e.keyCode) {
case 40:
next();
break;
case 38:
previous();
break;
case 39:
{
if(element){
element.click();
}
// If one Container is highlighted,
if (element.classList.contains("keyboard-right-arrow-override")) {
element.querySelector(".menu-right-float").click();
}
break;
}
case 37:
{
if(backButton){
backButton.click();
}
break;
}
default:
break;
}
}
};
@@ -560,71 +658,10 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
window.close();
}
});
document.addEventListener("keydown", (e) => {
function openNewContainerTab(identity) {
try {
browser.tabs.create({
cookieStoreId: identity.cookieStoreId
});
window.close();
} catch (e) {
window.close();
}
}
const identities = Logic.identities();
const selectables = [...document.querySelectorAll(".open-newtab[tabindex='0']")];
const element = document.activeElement;
const index = selectables.indexOf(element) || 0;
function next() {
const nextElement = selectables[index + 1];
if (nextElement) {
nextElement.focus();
}
}
function previous() {
const previousElement = selectables[index - 1];
if (previousElement) {
previousElement.focus();
}
}
switch (e.keyCode) {
case 40:
next();
break;
case 38:
previous();
break;
case 39:
{
const showTabs = element.parentNode.querySelector(".show-tabs");
if(showTabs) {
showTabs.click();
}
break;
}
case 37:
{
const hideTabs = document.querySelector(".panel-back-arrow");
if(hideTabs) {
hideTabs.click();
}
break;
}
default:
if ((e.keyCode >= 49 && e.keyCode <= 57) &&
Logic._currentPanel === "containersList") {
const identity = identities[e.keyCode - 49];
if (identity) {
openNewContainerTab(identity);
}
}
break;
}
});
},
unregister() {
},
// This method is called when the panel is shown.
@@ -633,19 +670,21 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
Logic.identities().forEach(identity => {
const tr = document.createElement("tr");
tr.classList.add("menu-item", "hover-highlight");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav", "keyboard-right-arrow-override");
tr.setAttribute("tabindex", "0");
const td = document.createElement("td");
const openTabs = identity.numberOfOpenTabs || "" ;
td.innerHTML = Utils.escaped`
<div class="menu-icon">
<div class="usercontext-icon"
data-identity-icon="${identity.icon}"
data-identity-color="${identity.color}">
td.innerHTML = Utils.escaped`
<div class="menu-item-name">
<div class="menu-icon">
<div class="usercontext-icon"
data-identity-icon="${identity.icon}"
data-identity-color="${identity.color}">
</div>
</div>
<span class="menu-text">${identity.name}</span>
</div>
<span class="menu-text">${identity.name}</span>
<span class="menu-right-float">
<span class="container-count">${openTabs}</span>
<span class="menu-arrow">
@@ -657,31 +696,46 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
tr.appendChild(td);
Utils.addEnterHandler(tr, () => {
const openInThisContainer = tr.querySelector(".menu-item-name");
Utils.addEnterHandler(openInThisContainer, () => {
try {
browser.tabs.create({
cookieStoreId: identity.cookieStoreId
});
window.close();
} catch (e) {
window.close();
}
});
Utils.addEnterOnlyHandler(tr, () => {
try {
browser.tabs.create({
cookieStoreId: identity.cookieStoreId
});
window.close();
} catch (e) {
window.close();
}
});
// Select only the ">" from the container list
const showPanelButton = tr.querySelector(".menu-right-float");
Utils.addEnterHandler(showPanelButton, () => {
Logic.showPanel(P_CONTAINER_INFO, identity);
});
});
const list = document.querySelector("#identities-list");
list.innerHTML = "";
list.appendChild(fragment);
/* Not sure why extensions require a focus for the doorhanger,
however it allows us to have a tabindex before the first selected item
*/
// const focusHandler = () => {
// const identityList = list.querySelector("tr .clickable");
// if (identityList) {
// // otherwise this throws an error when there are no containers present.
// identityList.focus();
// document.removeEventListener("focus", focusHandler);
// }
// };
// document.addEventListener("focus", focusHandler);
// /* If the user mousedown's first then remove the focus handler */
// document.addEventListener("mousedown", () => {
// document.removeEventListener("focus", focusHandler);
// });
document.addEventListener("keydown", Logic.keyboardNavListener);
document.addEventListener("keydown", Logic.shortcutListener);
return Promise.resolve();
},
});
@@ -749,8 +803,8 @@ Logic.registerPanel(P_CONTAINER_INFO, {
});
// Populating the panel: name and icon
document.getElementById("container-info-title").textContent = identity.name;
const alwaysOpen = document.querySelector("#always-open-in-info-panel");
const alwaysOpen = document.querySelector("#always-open-in-info-panel");
Utils.addEnterHandler(alwaysOpen, async () => {
Utils.alwaysOpenInContainer(identity);
window.close();
@@ -822,7 +876,7 @@ Logic.registerPanel(P_CONTAINER_INFO, {
for (let tab of tabs) { // eslint-disable-line prefer-const
const tr = document.createElement("tr");
fragment.appendChild(tr);
tr.classList.add("menu-item", "hover-highlight");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tr.setAttribute("tabindex", "0");
tr.innerHTML = Utils.escaped`
<td>
@@ -841,7 +895,7 @@ Logic.registerPanel(P_CONTAINER_INFO, {
window.close();
});
const closeTab = document.querySelector(".trash-button");
const closeTab = tr.querySelector(".trash-button");
if (closeTab) {
Utils.addEnterHandler(closeTab, async (e) => {
await browser.tabs.remove(Number(e.target.id));
@@ -883,11 +937,11 @@ Logic.registerPanel(OPEN_NEW_CONTAINER_PICKER, {
Logic.identities().forEach(identity => {
const tr = document.createElement("tr");
tr.classList.add("menu-item", "hover-highlight");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tr.setAttribute("tabindex", "0");
const td = document.createElement("td");
td.innerHTML = Utils.escaped`
td.innerHTML = Utils.escaped`
<div class="menu-icon">
<div class="usercontext-icon"
data-identity-icon="${identity.icon}"
@@ -942,7 +996,7 @@ Logic.registerPanel(MANAGE_CONTAINERS_PICKER, {
document.getElementById("new-container-div").innerHTML = Utils.escaped`
<table class="menu">
<tr class="menu-item hover-highlight" id="new-container" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="new-container" tabindex="0">
<td>
<div class="menu-icon"><img alt="New Container" src="/img/new-16.svg" />
</div>
@@ -959,23 +1013,70 @@ Logic.registerPanel(MANAGE_CONTAINERS_PICKER, {
Logic.identities().forEach(identity => {
const tr = document.createElement("tr");
tr.classList.add("menu-item", "hover-highlight");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tr.setAttribute("tabindex", "0");
const td = document.createElement("td");
td.innerHTML = Utils.escaped`
td.innerHTML = Utils.escaped`
<div class="menu-icon hover-highlight">
<div class="usercontext-icon"
data-identity-icon="${identity.icon}"
data-identity-color="${identity.color}">
</div>
</div>
<span class="menu-text">${identity.name}</span>`;
<span class="menu-text">${identity.name}</span>
<span class="move-button">
<img
class="pop-button-image"
src="/img/container-move.svg"
/>
</span>`;
fragment.appendChild(tr);
tr.appendChild(td);
tr.draggable = true;
tr.dataset.containerId = identity.cookieStoreId;
tr.addEventListener("dragstart", (e) => {
e.dataTransfer.setData(CONTAINER_DRAG_DATA_TYPE, identity.cookieStoreId);
});
tr.addEventListener("dragover", (e) => {
if (e.dataTransfer.types.includes(CONTAINER_DRAG_DATA_TYPE)) {
tr.classList.add("drag-over");
e.preventDefault();
}
});
tr.addEventListener("dragenter", (e) => {
if (e.dataTransfer.types.includes(CONTAINER_DRAG_DATA_TYPE)) {
e.preventDefault();
tr.classList.add("drag-over");
}
});
tr.addEventListener("dragleave", (e) => {
if (e.dataTransfer.types.includes(CONTAINER_DRAG_DATA_TYPE)) {
e.preventDefault();
tr.classList.remove("drag-over");
}
});
tr.addEventListener("drop", async (e) => {
e.preventDefault();
const parent = tr.parentNode;
const containerId = e.dataTransfer.getData(CONTAINER_DRAG_DATA_TYPE);
let droppedElement;
parent.childNodes.forEach((node) => {
if (node.dataset.containerId === containerId) {
droppedElement = node;
}
});
if (droppedElement && droppedElement !== tr) {
tr.classList.remove("drag-over");
parent.insertBefore(droppedElement, tr);
await Logic.saveContainerOrder(parent.childNodes);
await Logic.refreshIdentities();
}
});
Utils.addEnterHandler(tr, () => {
pickedFunction(identity);
});
@@ -1009,10 +1110,10 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
const pickedFunction = function (identity) {
const newUserContextId = Utils.userContextId(identity.cookieStoreId);
Utils.reloadInContainer(
currentTab.url,
false,
currentTab.url,
false,
newUserContextId,
currentTab.index + 1,
currentTab.index + 1,
currentTab.active
);
window.close();
@@ -1022,10 +1123,10 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
if (currentTab.cookieStoreId !== "firefox-default") {
const tr = document.createElement("tr");
tr.classList.add("menu-item", "hover-highlight");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
const td = document.createElement("td");
td.innerHTML = Utils.escaped`
td.innerHTML = Utils.escaped`
<div class="menu-icon hover-highlight">
<div class="mac-icon">
</div>
@@ -1038,10 +1139,10 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
Utils.addEnterHandler(tr, () => {
Utils.reloadInContainer(
currentTab.url,
false,
currentTab.url,
false,
0,
currentTab.index + 1,
currentTab.index + 1,
currentTab.active
);
window.close();
@@ -1051,11 +1152,11 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
Logic.identities().forEach(identity => {
if (currentTab.cookieStoreId !== identity.cookieStoreId) {
const tr = document.createElement("tr");
tr.classList.add("menu-item", "hover-highlight");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tr.setAttribute("tabindex", "0");
const td = document.createElement("td");
td.innerHTML = Utils.escaped`
td.innerHTML = Utils.escaped`
<div class="menu-icon hover-highlight">
<div class="usercontext-icon"
data-identity-icon="${identity.icon}"
@@ -1096,18 +1197,18 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, {
// This method is called when the panel is shown.
prepare() {
Logic.listenToPickerBackButton();
document.getElementById("picker-title").textContent = "Reopen This Site in";
document.getElementById("picker-title").textContent = "Always Open in";
const fragment = document.createDocumentFragment();
document.getElementById("new-container-div").innerHTML = "";
Logic.identities().forEach(identity => {
const tr = document.createElement("tr");
tr.classList.add("menu-item", "hover-highlight");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tr.setAttribute("tabindex", "0");
const td = document.createElement("td");
td.innerHTML = Utils.escaped`
td.innerHTML = Utils.escaped`
<div class="menu-icon hover-highlight">
<div class="usercontext-icon"
data-identity-icon="${identity.icon}"
@@ -1196,7 +1297,7 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, {
delete assignments[siteKey];
this.showAssignedContainers(assignments);
});
trElement.classList.add("menu-item", "hover-highlight");
trElement.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tableElement.appendChild(trElement);
});
}
@@ -1213,6 +1314,9 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
initialize() {
this.initializeRadioButtons();
Utils.addEnterHandler(document.querySelector("#close-container-edit-panel"), () => {
// Resets listener from siteIsolation checkbox to keep the update queue to 0.
const siteIsolation = document.querySelector("#site-isolation");
siteIsolation.removeEventListener("change", addRemoveSiteIsolation, false);
const formValues = new FormData(this._editForm);
if (formValues.get("container-id") !== NEW_CONTAINER_ID) {
this._submitForm();
@@ -1308,14 +1412,10 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
containerName.select();
containerName.focus();
});
const siteIsolation = document.querySelector("#site-isolation");
siteIsolation.checked = !!identity.isIsolated;
siteIsolation.addEventListener( "change", function() {
browser.runtime.sendMessage({
method: "addRemoveSiteIsolation",
cookieStoreId: identity.cookieStoreId
});
});
siteIsolation.addEventListener( "change", addRemoveSiteIsolation, false);
[...document.querySelectorAll("[name='container-color']")].forEach(colorInput => {
colorInput.checked = colorInput.value === identity.color;
});
+9
View File
@@ -75,6 +75,15 @@ const Utils = {
});
},
addEnterOnlyHandler(element, handler) {
element.addEventListener("keydown", (e) => {
if (e.keyCode === 13) {
e.preventDefault();
handler(e);
}
});
},
userContextId(cookieStoreId = "") {
const userContextId = cookieStoreId.replace("firefox-container-", "");
return (userContextId !== cookieStoreId) ? Number(userContextId) : false;
+2 -1
View File
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Firefox Multi-Account Containers",
"version": "7.0.0",
"version": "7.4.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": {
@@ -25,6 +25,7 @@
"idle",
"management",
"storage",
"unlimitedStorage",
"tabs",
"webRequestBlocking",
"webRequest"
+7
View File
@@ -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>
+34 -33
View File
@@ -13,7 +13,7 @@
<p>
Use containers to organize tasks, manage accounts, and keep your focus where you want it.
</p>
<a href="#" class="onboarding-button onboarding-start-button" tabindex="0">Get Started</a>
<a href="#" class="onboarding-button onboarding-start-button keyboard-nav" tabindex="0">Get Started</a>
</div>
<div class="hide panel onboarding security-onboarding-panel-1">
@@ -22,49 +22,49 @@
<p>
Use containers to organize tasks, manage accounts, and store sensitive data.
</p>
<a href="#" class="onboarding-button onboarding-start-button" tabindex="0">Get Started</a>
<a href="#" class="onboarding-button onboarding-start-button keyboard-nav" tabindex="0">Get Started</a>
</div>
<div class="panel onboarding onboarding-panel-2 hide">
<img class="onboarding-img" alt="How Containers Work" src="/img/onboarding-2.png" />
<h3 class="onboarding-title">Put containers to work for you.</h3>
<p>Features like color-coding and separate container tabs help you find things easily, focus your attention, and minimize distractions.</p>
<a href="#" class="onboarding-button onboarding-next-button" tabindex="0">Next</a>
<a href="#" class="onboarding-button onboarding-next-button keyboard-nav" tabindex="0">Next</a>
</div>
<div class="panel onboarding security-onboarding-panel-2 hide">
<img class="onboarding-img" alt="How Containers Work" src="/img/onboarding-2.png" />
<h3 class="onboarding-title">Put containers to work for you.</h3>
<p>Color-coding helps you categorize your online life, find things easily, and minimize distractions.</p>
<a href="#" class="onboarding-button onboarding-next-button" tabindex="0">Next</a>
<a href="#" class="onboarding-button onboarding-next-button keyboard-nav" tabindex="0">Next</a>
</div>
<div class="panel onboarding onboarding-panel-3 hide">
<img class="onboarding-img" alt="How Containers Work" src="/img/onboarding-3.png" />
<h3 class="onboarding-title">A place for everything, and everything in its place.</h3>
<p>Start with the containers we've created, or create your own.</p>
<a href="#" class="onboarding-button onboarding-almost-done-button" tabindex="0">Next</a>
<a href="#" class="onboarding-button onboarding-almost-done-button keyboard-nav" tabindex="0">Next</a>
</div>
<div class="panel onboarding security-onboarding-panel-3 hide">
<img class="onboarding-img" alt="How Containers Work" src="/img/onboarding-3-security.png" />
<h3 class="onboarding-title">Set boundaries for your browsing.</h3>
<p>Cookies are stored within a container, so you can segment sensitive data and browsing history to stay organized and to limit the impact of online trackers.</p>
<a href="#" class="onboarding-button onboarding-almost-done-button" tabindex="0">Next</a>
<a href="#" class="onboarding-button onboarding-almost-done-button keyboard-nav" tabindex="0">Next</a>
</div>
<div class="panel onboarding onboarding-panel-4 hide" id="onboarding-panel-4">
<img class="onboarding-img" alt="How to assign sites to containers" src="/img/onboarding-4.png" />
<h3 class="onboarding-title">Always open sites in the containers you want.</h3>
<p>Right-click inside a container tab to assign the site to always open in the container.</p>
<a href="#" id="onboarding-done-button" class="onboarding-button" tabindex="0">Next</a>
<a href="#" id="onboarding-done-button" class="onboarding-button keyboard-nav" tabindex="0">Next</a>
</div>
<div class="panel onboarding onboarding-panel-5 hide" id="onboarding-panel-5">
<img class="onboarding-img" alt="Long-press the New Tab button to create a new container tab." src="/img/onboarding-3.png" />
<h3 class="onboarding-title">Container tabs when you need them.</h3>
<p>Long-press the New Tab button to create a new container tab.</p>
<a href="#" id="onboarding-longpress-button" class="onboarding-button" tabindex="0">Next</a>
<a href="#" id="onboarding-longpress-button" class="onboarding-button keyboard-nav" tabindex="0">Next</a>
</div>
<div class="panel onboarding onboarding-panel-6 hide" id="onboarding-panel-6">
@@ -72,8 +72,8 @@
<h3 class="onboarding-title">Syncing Containers is now Available!</h3>
<p>Turn on Sync to share container and site assignments with any computer connected to your Firefox Account.</p>
<div class="half-button-wrapper">
<a herf="#" id="no-sync" class="half-onboarding-button grey-button" tabindex="0">Not Now</a>
<a href="#" id="start-sync-button" class="half-onboarding-button" tabindex="0">Start Syncing</a>
<a herf="#" id="no-sync" class="half-onboarding-button grey-button keyboard-nav" tabindex="0">Not Now</a>
<a href="#" id="start-sync-button" class="half-onboarding-button keyboard-nav" tabindex="0">Start Syncing</a>
</div>
</div>
@@ -82,8 +82,8 @@
<h3 class="onboarding-title">Firefox Account is required to sync.</h3>
<p>Click Sign In to confirm that your Firefox Account is active.</p>
<div class="half-button-wrapper">
<a herf="#" id="no-sign-in" class="half-onboarding-button grey-button" tabindex="0">Not Now</a>
<a href="#" id="sign-in" class="half-onboarding-button" tabindex="0">Sign In</a>
<a herf="#" id="no-sign-in" class="half-onboarding-button grey-button keyboard-nav" tabindex="0">Not Now</a>
<a href="#" id="sign-in" class="half-onboarding-button keyboard-nav" tabindex="0">Sign In</a>
</div>
</div>
@@ -112,7 +112,7 @@
</span>
</a>
</p>
<a href="#" id="achievement-done-button" class="onboarding-button">Done</a>
<a href="#" id="achievement-done-button" class="onboarding-button keyboard-nav">Done</a>
</div>
<div class="panel menu-panel container-panel hide" id="container-panel">
@@ -124,7 +124,7 @@
</a>
<hr>
<table class="menu">
<tr class="menu-item hover-highlight" id="open-new-tab-in" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="open-new-tab-in" tabindex="0">
<td>
<img class="menu-icon" alt="Open in New Tab" src="/img/tab-new-16.svg" />
<span class="menu-text">Open New Tab in...</span>
@@ -133,7 +133,7 @@
</span>
</td>
</tr>
<tr class="menu-item hover-highlight" id="reopen-site-in" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="reopen-site-in" tabindex="0">
<td>
<img class="menu-icon" alt="Open in New Tab" src="/img/refresh-16.svg" />
<span class="menu-text">Reopen This Site in...</span>
@@ -145,7 +145,7 @@
</table>
<hr>
<table class="menu">
<tr class="menu-item hover-highlight" id="sort-containers-link" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="sort-containers-link" tabindex="0">
<td>
<img class="menu-icon" alt="Open in New Tab" src="/img/sort-16_1.svg" />
<span class="menu-text">Sort Tabs by Container</span>
@@ -153,7 +153,7 @@
</span>
</td>
</tr>
<tr class="menu-item hover-highlight" id="always-open-in" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="always-open-in" tabindex="0">
<td>
<img class="menu-icon" alt="Open in New Tab" src="/img/container-openin-16.svg" />
<span class="menu-text">Always Open This Site in...</span>
@@ -171,13 +171,14 @@
<table class="menu" id="identities-list">
<tr class="menu-item hover-highlight">
<td>
<div class="menu-icon">
<div class="usercontext-icon"
data-identity-icon="pet"
data-identity-color="blue">
<div class="menu-item-name">
<div class="menu-icon">
<div class="usercontext-icon"
data-identity-icon="pet"
data-identity-color="blue"></div>
</div>
<span class="menu-text">Default</span>
</div>
<span class="menu-text">Default</span>
<span class="menu-right-float">
<span class="container-count">22</span>
<span class="menu-arrow">
@@ -188,7 +189,7 @@
</tr>
</table>
</div>
<div class="bottom-btn" id="manage-containers-link" tabindex="0">
<div class="bottom-btn keyboard-nav hover-highlight" id="manage-containers-link" tabindex="0">
Manage Containers
</div>
</div>
@@ -198,10 +199,10 @@
<h3 class="title" id="container-info-title">
Personal
</h3>
<button class="btn-return arrow-left" id="close-container-info-panel" tabindex="0"></button>
<button class="btn-return arrow-left keyboard-nav-back" id="close-container-info-panel" tabindex="0"></button>
<hr>
<table class="menu">
<tr class="menu-item hover-highlight" id="open-new-tab-in-info" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="open-new-tab-in-info" tabindex="0">
<td>
<img class="menu-icon" alt="Open in New Tab" src="/img/tab-new-16.svg" />
<span class="menu-text">Open New Tab in this Container</span>
@@ -209,7 +210,7 @@
</span>
</td>
</tr>
<tr class="menu-item hover-highlight" id="hideorshow-container" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="hideorshow-container" tabindex="0">
<td>
<img id="container-info-hideorshow-icon" class="menu-icon" alt="Hide This Container" src="img/password-hide.svg" />
<span id="container-info-hideorshow-label" class="menu-text">Hide This Container</span>
@@ -217,7 +218,7 @@
</span>
</td>
</tr>
<tr class="menu-item hover-highlight" id="move-to-new-window" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="move-to-new-window" tabindex="0">
<td>
<img class="menu-icon" alt="Move Tabs to a New Window" src="/img/movetowindow-16.svg" />
<span class="menu-text">Move Tabs to a New Window</span>
@@ -225,7 +226,7 @@
</span>
</td>
</tr>
<tr class="menu-item hover-highlight hover-highlight" id="always-open" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" id="always-open" tabindex="0">
<td>
<img class="menu-icon" alt="Always Open Site in Container" src="/img/container-openin-16.svg" />
<span class="menu-text" id="always-open-in-info-panel">Always Open Site in Container</span>
@@ -240,7 +241,7 @@
</div>
<div class="scrollable">
<table class="menu" id="container-info-table">
<tr class="menu-item hover-highlight" tabindex="0">
<tr class="menu-item hover-highlight keyboard-nav" tabindex="0">
<td>
<div class="favicon"><img class="menu-icon" src="https://www.mozilla.org/favicon.ico" /></div>
<span class="menu-text truncate-text">www.mozillllllllllllllllllllllllllllllllllllla.org</span>
@@ -249,7 +250,7 @@
</tr>
</table>
</div>
<div class="bottom-btn" id="manage-container-link">
<div class="bottom-btn keyboard-nav hover-highlight" id="manage-container-link" tabindex="0">
Manage This Container
</div>
</div>
@@ -259,12 +260,12 @@
<h3 class="title" id="picker-title">
Multi-Account Containers
</h3>
<button class="btn-return arrow-left" id="close-container-picker-panel" tabindex="0"></button>
<button class="btn-return arrow-left keyboard-nav-back" id="close-container-picker-panel" tabindex="0"></button>
<hr>
<div id="new-container-div"></div>
<div class="scrollable identities-list">
<table class="menu" id="picker-identities-list">
<tr class="menu-item hover-highlight">
<tr class="menu-item hover-highlight keyboard-nav">
<td>
<div class="menu-icon">
<div class="usercontext-icon"
@@ -305,7 +306,7 @@
<input type="checkbox" class="site-isolation" id="site-isolation" name="site-isolation">
<label for="site-isolation" class="options-label">Limit to Designated Sites</label>
</div>
<div class="container-options options-label manage-assigned-sites-list" id="manage-assigned-sites-list">Manage Site List...
<div class="container-options options-label manage-assigned-sites-list" id="manage-assigned-sites-list" tabindex="0">Manage Site List...
</div>
</div>
</div>
+2 -1
View File
@@ -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();