Compare commits

...

133 Commits

Author SHA1 Message Date
Rafee 8edcb1587d Version upgrade 2024-09-10 10:57:47 -04:00
Rafee Rahman 97891f61b0 Merge pull request #2659 from dannycolin/bz#1823729
Fix bz#1823729 - Listen only for status on tab updated
2024-08-29 09:22:53 -04:00
Danny Colin 51ead29d2b Fix bz#1823729 - Listen only for status on tab updated 2024-08-28 13:52:55 -04:00
luke crouch a53eb64c03 Merge pull request #2654 from mozilla/feat-#303
#303: Reset cookies in site manager
2024-08-28 11:26:57 -05:00
Rafee c644a60e46 feat #303: ask for browsing data permission dynamically 2024-08-27 17:06:07 -04:00
Rafee 2cd38299e2 feat #303: confirmation page for clearing container storage, added destructive colors 2024-08-27 15:34:06 -04:00
luke crouch 077c7e08c8 Merge pull request #2649 from mozilla/2263-always-open-in-container-bug
Remember choice for default containers in the "Always open in" confirm page
2024-08-27 13:47:53 -05:00
Rafee 6bde0a78d7 fix #2603: remember choice when choosing 'previous' (deny) container option 2024-08-23 12:57:50 -04:00
Rafee 3debe8a36f feat #303: change individual cookie removal to browsingData api 2024-08-20 15:04:25 -04:00
Rafee 606e08d2b7 feat #303: Container storage deletion and confirmation popup 2024-08-20 13:47:36 -04:00
Danny Colin f9f5daf8f4 Merge pull request #2616 from dannycolin/bug1958
Fix #1958 - Propagate container list reordering in Firefox menus
2024-08-14 10:31:54 -04:00
Rafee ffbb740445 feat #303: reset cookies in site manager 2024-08-01 18:13:58 -04:00
Rafee cd343ab8c3 fix #2603: remember choice to always open in default containers 2024-07-23 11:42:01 -04:00
Danny Colin 1537e9f6f2 Merge pull request #2634 from mozilla/missingTranslation
Missing translation for a contextmenu item
2024-04-22 15:35:47 -04:00
Andrea Marchesini f94c00b68a Missing translation for a contextmenu item 2024-04-17 14:59:56 +02:00
Danny Colin 0acc48af48 Merge pull request #2628 from emilio/icon-macos-fix
Explicitly specify width and height in SVG icon.
2024-03-04 10:33:04 -05:00
Emilio Cobos Álvarez cb96bf385b Explicitly specify width and height in SVG icon.
To work around https://bugzil.la/1883166.
2024-03-02 02:39:13 +01:00
Danny Colin 6fd2b70032 Merge pull request #2622 from emilio/release-changes-back-to-main
Release changes back to main
2024-02-23 18:49:22 -05:00
maxxcrawford f5aec9cb5a Add latest strings 2024-02-23 20:41:34 +01:00
maxxcrawford 9469ed424e Bump version number to 8.1.3 2024-02-23 20:41:10 +01:00
Danny Colin 7305b54635 Fix #1958 - Propagate container list reordering in Firefox menus
Since Fx 123, we have a new API (contextualIdentities.move) that let
us reorder the container list everywhere in Firefox. This patch
looks if the API is supported by the client and propagate the change
if it's the case.
2024-02-13 13:56:45 -05:00
Danny Colin 018b458ef6 Merge pull request #2599 from abhillman/abhillman/shebang-bash-with-env
Use `/usr/bin/env` to find bash
2023-11-28 19:51:22 -05:00
Danny Colin 6573123af5 Merge pull request #2587 from dannycolin/issue2553-shortcut-preventdefault
Revert monitoring modifier in popup shortcuts
2023-11-20 09:40:09 -05:00
Aryeh Hillman 4a9bc37a46 Use /usr/bin/env to find bash
This enables `npm test` to successfully call scripts in `bin/` with
the `bash` binary specified by `PROFILE`.

---

Additional information:

In addition to potentially preferring an alternative version of bash
than the one in `/bin/bash`, some distributions forego storing bash in
`bin/` at all, such as `NixOS`:

```bash
$ cat /etc/os-release | rg '^NAME=' -r ''
NixOS
$ which bash
/run/current-system/sw/bin/bash
```
2023-11-17 15:55:12 -08:00
Danny Colin 59e951e5d2 Merge pull request #2578 from dannycolin/bug1852393-icon-in-toolbar-by-default
Add MAC icon in toolbar on install
2023-10-16 14:32:34 -04:00
Danny Colin 4d4851d058 Merge pull request #2577 from dannycolin/fxa-rebrand
Rebrand Firefox Account
2023-10-16 14:25:57 -04:00
Danny Colin dd574bbe99 Merge pull request #2558 from leodag/fix-pr-template
fix: correct pull request template placement
2023-10-14 18:38:00 -04:00
Leonardo Dagnino 6374a28932 fix: correct pull request template placement 2023-10-14 19:05:45 -03:00
Danny Colin 6a9afcf266 Revert monitoring modifier in popup shortcuts 2023-10-13 14:45:32 -04:00
Danny Colin bea1cdcf87 Merge pull request #2584 from emilio/icons
Use color-scheme-aware icons.
2023-10-10 22:13:40 -04:00
Emilio Cobos Álvarez 3779f86088 Make icons react to color-scheme properly.
Note that due to https://bugzilla.mozilla.org/show_bug.cgi?id=1779457 /
https://github.com/w3c/csswg-drafts/issues/7213, prefers-color-scheme
works fine even if the user has an explicitly light theme or so.

This fixes #2583 entirely.
2023-10-09 00:57:23 +02:00
Emilio Cobos Álvarez bb24647ff3 Make usercontext.svg use color-scheme-aware colors.
Fixes the individual icons in #2583.
2023-10-09 00:45:37 +02:00
Danny Colin 60466258b8 Rebrand Firefox Account
* Change Firefox Account to account
* Add brand=mozilla to accounts.firefox.com URLs
2023-10-02 13:13:17 -04:00
Danny Colin dd4020069c Add MAC icon in toolbar on install 2023-09-23 19:31:01 -04:00
luke crouch 60b40a2d9f Merge pull request #2562 from mozilla/fix-issue-template
Fix issue template
2023-08-11 09:57:42 -05:00
Danny Colin 1142c73812 Fix issue template
There's an escape character that breaks our issue template and prevents it to be parsed by Github. This patch removes it.
2023-08-10 14:05:34 -04:00
Danny Colin f20688c453 Merge pull request #2543 from dannycolin/i18n-remove-hardcoded-strings
Fix missing i18n strings in the UI
2023-06-27 21:33:52 -04:00
Danny Colin f85d75188a Fix missing i18n strings in the UI
This patch fix all the missing i18n strings in the UI. It also
standardize the main title to "Firefox Multi-Account Containers"
everywhere we use it in the addon.
2023-06-19 19:41:10 -04:00
Danny Colin dae7d92595 Merge pull request #2501 from dannycolin/popup-shortcuts
Rework shortcut listener logic for the addon popup
2023-06-17 16:00:37 -04:00
Danny Colin ef10307898 Rework shortcut listener logic for the addon popup
- Add Slash shortcut to focus search input
- Use event.code instead of event.keyCode
- Cancel [0-9] shortcuts when modified is pressed
- Cancel [0-9] shortcuts when search input is focused
2023-06-17 15:58:04 -04:00
Danny Colin b29ba2094e Merge pull request #2492 from dannycolin/bug-2457-sort-shortcut
Fix 2457 - add shortcut for sorting tabs by container
2023-06-08 11:55:27 -04:00
Andrea Marchesini f7e9deebda Merge pull request #2505 from mozilla/dependabot/npm_and_yarn/cacheable-request-10.2.7
Bump cacheable-request from 10.2.3 to 10.2.7
2023-03-11 05:05:23 -05:00
Danny Colin 473495ec0c Merge pull request #2509 from drien/main
Add `file:` protocol to non-permissible protocol list
2023-02-23 18:03:55 -05:00
Adrien Delessert 38cdf0a98c Merge branch 'mozilla:main' into main 2023-02-23 17:55:44 -05:00
Maxx Crawford 69bfac12de Merge pull request #2511 from mozilla/revert-2506-npx-test-fix-fix
Fix Build and Test Github CI Scripts
2023-02-22 11:26:39 -06:00
Maxx Crawford 2dfd1ee4bb Update build script to use npx instead of npm bin bash scripting 2023-02-22 11:23:45 -06:00
Danny Colin 37e0caec25 Merge pull request #2506 from mozilla/npx-test-fix
Fix failing test install by replacing $(npm bin) with npx
2023-02-20 11:39:50 -05:00
Adrien Delessert 2894de1127 Add file: protocol to non-permissible list 2023-02-16 12:39:44 -05:00
Maxx Crawford e71cd19883 Fix failing test install by replacing (npm bin) with npx 2023-02-13 13:14:54 -06:00
dependabot[bot] caa52cebf4 Bump cacheable-request from 10.2.3 to 10.2.7
Bumps [cacheable-request](https://github.com/jaredwray/cacheable-request) from 10.2.3 to 10.2.7.
- [Release notes](https://github.com/jaredwray/cacheable-request/releases)
- [Commits](https://github.com/jaredwray/cacheable-request/commits)

---
updated-dependencies:
- dependency-name: cacheable-request
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-11 00:28:54 +00:00
Danny Colin 0bcac2a741 Merge pull request #2499 from mozilla/dependabot/npm_and_yarn/fast-json-patch-and-addons-linter-and-web-ext-3.1.1
Bump fast-json-patch, addons-linter and web-ext
2023-02-07 14:30:48 -05:00
dependabot[bot] 1445c9c3db Bump fast-json-patch, addons-linter and web-ext
Bumps [fast-json-patch](https://github.com/Starcounter-Jack/JSON-Patch) to 3.1.1 and updates ancestor dependencies [fast-json-patch](https://github.com/Starcounter-Jack/JSON-Patch), [addons-linter](https://github.com/mozilla/addons-linter) and [web-ext](https://github.com/mozilla/web-ext). These dependencies need to be updated together.


Updates `fast-json-patch` from 2.2.1 to 3.1.1
- [Release notes](https://github.com/Starcounter-Jack/JSON-Patch/releases)
- [Commits](https://github.com/Starcounter-Jack/JSON-Patch/compare/v2.2.1...3.1.1)

Updates `addons-linter` from 5.24.0 to 5.28.0
- [Release notes](https://github.com/mozilla/addons-linter/releases)
- [Commits](https://github.com/mozilla/addons-linter/compare/5.24.0...5.28.0)

Updates `web-ext` from 7.4.0 to 7.5.0
- [Release notes](https://github.com/mozilla/web-ext/releases)
- [Commits](https://github.com/mozilla/web-ext/compare/7.4.0...7.5.0)

---
updated-dependencies:
- dependency-name: fast-json-patch
  dependency-type: indirect
- dependency-name: addons-linter
  dependency-type: direct:development
- dependency-name: web-ext
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 21:47:50 +00:00
Danny Colin e2628a20ac Merge pull request #2497 from mozilla/dependabot/npm_and_yarn/http-cache-semantics-4.1.1
Bump http-cache-semantics from 4.1.0 to 4.1.1
2023-02-06 16:46:01 -05:00
dependabot[bot] a30499ecfd Bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-04 19:49:54 +00:00
Danny Colin c948a9501d Fix 2457 - add shortcut for sorting tabs by container 2023-01-23 18:49:39 -05:00
Danny Colin a91c6b09a9 Merge pull request #2427 from mozilla/add-helper-dev-scripts
Add remove/restore scripts for nested .git folder
2023-01-09 19:11:07 -05:00
Danny Colin 0b2347834c Merge pull request #2485 from mozilla/dependabot/npm_and_yarn/json5-2.2.3
Bump json5 from 2.2.1 to 2.2.3
2023-01-09 19:08:53 -05:00
dependabot[bot] d5e14aa628 Bump json5 from 2.2.1 to 2.2.3
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 17:46:13 +00:00
Danny Colin 95f598c25c Merge pull request #2476 from mozilla/dependabot/npm_and_yarn/got-and-addons-linter-12.5.3
Bump got and addons-linter
2022-12-14 12:02:51 -05:00
Danny Colin 16a6e21bc5 Merge pull request #2475 from mozilla/dependabot/npm_and_yarn/express-and-addons-linter--removed
Bump express and addons-linter
2022-12-14 12:02:13 -05:00
Danny Colin 781b1caeb5 Merge pull request #2473 from mozilla/dependabot/npm_and_yarn/decode-uri-component-0.2.2
Bump decode-uri-component from 0.2.0 to 0.2.2
2022-12-14 11:59:59 -05:00
dependabot[bot] c9786f28da Bump decode-uri-component from 0.2.0 to 0.2.2
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 16:57:32 +00:00
dependabot[bot] 2196098512 Bump got and addons-linter
Bumps [got](https://github.com/sindresorhus/got) to 12.5.3 and updates ancestor dependency [addons-linter](https://github.com/mozilla/addons-linter). These dependencies need to be updated together.


Updates `got` from 8.3.2 to 12.5.3
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v8.3.2...v12.5.3)

Updates `addons-linter` from 3.23.0 to 5.24.0
- [Release notes](https://github.com/mozilla/addons-linter/releases)
- [Commits](https://github.com/mozilla/addons-linter/compare/3.23.0...5.24.0)

---
updated-dependencies:
- dependency-name: got
  dependency-type: indirect
- dependency-name: addons-linter
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 16:57:23 +00:00
dependabot[bot] 31e1f4478d Bump express and addons-linter
Removes [express](https://github.com/expressjs/express). It's no longer used after updating ancestor dependency [addons-linter](https://github.com/mozilla/addons-linter). These dependencies need to be updated together.


Removes `express`

Updates `addons-linter` from 3.23.0 to 5.24.0
- [Release notes](https://github.com/mozilla/addons-linter/releases)
- [Commits](https://github.com/mozilla/addons-linter/compare/3.23.0...5.24.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
- dependency-name: addons-linter
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 16:57:20 +00:00
Danny Colin 12fab97d62 Merge pull request #2461 from mozilla/dependabot/npm_and_yarn/minimatch-and-mocha-3.1.2
Bump minimatch and mocha
2022-12-14 11:56:42 -05:00
dependabot[bot] e45883d6bc Bump minimatch and mocha
Bumps [minimatch](https://github.com/isaacs/minimatch) to 3.1.2 and updates ancestor dependency [mocha](https://github.com/mochajs/mocha). These dependencies need to be updated together.


Updates `minimatch` from 3.0.4 to 3.1.2
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

Updates `mocha` from 6.2.3 to 10.1.0
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v6.2.3...v10.1.0)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
- dependency-name: mocha
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 17:07:03 +00:00
Danny Colin 6594a061d6 Merge pull request #2460 from mozilla/version-bump-package-json
version bump package json
2022-11-29 12:05:29 -05:00
Danny Colin 65a36ee5be Merge pull request #2428 from dannycolin/radio-hover-css
Fix broken radio focus styling in light mode
2022-11-29 12:05:10 -05:00
Maxx Crawford 00fd9b7aab Merge pull request #2432 from dannycolin/update-l10n
update l10n to get the missing strings in 8.1.0 build
2022-11-29 10:14:07 -06:00
Maxx Crawford 4d1acc1d8e Generate package-lock.json locally with correct versions of node, npm 2022-11-29 10:09:32 -06:00
Danny Colin 2f99ec4613 Merge pull request #2450 from dannycolin/revert-2231
Backout #2231 from 8.1.0
2022-11-29 10:47:59 -05:00
Maxx Crawford 0070f9c942 Bump version number to 8.1.1 2022-11-29 09:44:07 -06:00
Maxx Crawford 00beddc4cd Add package-lock.json to tracked files 2022-11-29 09:43:50 -06:00
Danny Colin 8e7d9f7574 Revert "Excluding containers from sync with RegExp"
This reverts commit bf31fa9196.
2022-11-18 23:40:58 -05:00
Danny Colin 06c897583b Revert "Fix empty sync exclude regexp behavior (#2383)"
This reverts commit e5fa98d69e.
2022-11-18 23:40:46 -05:00
Danny Colin f41139402e update l10n 2022-10-26 13:55:06 -04:00
Danny Colin c4b0823526 bump version to 8.1.1 2022-10-20 17:58:06 -04:00
Danny Colin 5ccf55cbd1 Fix broken radio focus styling in light mode 2022-10-20 14:57:18 -04:00
Maxx Crawford 7256456463 Add missing build script to package.json and ignore root build directory 2022-10-20 09:47:51 -05:00
Maxx Crawford 035450ae96 Add remove/restore scripts for nested .git folder
The /src/_locales/.github folder causes `web-ext run` to fail when running the npm dev script. This folder removal isn't tracked or surfaced during local dev work when working from the root directory.
2022-10-20 09:29:51 -05:00
Danny Colin a7aaacd82c Merge pull request #2422 from dannycolin/issue-2421
Fix #2421 - Truncate text to ensure the delete icon is visible
2022-10-13 11:07:23 -04:00
Danny Colin 638524ad67 Merge pull request #2424 from eemeli/bug-1794329
Account for moved aboutNetError.css in Firefox 107
2022-10-11 09:25:14 -04:00
Danny Colin 4e91a86072 Keep both files 2022-10-11 09:22:48 -04:00
Eemeli Aro 9597c1bdab Account for moved aboutNetError.css in Firefox 107 2022-10-10 10:18:06 +03:00
Danny Colin 441f6c6c34 Fix #2421 - Truncate text to ensure the delete icon is visible 2022-10-06 19:29:23 -04:00
Danny Colin 80970dbe02 Merge pull request #2410 from mozilla/bump-version-to-8.1.0
bump version to 8.1.0
2022-08-31 14:27:21 -04:00
luke crouch e8baa00935 bump version to 8.1.0 2022-08-31 11:14:12 -05:00
luke crouch d642f132fc Merge pull request #2405 from dannycolin/update-deps
Update minimal version of web-ext
2022-08-10 15:52:57 -05:00
Danny Colin 233c2a5498 Update minimal version of web-ext
This removes all the critical and high vulnerabilities
2022-08-10 16:21:45 -04:00
luke crouch 54a2254763 Merge pull request #2403 from dannycolin/update-bug-template
Make Troubleshooting Information optional
2022-08-04 09:05:29 -05:00
Danny Colin 3d5785df4b Make Troubleshooting Information optional 2022-08-04 09:47:06 -04:00
luke crouch 4508c940ae Merge pull request #2391 from dannycolin/issue-2168
Fix #2168 Use a different l10n string for sites opened in no container
2022-08-01 09:08:46 -05:00
Danny Colin 222d4e7d37 Fix #2168 Use a different l10n string for sites opened in no container 2022-07-27 19:48:39 -04:00
Danny Colin b69b839fa4 Merge pull request #2390 from dannycolin/issue-1103
Add ability to filter the container list
2022-07-27 12:48:17 -04:00
Danny Colin 47062d2bea add ability to filter the container list 2022-07-21 17:30:16 -04:00
Danny Colin 12dd2ee05c Merge pull request #2389 from polarn/fix-contrib-submodule-doc
fix git submodule command doc
2022-07-18 19:37:26 -04:00
Marcus Johansson 8dcb561468 fix git submodule command doc 2022-07-18 15:35:28 +02:00
stoically 2f32c915a9 Merge pull request #1141 from stoically/delete-identitystate
Remove identityState when deleting containers
2022-07-15 20:12:03 +02:00
Danny Colin 7dee05ec1f Merge pull request #2384 from dannycolin/clean-documentation
Update documentation and templates
2022-07-08 18:21:05 -04:00
stoically e5fa98d69e Fix empty sync exclude regexp behavior (#2383) 2022-07-07 01:39:58 +02:00
Danny Colin ee3ead965f Use local web-ext for the dev environment 2022-07-05 13:32:26 -04:00
Danny Colin b66e0fa6a3 Update CONTRIBUTING.md
Co-authored-by: Maxx Crawford <maxx.crawford@gmail.com>
2022-07-05 12:26:27 -04:00
Danny Colin 78423a17af update contributing section 2022-06-24 17:16:30 -04:00
Danny Colin 6b02da4dc1 add pull request template 2022-06-24 16:55:03 -04:00
Danny Colin ecaee4bcf9 Update documentation 2022-06-24 16:51:15 -04:00
Danny Colin a399f8452b Merge pull request #2231 from stoically/stoically/feat/sync-exclude-regexp
Excluding containers from sync with RegExp
2022-06-23 14:27:26 -04:00
stoically 76d5b36563 Remove identityState when deleting containers
Fixes #1140
2022-06-23 01:46:02 +02:00
stoically bf31fa9196 Excluding containers from sync with RegExp 2022-06-23 00:28:54 +02:00
Danny Colin 66b90006bd Merge pull request #2380 from dannycolin/issue-2377
Fix #2377 Tooltip renders off viewport when hovering over a container assigned to VPN.
2022-06-21 15:57:28 -04:00
Danny Colin c64df9f260 Use browser builtin tooltip
If the containers list is too long, the tooltip is rendered outside the visible area. Using the builtin tooltip ensures that it is always rendered on top of all the items and so it prevents it to be hidden if the list overflow.
2022-06-21 11:29:06 -04:00
Danny Colin af73c1a401 Merge pull request #2374 from dannycolin/add-bug-template
Fix rendering for Troubleshooting info section
2022-06-09 16:39:59 -04:00
Danny Colin a55f7411f8 Fix rendering for Troubleshooting info section 2022-06-08 18:57:00 -04:00
luke crouch 27401a5678 Merge pull request #2367 from dannycolin/add-bug-template
Update issue menu
2022-05-20 12:36:43 -05:00
Danny Colin 73e690a559 Update issue menu
- Remove en-US in SUMO URLs so it redirects the user to right locales
- Make it clearer that Ask a question is about support questions
2022-05-19 19:47:09 -04:00
luke crouch cdc014e3ee Merge pull request #2366 from dannycolin/add-bug-template
Update the "new issue" template
2022-05-19 07:38:48 -05:00
Danny Colin 352131a8f9 Delete deprecated bug template 2022-05-18 19:50:54 -04:00
Danny Colin da942a8def Add a "new issue" menu
This menu offers different options to redirect the user to the right resources for their issue.
2022-05-18 19:50:10 -04:00
Danny Colin ce63dc2f6b Add a new bug template 2022-05-18 19:48:50 -04:00
Danny Colin adeab46229 Merge pull request #1964 from dannycolin/issue-1948
fix #1948 Add option to select a light/dark theme
2022-05-11 17:08:57 -04:00
Andrea Marchesini e47b26698f Merge pull request #2355 from rodcul/hyphens-in-proxy
Also allow hyphens in proxy username/password
2022-05-11 15:08:51 -04:00
Danny Colin aaef0fd4a6 Fix elements styling to follow the Proton Design System more closely
This includes fixes for the hover, active and focus states of all the
elements that didn't have one.
2022-05-10 20:51:34 -04:00
Rodney Cullen 931e0a4c13 Also allow hyphens in proxy username/password 2022-05-09 14:10:14 +01:00
Andrea Marchesini 873ba0ab09 Merge pull request #2346 from mozilla/order
Fix the tab sorting for custom container ordering - MAC-710
2022-05-02 16:15:20 +02:00
Andrea Marchesini beb6a40231 Merge pull request #2347 from ranjan-purbey/main
Make "default container" entry keyboard navigable
2022-05-02 12:13:46 +02:00
Ranjan Purbey a8f22944b9 Make "default container" entry kbd navigable
Allows selecting "default container" in "reopen this site in" identity picker
 using keyboard
2022-04-30 00:59:58 +05:30
Andrea Marchesini d6c6ce6e67 Fix the tab sorting for custom container ordering - MAC-710 2022-04-29 01:29:54 +02:00
Andrea Marchesini ba5c58ccbb Merge pull request #2343 from flodolo/gh_test
Use GitHub Actions for testing
2022-04-27 17:26:16 +02:00
Francesco Lodolo [:flod] fd1200fcfe Use GitHub Actions for testing 2022-04-27 16:25:57 +02:00
Andrea Marchesini 847fba26a9 Merge pull request #2340 from mozilla/MAC709
Refresh the UI even when there are no proxy settings - MAC-709
2022-04-26 07:39:23 +02:00
Andrea Marchesini d4e9502e94 Merge pull request #2333 from eladyn/proxy_proxyDNS_fix
enable proxyDNS only for supported proxies (SOCKS4/5)
2022-04-25 19:52:48 +02:00
Andrea Marchesini 5d7b970f1c Refresh the UI even when there are no proxy settings - MAC-709 2022-04-25 09:10:41 +02:00
eladyn 0b869a139a improve proxy type matching
Co-authored-by: nekno <nekno@users.noreply.github.com>
2022-04-21 14:09:38 +02:00
eladyn 0ef50dd2f0 enable proxyDNS only for supported proxies (SOCKS4/5) 2022-04-19 16:21:56 +02:00
45 changed files with 26415 additions and 746 deletions
+1
View File
@@ -19,6 +19,7 @@ module.exports = {
"OS": true, "OS": true,
"ADDON_UNINSTALL": true, "ADDON_UNINSTALL": true,
"ADDON_DISABLE": true, "ADDON_DISABLE": true,
"CONTAINER_ORDER_STORAGE_KEY": true,
"proxifiedContainers": true, "proxifiedContainers": true,
"MozillaVPN": true, "MozillaVPN": true,
"MozillaVPN_Background": true "MozillaVPN_Background": true
-27
View File
@@ -1,27 +0,0 @@
<!--
Feel free to ignore this Issue template if you just want to ask or suggest something. If you experience an Issue then please provide all asked information.
Also please make sure that:
- "Firefox will: Never remember history" in the Firefox Preferences/Options under "Privacy & Security > History" is NOT selected
- You are NOT using Firefox in a Private Window
- You can see a grayed out but ticked Checkbox with the description "Enable Container Tabs" in the Firefox Preferences/Options under "Tabs"
-->
- Multi-Account Containers Version:
- Operating System + Version:
- Firefox Version:
- Other installed Add-ons + Version + Enabled/Disabled-Status:
<!-- To be able to copy & paste the full list of your Add-ons navigate to "about:support" and scroll down to "Extensions" -->
### Actual behavior
### Expected behavior
### Steps to reproduce
1.
2.
3.
### Notes
+53
View File
@@ -0,0 +1,53 @@
name: Bug Report
description: Report a problem in Multi-Account Containers
labels: [bug]
body:
- type: checkboxes
id: before-bug-report
attributes:
label: Before submitting a bug report
options:
- label: "I updated to the latest version of Multi-Account Container and tested if I can reproduce the issue"
required: true
- label: "I searched for existing reports to see if it hasn't already been reported"
required: true
- type: textarea
id: step_to_reproduce
attributes:
label: "Step to reproduce"
description: "Provide a list of steps you did to trigger this bug"
placeholder: |
1. I opened ...
2. I clicked on ...
3. ...
validations:
required: true
- type: textarea
id: actual_behavior
attributes:
label: "Actual behavior"
description: "Provide a description of what is currently happening"
validations:
required: true
- type: textarea
id: expected_behavior
attributes:
label: "Expected behavior"
description: "Provide a description of what should happen"
validations:
required: true
- type: textarea
id: additional_informations
attributes:
label: "Additional informations"
description: "Provide any other information revelant to this issue"
validations:
required: false
- type: textarea
id: about_support
attributes:
label: "Provide a copy of Troubleshooting Information page (optional)"
description: "To get a copy of the Troubleshooting Information page, type *about:support* in the address bar and click on the *Copy text to clipboard* button."
render: "plain text"
validations:
required: false
+17
View File
@@ -0,0 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: "Explore our help articles"
url: "https://support.mozilla.org/kb/containers"
about: "Dig into the knowledge base, tips and tricks, troubleshooting, and so much more."
- name: "Ask a support question"
url: "https://support.mozilla.org/questions/new/desktop/form"
about: "Get support from our contributors or staff members."
- name: "Submit new ideas"
url: "https://connect.mozilla.org/t5/discussions/how-to-submit-a-great-idea-in-five-easy-steps/td-p/24"
about: "Have an idea for a new product feature? Share it with our community and staff members!"
- name: "Discussions"
url: "https://connect.mozilla.org/t5/discussions/bd-p/discussions"
about: "Give feedback and participate in meaningful conversations with the community and Mozilla employees"
- name: "Discover more awesome tools"
url: "https://www.mozilla.org/firefox/products/"
about: "Learn more about other products from Mozilla"
+24
View File
@@ -0,0 +1,24 @@
**Before submitting your pull request**
- [ ] I agree to license my code under the [MPL 2.0 license](https://www.mozilla.org/en-US/MPL/2.0/).
- [ ] I rebased my work on top of the main branch.
- [ ] I ran `npm test` and all tests passed.
- [ ] I added test coverages if relevant.
# Description
*Please include a summary of the changes including relevant motivation and context.*
## Type of change
*Select all that apply.*
- [ ] Bug fix
- [ ] New feature
- [ ] Major change (fix or feature that would cause existing functionality to work differently than in the current version)
Tag issues related to this pull request:
*
*
*
+4 -4
View File
@@ -9,16 +9,16 @@ on:
- main - main
- production - production
schedule: schedule:
- cron: '0 2 * * *' # Daily at 2AM UTC - cron: '0 2 * * *' # Daily at 2AM UTC
jobs: jobs:
builds: builds:
name: Builds name: Builds
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
steps: steps:
- name: Clone repository - name: Clone repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Create the package - name: Create the package
shell: bash shell: bash
@@ -26,7 +26,7 @@ jobs:
./bin/build-addon.sh nightly.xpi ./bin/build-addon.sh nightly.xpi
- name: Uploading - name: Uploading
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: ${{matrix.config.name}} Build name: ${{matrix.config.name}} Build
path: src/web-ext-artifacts path: src/web-ext-artifacts
+28
View File
@@ -0,0 +1,28 @@
name: Test
on:
push:
branches:
- main
- production
pull_request:
branches:
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Run tests
run: npm run test
+1 -1
View File
@@ -1,5 +1,4 @@
.DS_Store .DS_Store
package-lock.json
node_modules node_modules
README.html README.html
*.xpi *.xpi
@@ -9,6 +8,7 @@ README.html
addon.env addon.env
src/web-ext-artifacts/* src/web-ext-artifacts/*
web-ext-artifacts
# JetBrains IDE files # JetBrains IDE files
.idea .idea
-10
View File
@@ -1,10 +0,0 @@
language: node_js
node_js:
- "lts/*"
notifications:
irc:
- "ircs://irc.mozilla.org:6697/#testpilot-containers-bots"
install:
- npm install --legacy-peer-deps
+27 -24
View File
@@ -1,35 +1,38 @@
# Contributing # Contributing
Everyone is welcome to contribute to containers. Reach out to team members if you have questions: ## Requirements
- Matrix chat: [#containers:mozilla.org](https://matrix.to/#/#containers:mozilla.org) * Firefox 91.1.0+
- Email: containers@mozilla.com * Git 2.13+
* Node 7+
## Filing bugs ## Getting Started
If you find a bug with containers, please file a issue. 1. Follow the instructions on [How to fork a repository][fork]
2. Fetch the locales:
Check first if the bug might already exist: https://github.com/mozilla/multi-account-containers/issues ```
cd multi-account-containers
git submodule update --init
```
3. Install the project dependencies
```
npm install --legacy-peer-deps
```
4. Run `npm run dev`.
[Open an issue](https://github.com/mozilla/multi-account-containers/issues/new) ## Translations
1. Visit about:support The translations are located in `src/_locales`. This directory is a git
2. Click "Copy raw data to clipboard" and paste into the bug. Alternatively copy the following sections into the issue: repository like any other. Before editing files in this folder, you need to:
- Application Basics
- Nightly Features (if you are in nightly)
- Extensions
- Experimental Features
3. Include clear steps to reproduce the issue you have experienced.
4. Include screenshots if possible.
## Sending Pull Requests 1. `cd src/_locales/`
2. `git checkout -b message-updates-yyyymmdd`
3. `git push -u origin message-updates-yyyymmdd`
Patches should be submitted as pull requests. When submitting patches as PRs: You can then [open a pull request][pr] on [the l10n repository][l10n].
- You agree to license your code under the project's open source license (MPL 2.0). [fork]: https://docs.github.com/en/get-started/quickstart/fork-a-repo
- Base your branch off the current master (see below for an example workflow). [l10n]: https://github.com/mozilla-l10n/multi-account-containers-l10n/
- Add both your code and new tests if relevant. [pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
- Run npm test to make sure all tests still pass. [web-ext]: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext
- Please do not include merge commits in pull requests; include only commits with the new relevant code.
See the main [README](./README.md) for information on prerequisites, installing, running and testing.
View File
+21 -98
View File
@@ -1,109 +1,32 @@
# Multi-Account Containers # Multi-Account Containers
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/) [![Test](https://github.com/mozilla/multi-account-containers/actions/workflows/test.yaml/badge.svg)](https://github.com/mozilla/multi-account-containers/actions/workflows/test.yaml)
[Available on addons.mozilla.org](https://addons.mozilla.org/firefox/addon/multi-account-containers/) 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!
For more info, see: Learn more about Multi-Account Containers in
[our end-user documentation][enduser].
* [Test Pilot Product Hypothesis Document](https://docs.google.com/document/d/1WQdHTVXROk7dYkSFluc6_hS44tqZjIrG9I-uPyzevE8/edit#) ## Contributing
* [Shield Product Hypothesis Document](https://docs.google.com/document/d/1vMD-fH_5hGDDqNvpRZk12_RhCN2WAe4_yaBamaNdtik/edit#)
Everyone is welcome to contribute to Multi-Account Containers. To learn how
to contribute a patch to Multi-Account Container, please
[read our contributing guide][contributing].
## Requirements You can also chat with us on [our Matrix room][matrix] or [our forum][forum].
* node 7+ (for jpm) This repository is governed by Mozilla's code of conduct and etiquette
* Firefox 91.1.0+ guidelines. For more details, [please read the Mozilla Community Participation Guidelines][cpg].
### License
## Development This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
### Running Locally <!-- Please keep the list in alphabetical order -->
[contributing]: CONTRIBUTING.md
#### Via WebExtensions API (web-ext) [cpg]: https://www.mozilla.org/about/governance/policies/participation/
[enduser]: https://support.mozilla.org/en-US/kb/containers
1. Fetch the locales updating the git-submodules: `git submodule init && git submodule update --remote --depth 1 src/_locales` [forum]: https://discourse.mozilla.org/c/containers/223
2. Install the [web-ext](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext) tool. [matrix]: https://matrix.to/#/#containers:mozilla.org
3. 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. Fetch the locales updating the git-submodules: `git submodule init && git submodule update --remote --depth 1 src/_locales`
2. Open the `about:debugging` page in Firefox.
3. Click on `This Firefox`.
4. Click on [Load Temporary Add-on](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox).
5. Select `src/manifest.json`.
Here is a [video](https://www.youtube.com/watch?v=cer9EUKegG4) that demonstrates how to do this.
### Testing
* Install dependencies:
```
npm install
```
* 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.
#### Add/update messages for translation
The `src/_locales` directory is a git repository like any other, so to make changes to the messages:
1. Make whatever changes you need in `src/_locales/en` as you work.
2. `cd src/_locales/en`
3. `git branch message-updates-yyyymmdd`
4. `git push -u origin message-updates-yyyymmdd`
You can then open a pull request from the `message-updates-yyyymmdd` branch to
[the l10n repo](https://github.com/mozilla-l10n/multi-account-containers-l10n/) `main` branch.
### Distributing
#### Make the new version
1. Bump the version number in `package.json` and `manifest.json`
2. Commit the version number bump
3. Create a git tag for the version: `git tag <version>`
4. Push the tag up to GitHub: `git push --tags`
#### Publish to AMO
1. `./bin/build-addon.sh`
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/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"
* Release notes: copy the output of `git log --no-merges --pretty=format:"%h %s" <previous-version>..<new-version>`
* Attach binaries: select the signed `.xpi` file
### Links
Facebook & Twitter icons CC-Attrib https://fairheadcreative.com.
- [License](./LICENSE.txt)
- [Contributing](./CONTRIBUTING.md)
- [Code Of Conduct](./CODE_OF_CONDUCT.md)
+2 -2
View File
@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this # License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -32,4 +32,4 @@ rm -rf $TMPDIR/src/_locales/.github || die
print G "done." print G "done."
print Y "Running the test..." print Y "Running the test..."
$(npm bin)/addons-linter $TMPDIR/src || die npx addons-linter $TMPDIR/src || die
+2 -2
View File
@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this # License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -23,4 +23,4 @@ if [[ $# -gt 0 ]]; then
EXTRA_PARAMS="--filename $1" EXTRA_PARAMS="--filename $1"
fi fi
$(npm bin)/web-ext build --overwrite-dest $EXTRA_PARAMS || die npx web-ext build --overwrite-dest $EXTRA_PARAMS || die
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this # License, v. 2.0. If a copy of the MPL was not distributed with this
-31
View File
@@ -1,31 +0,0 @@
# Acceptance Criteria
## User Experience
- [ ] It should place a containers button on the users browser toolbar
- [ ] It should include all containers management UI inside a door hanger from this toolbar button
- [ ] It should provide a set of default container choices for users to pick from (work, home, travel etc.)
- [ ] Each container type should have a color, icon and name
- [ ] It should allow users to create new containers
- [ ] It should allow users to delete containers
- [ ] It should allow users to open container tabs
- [ ] each container tab should be clearly demarcated by color/icon etc.
- [ ] It should provide a control to show/hide all open tabs of one container type
- [ ] It should provide a control to sort tabs by container type
- [ ] It should provide a control to allow users to open containers in new tab or new window by default
## User Experience Non-Requirements (out of scope)
- [ ] It should not show any UI in browser settings
- [ ] It should not effect the awesome bar
- [ ] It should not effect the Firefox Library
- [ ] It should not make any changes to sync functionality
## Measurements
- [ ] It should measure container tab creations per session
- [ ] It should measure the type of container tab created
- [ ] It should measure container tab creations
- [ ] It should measure new container creations
- [ ] It should measure container deletes
- [ ] It should measure container sorts
- [ ] It should measure container hides
- [ ] It should report URIs accessed across multiple containers
- [ ] It should measure the % of tab-based vs windows-based containers
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

+31
View File
@@ -0,0 +1,31 @@
# Release a new version
## Make the new version
1. Bump the version number in `package.json` and `manifest.json`
2. Commit the version number bump
3. Create a git tag for the version: `git tag <version>`
4. Push the tag up to GitHub: `git push --tags`
## Publish to AMO
1. Run `./bin/build-addon.sh`
2. [Upload the zip file to AMO][amo-upload]
## Publish to GitHub
Finally, we also publish the release to GitHub.
1. Download the signed `.xpi` from [the addon versions page][addon-page]
2. [Create a new release on GitHub][gh-release]
* For *Tag version* and *Release title*, use the version number
* For *Release notes*, copy the output of:
```
git log --no-merges \
--pretty=format:"%h %s" <previous-version>..<new-version>
```
* For the *Attach binaries*, select the signed `.xpi` file
[addon-page]: https://addons.mozilla.org/developers/addon/multi-account-containers/versions
[amo-upload]: https://addons.mozilla.org/developers/addon/multi-account-containers/versions/submit/
[gh-release]: https://github.com/mozilla/multi-account-containers/releases/new
+25098
View File
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -2,14 +2,14 @@
"name": "testpilot-containers", "name": "testpilot-containers",
"title": "Multi-Account 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.", "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": "8.0.7", "version": "8.2.0",
"author": "Andrea Marchesini, Luke Crouch, Lesley Norton, Kendall Werts, Maxx Crawford, Jonathan Kingston", "author": "Andrea Marchesini, Luke Crouch, Lesley Norton, Kendall Werts, Maxx Crawford, Jonathan Kingston",
"bugs": { "bugs": {
"url": "https://github.com/mozilla/multi-account-containers/issues" "url": "https://github.com/mozilla/multi-account-containers/issues"
}, },
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"addons-linter": "^3.23.0", "addons-linter": "^5.28.0",
"ajv": "^6.6.3", "ajv": "^6.6.3",
"chai": "^4.2.0", "chai": "^4.2.0",
"eslint": "^7.32.0", "eslint": "^7.32.0",
@@ -17,7 +17,7 @@
"eslint-plugin-promise": "^5.2.0", "eslint-plugin-promise": "^5.2.0",
"htmllint-cli": "0.0.7", "htmllint-cli": "0.0.7",
"json": ">=10.0.0", "json": ">=10.0.0",
"mocha": "^6.2.2", "mocha": "^10.1.0",
"npm-run-all": "^4.0.0", "npm-run-all": "^4.0.0",
"nyc": "^15.0.0", "nyc": "^15.0.0",
"sinon": "^7.5.0", "sinon": "^7.5.0",
@@ -25,7 +25,7 @@
"stylelint": "^13.5.0", "stylelint": "^13.5.0",
"stylelint-config-standard": "^20.0.0", "stylelint-config-standard": "^20.0.0",
"stylelint-order": "^4.0.0", "stylelint-order": "^4.0.0",
"web-ext": "^5.4.1", "web-ext": "^7.5.0",
"webextensions-jsdom": "^1.2.1" "webextensions-jsdom": "^1.2.1"
}, },
"homepage": "https://github.com/mozilla/multi-account-containers#readme", "homepage": "https://github.com/mozilla/multi-account-containers#readme",
@@ -36,13 +36,16 @@
"url": "git+https://github.com/mozilla/multi-account-containers.git" "url": "git+https://github.com/mozilla/multi-account-containers.git"
}, },
"scripts": { "scripts": {
"webext": "web-ext run -s src/", "build": "web-ext build -s src/",
"dev": "npm run remove-locales-github && web-ext run -s src/",
"lint": "npm-run-all lint:*", "lint": "npm-run-all lint:*",
"lint:addon": "./bin/addons-linter.sh", "lint:addon": "./bin/addons-linter.sh",
"lint:css": "stylelint src/css/*.css", "lint:css": "stylelint src/css/*.css",
"lint:html": "htmllint *.html", "lint:html": "htmllint *.html",
"lint:js": "eslint .", "lint:js": "eslint .",
"package": "rm -rf src/web-ext-artifacts && npm run build && mv src/web-ext-artifacts/firefox_multi-account_containers-*.zip addon.xpi", "package": "rm -rf src/web-ext-artifacts && npm run build && mv src/web-ext-artifacts/firefox_multi-account_containers-*.zip addon.xpi",
"restore-locales-github": "cd src/_locales && git restore .github/",
"remove-locales-github": "rm -rf src/_locales/.github",
"test": "npm run lint && npm run coverage", "test": "npm run lint && npm run coverage",
"test:once": "mocha test/**/*.test.js", "test:once": "mocha test/**/*.test.js",
"test:watch": "npm run test:once -- --watch", "test:watch": "npm run test:once -- --watch",
+16 -2
View File
@@ -3,6 +3,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title data-i18n-message-id="confirmNavigationTitle"></title> <title data-i18n-message-id="confirmNavigationTitle"></title>
<link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="chrome://browser/skin/aboutNetError.css" type="text/css" media="all" /> <link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="chrome://browser/skin/aboutNetError.css" type="text/css" media="all" />
<link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="chrome://global/skin/aboutNetError.css" type="text/css" media="all" />
<script type="text/javascript" src="./js/i18n.js"></script> <script type="text/javascript" src="./js/i18n.js"></script>
<link rel="stylesheet" href="/css/confirm-page.css" /> <link rel="stylesheet" href="/css/confirm-page.css" />
</head> </head>
@@ -23,8 +24,21 @@
</label> </label>
<br /> <br />
<div class="button-container"> <div class="button-container">
<button id="deny" class="button" data-message-id="openInContainer" data-message-arg="current-container-name"></button> <button id="deny"
<button id="confirm" class="button primary" autofocus data-message-id="openInContainer" data-message-arg="container-name"></button> class="button"
data-message-id="openInContainer"
data-message-arg="current-container-name">
</button>
<button id="deny-no-container"
class="button"
data-message-id="openInNoContainer">
</button>
<button id="confirm"
class="button primary"
autofocus
data-message-id="openInContainer"
data-message-arg="container-name">
</button>
</div> </div>
</form> </form>
</main> </main>
+611 -447
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

@@ -1,9 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --><svg data-name="Flat (For Export)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<style>rect,path {fill: rgba(249, 249, 250, 0.8);}</style>
<rect x="1" y="1" width="6" height="6" rx="1"/>
<path d="M14.75 3H13V1.25A0.25 0.25 0 0 0 12.75 1h-1.5A0.25 0.25 0 0 0 11 1.25V3H9.25A0.25 0.25 0 0 0 9 3.25v1.5A0.25 0.25 0 0 0 9.25 5H11v1.75A0.25 0.25 0 0 0 11.25 7h1.5A0.25 0.25 0 0 0 13 6.75V5h1.75A0.25 0.25 0 0 0 15 4.75v-1.5A0.25 0.25 0 0 0 14.75 3z" fill-rule="evenodd"/>
<rect x="1" y="9" width="6" height="6" rx="1"/>
<rect x="9" y="9" width="6" height="6" rx="1"/>
</svg>

Before

Width:  |  Height:  |  Size: 801 B

+9 -3
View File
@@ -1,7 +1,13 @@
<svg data-name="Flat (For Export)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<style>rect,path {fill: rgba(24, 25, 26, 01);}</style> <style>
:root { color-scheme: light dark; }
rect, path { fill: rgb(24, 25, 26); }
@media (prefers-color-scheme: dark) {
rect, path { fill: rgba(249, 249, 250, 0.8); }
}
</style>
<rect x="1" y="1" width="6" height="6" rx="1"/> <rect x="1" y="1" width="6" height="6" rx="1"/>
<path d="M14.75 3H13V1.25A0.25 0.25 0 0 0 12.75 1h-1.5A0.25 0.25 0 0 0 11 1.25V3H9.25A0.25 0.25 0 0 0 9 3.25v1.5A0.25 0.25 0 0 0 9.25 5H11v1.75A0.25 0.25 0 0 0 11.25 7h1.5A0.25 0.25 0 0 0 13 6.75V5h1.75A0.25 0.25 0 0 0 15 4.75v-1.5A0.25 0.25 0 0 0 14.75 3z" fill-rule="evenodd"/> <path d="M14.75 3H13V1.25A0.25 0.25 0 0 0 12.75 1h-1.5A0.25 0.25 0 0 0 11 1.25V3H9.25A0.25 0.25 0 0 0 9 3.25v1.5A0.25 0.25 0 0 0 9.25 5H11v1.75A0.25 0.25 0 0 0 11.25 7h1.5A0.25 0.25 0 0 0 13 6.75V5h1.75A0.25 0.25 0 0 0 15 4.75v-1.5A0.25 0.25 0 0 0 14.75 3z" fill-rule="evenodd"/>
<rect x="1" y="9" width="6" height="6" rx="1"/> <rect x="1" y="9" width="6" height="6" rx="1"/>
<rect x="9" y="9" width="6" height="6" rx="1"/> <rect x="9" y="9" width="6" height="6" rx="1"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 727 B

+1
View File
@@ -4,6 +4,7 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;">
<style> <style>
:root { color-scheme: light dark; }
path, circle, g { path, circle, g {
fill: menutext; fill: menutext;
} }

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

+28 -6
View File
@@ -102,6 +102,7 @@ window.assignManager = {
async deleteContainer(userContextId) { async deleteContainer(userContextId) {
const sitesByContainer = await this.getAssignedSites(userContextId); const sitesByContainer = await this.getAssignedSites(userContextId);
this.area.remove(Object.keys(sitesByContainer)); this.area.remove(Object.keys(sitesByContainer));
identityState.storageArea.remove(backgroundLogic.cookieStoreId(userContextId));
}, },
async getAssignedSites(userContextId = null) { async getAssignedSites(userContextId = null) {
@@ -164,11 +165,17 @@ window.assignManager = {
_neverAsk(m) { _neverAsk(m) {
const pageUrl = m.pageUrl; const pageUrl = m.pageUrl;
if (m.neverAsk === true) { if (m.neverAsk === true) {
if (m.defaultContainer === true) {
this.storageArea.remove(pageUrl);
return;
}
// If we have existing data and for some reason it hasn't been // If we have existing data and for some reason it hasn't been
// deleted etc lets update it // deleted etc lets update it
this.storageArea.get(pageUrl).then((siteSettings) => { this.storageArea.get(pageUrl).then((siteSettings) => {
if (siteSettings) { if (siteSettings) {
siteSettings.neverAsk = true; siteSettings.neverAsk = true;
siteSettings.userContextId = backgroundLogic.getUserContextIdFromCookieStoreId(m.cookieStoreId);
this.storageArea.set(pageUrl, siteSettings); this.storageArea.set(pageUrl, siteSettings);
} }
}).catch((e) => { }).catch((e) => {
@@ -197,12 +204,17 @@ window.assignManager = {
return {}; return {};
} }
// proxyDNS only works for SOCKS proxies
if (["socks", "socks4"].includes(result.proxy.type)) {
result.proxy.proxyDNS = true;
}
if (!result.proxy.mozProxyEnabled) { if (!result.proxy.mozProxyEnabled) {
return { ...result.proxy, proxyDNS: true }; return result.proxy;
} }
// Let's add the isolation key. // Let's add the isolation key.
return [{ ...result.proxy, connectionIsolationKey: "" + MozillaVPN_Background.isolationKey, proxyDNS: true }]; return [{ ...result.proxy, connectionIsolationKey: "" + MozillaVPN_Background.isolationKey }];
}, },
// Before a request is handled by the browser we decide if we should // Before a request is handled by the browser we decide if we should
@@ -565,6 +577,16 @@ window.assignManager = {
return true; return true;
}, },
async _resetCookiesForSite(hostname, cookieStoreId) {
const hostNameTruncated = hostname.replace(/^www\./, ""); // Remove "www." from the hostname
await browser.browsingData.removeCookies({
cookieStoreId: cookieStoreId,
hostnames: [hostNameTruncated] // This does not remove cookies from associated domains. To remove all cookies, we have a container storage removal option.
});
return true;
},
async _setOrRemoveAssignment(tabId, pageUrl, userContextId, remove) { async _setOrRemoveAssignment(tabId, pageUrl, userContextId, remove) {
let actionName; let actionName;
// https://github.com/mozilla/testpilot-containers/issues/626 // https://github.com/mozilla/testpilot-containers/issues/626
@@ -672,7 +694,7 @@ window.assignManager = {
} }
browser.contextMenus.create({ browser.contextMenus.create({
id: menuId, id: menuId,
title: "Always Open in This Container", title: browser.i18n.getMessage("alwaysOpenSiteInContainer"),
checked, checked,
type: "checkbox", type: "checkbox",
contexts: ["all"], contexts: ["all"],
@@ -686,13 +708,13 @@ window.assignManager = {
browser.contextMenus.create({ browser.contextMenus.create({
id: this.MENU_HIDE_ID, id: this.MENU_HIDE_ID,
title: "Hide This Container", title: browser.i18n.getMessage("hideThisContainer"),
contexts: ["all"], contexts: ["all"],
}); });
browser.contextMenus.create({ browser.contextMenus.create({
id: this.MENU_MOVE_ID, id: this.MENU_MOVE_ID,
title: "Move Tabs to a New Window", title: browser.i18n.getMessage("moveTabsToANewWindow"),
contexts: ["all"], contexts: ["all"],
}); });
}, },
@@ -758,7 +780,7 @@ window.assignManager = {
async initBookmarksMenu() { async initBookmarksMenu() {
browser.contextMenus.create({ browser.contextMenus.create({
id: this.OPEN_IN_CONTAINER, id: this.OPEN_IN_CONTAINER,
title: "Open Bookmark in Container Tab", title: browser.i18n.getMessage("openBookmarkInContainerTab"),
contexts: ["bookmark"], contexts: ["bookmark"],
}); });
+58 -9
View File
@@ -1,4 +1,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const DEFAULT_TAB = "about:newtab"; const DEFAULT_TAB = "about:newtab";
const backgroundLogic = { const backgroundLogic = {
NEW_TAB_PAGES: new Set([ NEW_TAB_PAGES: new Set([
"about:startpage", "about:startpage",
@@ -9,7 +14,13 @@ const backgroundLogic = {
NUMBER_OF_KEYBOARD_SHORTCUTS: 10, NUMBER_OF_KEYBOARD_SHORTCUTS: 10,
unhideQueue: [], unhideQueue: [],
init() { init() {
browser.commands.onCommand.addListener(function (command) { browser.commands.onCommand.addListener(function (command) {
if (command === "sort_tabs") {
backgroundLogic.sortTabs();
return;
}
for (let i=0; i < backgroundLogic.NUMBER_OF_KEYBOARD_SHORTCUTS; i++) { for (let i=0; i < backgroundLogic.NUMBER_OF_KEYBOARD_SHORTCUTS; i++) {
const key = "open_container_" + i; const key = "open_container_" + i;
const cookieStoreId = identityState.keyboardShortcut[key]; const cookieStoreId = identityState.keyboardShortcut[key];
@@ -22,6 +33,20 @@ const backgroundLogic = {
browser.permissions.onAdded.addListener(permissions => this.resetPermissions(permissions)); browser.permissions.onAdded.addListener(permissions => this.resetPermissions(permissions));
browser.permissions.onRemoved.addListener(permissions => this.resetPermissions(permissions)); browser.permissions.onRemoved.addListener(permissions => this.resetPermissions(permissions));
// Update Translation in Manifest
browser.runtime.onInstalled.addListener(this.updateTranslationInManifest);
browser.runtime.onStartup.addListener(this.updateTranslationInManifest);
},
updateTranslationInManifest() {
for (let index = 0; index < 10; index++) {
const ajustedIndex = index + 1; // We want to start from 1 instead of 0 in the UI.
browser.commands.update({
name: `open_container_${index}`,
description: browser.i18n.getMessage("containerShortcut", `${ajustedIndex}`)
});
}
}, },
resetPermissions(permissions) { resetPermissions(permissions) {
@@ -50,6 +75,19 @@ const backgroundLogic = {
return extensionInfo; return extensionInfo;
}, },
// Remove container data (cookies, localStorage and cache)
async deleteContainerDataOnly(userContextId) {
await browser.browsingData.removeCookies({
cookieStoreId: this.cookieStoreId(userContextId)
});
await browser.browsingData.removeLocalStorage({
cookieStoreId: this.cookieStoreId(userContextId)
});
return {done: true, userContextId};
},
getUserContextIdFromCookieStoreId(cookieStoreId) { getUserContextIdFromCookieStoreId(cookieStoreId) {
if (!cookieStoreId) { if (!cookieStoreId) {
return false; return false;
@@ -118,7 +156,8 @@ const backgroundLogic = {
// We can't open these we just have to throw them away // We can't open these we just have to throw them away
if (protocol === "about:" if (protocol === "about:"
|| protocol === "chrome:" || protocol === "chrome:"
|| protocol === "moz-extension:") { || protocol === "moz-extension:"
|| protocol === "file:") {
return false; return false;
} }
return true; return true;
@@ -168,7 +207,7 @@ const backgroundLogic = {
if ("isIsolated" in containerState || remove) { if ("isIsolated" in containerState || remove) {
delete containerState.isIsolated; delete containerState.isIsolated;
} else { } else {
containerState.isIsolated = "locked"; containerState.isIsolated = "locked";
} }
return await identityState.storageArea.set(cookieStoreId, containerState); return await identityState.storageArea.set(cookieStoreId, containerState);
} catch (error) { } catch (error) {
@@ -317,19 +356,29 @@ const backgroundLogic = {
continue; continue;
} }
const userContextId = backgroundLogic.getUserContextIdFromCookieStoreId(tab.cookieStoreId); if (!map.has(tab.cookieStoreId)) {
if (!map.has(userContextId)) { const userContextId = backgroundLogic.getUserContextIdFromCookieStoreId(tab.cookieStoreId);
map.set(userContextId, []); map.set(tab.cookieStoreId, { order: userContextId, tabs: [] });
} }
map.get(userContextId).push(tab); map.get(tab.cookieStoreId).tabs.push(tab);
}
const containerOrderStorage = await browser.storage.local.get([CONTAINER_ORDER_STORAGE_KEY]);
const containerOrder =
containerOrderStorage && containerOrderStorage[CONTAINER_ORDER_STORAGE_KEY];
if (containerOrder) {
map.forEach((obj, key) => {
obj.order = (key in containerOrder) ? containerOrder[key] : -1;
});
} }
// Let's sort the map. // Let's sort the map.
const sortMap = new Map([...map.entries()].sort((a, b) => a[0] > b[0])); const sortMap = new Map([...map.entries()].sort((a, b) => a[1].order > b[1].order));
// Let's move tabs. // Let's move tabs.
sortMap.forEach(tabs => { sortMap.forEach(obj => {
for (const tab of tabs) { for (const tab of obj.tabs) {
++pos; ++pos;
browser.tabs.move(tab.id, { browser.tabs.move(tab.id, {
windowId: windowObj.id, windowId: windowObj.id,
+12 -4
View File
@@ -23,6 +23,9 @@ const messageHandler = {
case "deleteContainer": case "deleteContainer":
response = backgroundLogic.deleteContainer(m.message.userContextId); response = backgroundLogic.deleteContainer(m.message.userContextId);
break; break;
case "deleteContainerDataOnly":
response = backgroundLogic.deleteContainerDataOnly(m.message.userContextId);
break;
case "createOrUpdateContainer": case "createOrUpdateContainer":
response = backgroundLogic.createOrUpdateContainer(m.message); response = backgroundLogic.createOrUpdateContainer(m.message);
break; break;
@@ -45,6 +48,9 @@ const messageHandler = {
// m.url is the assignment to be removed/added // m.url is the assignment to be removed/added
response = assignManager._setOrRemoveAssignment(m.tabId, m.url, m.userContextId, m.value); response = assignManager._setOrRemoveAssignment(m.tabId, m.url, m.userContextId, m.value);
break; break;
case "resetCookiesForSite":
response = assignManager._resetCookiesForSite(m.pageUrl, m.cookieStoreId);
break;
case "sortTabs": case "sortTabs":
backgroundLogic.sortTabs(); backgroundLogic.sortTabs();
break; break;
@@ -90,10 +96,10 @@ const messageHandler = {
break; break;
case "assignAndReloadInContainer": case "assignAndReloadInContainer":
tab = await assignManager.reloadPageInContainer( tab = await assignManager.reloadPageInContainer(
m.url, m.url,
m.currentUserContextId, m.currentUserContextId,
m.newUserContextId, m.newUserContextId,
m.tabIndex, m.tabIndex,
m.active, m.active,
true true
); );
@@ -220,7 +226,9 @@ const messageHandler = {
// if it's a container tab wait for it to complete and // if it's a container tab wait for it to complete and
// unhide other tabs from this container // unhide other tabs from this container
if (tab.cookieStoreId.startsWith("firefox-container")) { if (tab.cookieStoreId.startsWith("firefox-container")) {
browser.tabs.onUpdated.addListener(this.tabUpdateHandler); browser.tabs.onUpdated.addListener(this.tabUpdateHandler, {
properties: ["status"]
});
} }
} }
} }
+38 -4
View File
@@ -7,27 +7,47 @@ async function load() {
redirectUrlElement.textContent = redirectUrl; redirectUrlElement.textContent = redirectUrl;
appendFavicon(redirectUrl, redirectUrlElement); appendFavicon(redirectUrl, redirectUrlElement);
// Option for staying on the previous container
document.getElementById("deny").addEventListener("click", (e) => { document.getElementById("deny").addEventListener("click", (e) => {
e.preventDefault(); e.preventDefault();
denySubmit(redirectUrl); denySubmit(redirectUrl, currentCookieStoreId);
});
// Option for going to the default container (no container)
document.getElementById("deny-no-container").addEventListener("click", (e) => {
e.preventDefault();
denySubmit(redirectUrl, currentCookieStoreId);
}); });
const container = await browser.contextualIdentities.get(cookieStoreId); const container = await browser.contextualIdentities.get(cookieStoreId);
const currentContainer = currentCookieStoreId ? await browser.contextualIdentities.get(currentCookieStoreId) : null; const currentContainer = currentCookieStoreId ? await browser.contextualIdentities.get(currentCookieStoreId) : null;
const currentContainerName = currentContainer ? currentContainer.name : ""; const currentContainerName = currentContainer ? setDenyButton(currentContainer.name) : setDenyButton("");
document.querySelectorAll("[data-message-id]").forEach(el => { document.querySelectorAll("[data-message-id]").forEach(el => {
const elementData = el.dataset; const elementData = el.dataset;
const containerName = elementData.messageArg === "container-name" ? container.name : currentContainerName; const containerName = elementData.messageArg === "container-name" ? container.name : currentContainerName;
el.textContent = browser.i18n.getMessage(elementData.messageId, containerName); el.textContent = browser.i18n.getMessage(elementData.messageId, containerName);
}); });
// Option for going to newly selected container
document.getElementById("confirm").addEventListener("click", (e) => { document.getElementById("confirm").addEventListener("click", (e) => {
e.preventDefault(); e.preventDefault();
confirmSubmit(redirectUrl, cookieStoreId); confirmSubmit(redirectUrl, cookieStoreId);
}); });
} }
function setDenyButton(currentContainerName) {
const buttonDeny = document.getElementById("deny");
const buttonDenyNoContainer = document.getElementById("deny-no-container");
if (currentContainerName) {
buttonDenyNoContainer.style.display = "none";
return currentContainerName;
}
buttonDeny.style.display = "none";
return;
}
function appendFavicon(pageUrl, redirectUrlElement) { function appendFavicon(pageUrl, redirectUrlElement) {
const origin = new URL(pageUrl).origin; const origin = new URL(pageUrl).origin;
const favIconElement = Utils.createFavIconElement(`${origin}/favicon.ico`); const favIconElement = Utils.createFavIconElement(`${origin}/favicon.ico`);
@@ -42,6 +62,7 @@ function confirmSubmit(redirectUrl, cookieStoreId) {
browser.runtime.sendMessage({ browser.runtime.sendMessage({
method: "neverAsk", method: "neverAsk",
neverAsk: true, neverAsk: true,
cookieStoreId: cookieStoreId,
pageUrl: redirectUrl pageUrl: redirectUrl
}); });
} }
@@ -55,8 +76,21 @@ function getCurrentTab() {
}); });
} }
async function denySubmit(redirectUrl) { async function denySubmit(redirectUrl, currentCookieStoreId) {
const tab = await getCurrentTab(); const tab = await getCurrentTab();
const currentContainer = currentCookieStoreId ? await browser.contextualIdentities.get(currentCookieStoreId) : null;
const neverAsk = document.getElementById("never-ask").checked;
if (neverAsk) {
await browser.runtime.sendMessage({
method: "neverAsk",
neverAsk: true,
cookieStoreId: currentCookieStoreId,
pageUrl: redirectUrl,
defaultContainer: !currentContainer
});
}
await browser.runtime.sendMessage({ await browser.runtime.sendMessage({
method: "exemptContainerAssignment", method: "exemptContainerAssignment",
tabId: tab[0].id, tabId: tab[0].id,
+2 -1
View File
@@ -24,11 +24,12 @@ async function addMessage(message) {
divElement.innerText = message.text; divElement.innerText = message.text;
const imageElement = document.createElement("img"); const imageElement = document.createElement("img");
const imagePath = browser.runtime.getURL("/img/container-site-d-24.png"); const imagePath = browser.runtime.getURL("/img/multiaccountcontainer-16.svg");
const response = await fetch(imagePath); const response = await fetch(imagePath);
const blob = await response.blob(); const blob = await response.blob();
const objectUrl = URL.createObjectURL(blob); const objectUrl = URL.createObjectURL(blob);
imageElement.src = objectUrl; imageElement.src = objectUrl;
imageElement.width = imageElement.height = 24;
divElement.prepend(imageElement); divElement.prepend(imageElement);
document.body.appendChild(divElement); document.body.appendChild(divElement);
+3 -9
View File
@@ -34,11 +34,8 @@ const MozillaVPN = {
} }
if (!mozillaVpnConnected && proxy.mozProxyEnabled) { if (!mozillaVpnConnected && proxy.mozProxyEnabled) {
flag.classList.add("proxy-unavailable"); flag.classList.add("proxy-unavailable");
const tooltip = el.querySelector(".tooltip.proxy-unavailable");
if (tooltip) {
tooltip.textContent = tooltipProxyWarning;
}
const menuItemName = el.querySelector(".menu-item-name"); const menuItemName = el.querySelector(".menu-item-name");
menuItemName.setAttribute("title", tooltipProxyWarning);
if (menuItemName) { if (menuItemName) {
el.querySelector(".menu-item-name").dataset.mozProxyWarning = "proxy-unavailable"; el.querySelector(".menu-item-name").dataset.mozProxyWarning = "proxy-unavailable";
} }
@@ -68,14 +65,11 @@ const MozillaVPN = {
const mozillaVpnConnected = await browser.runtime.sendMessage({ method: "MozillaVPN_getConnectionStatus" }); const mozillaVpnConnected = await browser.runtime.sendMessage({ method: "MozillaVPN_getConnectionStatus" });
const connectionStatusStringId = mozillaVpnConnected ? "moz-vpn-connected" : "moz-vpn-disconnected"; const connectionStatusStringId = mozillaVpnConnected ? "moz-vpn-connected" : "moz-vpn-disconnected";
const connectionStatusLocalizedString = browser.i18n.getMessage(connectionStatusStringId); const connectionStatusLocalizedString = browser.i18n.getMessage(connectionStatusStringId);
const connectionStatusTooltip = document.querySelector(".vpn-status-container-list");
connectionStatusTooltip.setAttribute("title", connectionStatusLocalizedString);
statusIconEls.forEach(el => { statusIconEls.forEach(el => {
el.style.backgroundImage = mozillaVpnConnected ? connectedIndicatorSrc : disconnectedIndicatorSrc; el.style.backgroundImage = mozillaVpnConnected ? connectedIndicatorSrc : disconnectedIndicatorSrc;
if (el.querySelector(".tooltip")) {
el.querySelector(".tooltip").textContent = connectionStatusLocalizedString;
} else {
el.textContent = connectionStatusLocalizedString;
}
}); });
}, },
+11
View File
@@ -53,11 +53,20 @@ async function enableDisableReplaceTab() {
await browser.storage.local.set({replaceTabEnabled: !!checkbox.checked}); await browser.storage.local.set({replaceTabEnabled: !!checkbox.checked});
} }
async function changeTheme(event) {
const theme = event.currentTarget;
await browser.storage.local.set({currentTheme: theme.value});
await browser.storage.local.set({currentThemeId: theme.selectedIndex});
}
async function setupOptions() { async function setupOptions() {
const { syncEnabled } = await browser.storage.local.get("syncEnabled"); const { syncEnabled } = await browser.storage.local.get("syncEnabled");
const { replaceTabEnabled } = await browser.storage.local.get("replaceTabEnabled"); const { replaceTabEnabled } = await browser.storage.local.get("replaceTabEnabled");
const { currentThemeId } = await browser.storage.local.get("currentThemeId");
document.querySelector("#syncCheck").checked = !!syncEnabled; document.querySelector("#syncCheck").checked = !!syncEnabled;
document.querySelector("#replaceTabCheck").checked = !!replaceTabEnabled; document.querySelector("#replaceTabCheck").checked = !!replaceTabEnabled;
document.querySelector("#changeTheme").selectedIndex = currentThemeId;
setupContainerShortcutSelects(); setupContainerShortcutSelects();
} }
@@ -114,6 +123,8 @@ browser.permissions.onRemoved.addListener(resetPermissionsUi);
document.addEventListener("DOMContentLoaded", setupOptions); document.addEventListener("DOMContentLoaded", setupOptions);
document.querySelector("#syncCheck").addEventListener( "change", enableDisableSync); document.querySelector("#syncCheck").addEventListener( "change", enableDisableSync);
document.querySelector("#replaceTabCheck").addEventListener( "change", enableDisableReplaceTab); document.querySelector("#replaceTabCheck").addEventListener( "change", enableDisableReplaceTab);
document.querySelector("#changeTheme").addEventListener( "change", changeTheme);
maybeShowPermissionsWarningIcon(); maybeShowPermissionsWarningIcon();
for (let i=0; i < NUMBER_OF_KEYBOARD_SHORTCUTS; i++) { for (let i=0; i < NUMBER_OF_KEYBOARD_SHORTCUTS; i++) {
document.querySelector("#open_container_"+i) document.querySelector("#open_container_"+i)
+3
View File
@@ -32,6 +32,9 @@ async function init() {
list.appendChild(fragment); list.appendChild(fragment);
MozillaVPN.handleContainerList(identities); MozillaVPN.handleContainerList(identities);
// Set the theme
Utils.applyTheme();
} }
init(); init();
+146 -14
View File
@@ -10,7 +10,6 @@ const DEFAULT_ICON = "circle";
const NEW_CONTAINER_ID = "new"; const NEW_CONTAINER_ID = "new";
const ONBOARDING_STORAGE_KEY = "onboarding-stage"; const ONBOARDING_STORAGE_KEY = "onboarding-stage";
const CONTAINER_ORDER_STORAGE_KEY = "container-order";
const CONTAINER_DRAG_DATA_TYPE = "firefox-container"; const CONTAINER_DRAG_DATA_TYPE = "firefox-container";
// List of panels // List of panels
@@ -33,6 +32,7 @@ const P_CONTAINER_EDIT = "containerEdit";
const P_CONTAINER_DELETE = "containerDelete"; const P_CONTAINER_DELETE = "containerDelete";
const P_CONTAINERS_ACHIEVEMENT = "containersAchievement"; const P_CONTAINERS_ACHIEVEMENT = "containersAchievement";
const P_CONTAINER_ASSIGNMENTS = "containerAssignments"; const P_CONTAINER_ASSIGNMENTS = "containerAssignments";
const P_CLEAR_CONTAINER_STORAGE = "clearContainerStorage";
const P_MOZILLA_VPN_SERVER_LIST = "moz-vpn-server-list"; const P_MOZILLA_VPN_SERVER_LIST = "moz-vpn-server-list";
const P_ADVANCED_PROXY_SETTINGS = "advanced-proxy-settings-panel"; const P_ADVANCED_PROXY_SETTINGS = "advanced-proxy-settings-panel";
@@ -66,6 +66,9 @@ const Logic = {
method: "MozillaVPN_attemptPort" method: "MozillaVPN_attemptPort"
}), }),
// Set the theme
Utils.applyTheme();
// Remove browserAction "upgraded" badge when opening panel // Remove browserAction "upgraded" badge when opening panel
this.clearBrowserActionBadge(); this.clearBrowserActionBadge();
@@ -120,6 +123,19 @@ const Logic = {
}, },
notify(i18nOpts) {
const notificationCards = document.querySelectorAll(".popup-notification-card");
const text = browser.i18n.getMessage(i18nOpts.messageId, i18nOpts.placeholders);
notificationCards.forEach(notificationCard => {
notificationCard.textContent = text;
notificationCard.classList.add("is-shown");
setTimeout(() => {
notificationCard.classList.remove("is-shown");
}, 2000);
});
},
async showAchievementOrContainersListPanel() { async showAchievementOrContainersListPanel() {
// Do we need to show an achievement panel? // Do we need to show an achievement panel?
let showAchievements = false; let showAchievements = false;
@@ -209,6 +225,11 @@ const Logic = {
async saveContainerOrder(rows) { async saveContainerOrder(rows) {
const containerOrder = {}; const containerOrder = {};
rows.forEach((node, index) => { rows.forEach((node, index) => {
if (typeof browser.contextualIdentities.move === "function") {
browser.contextualIdentities.move(
node.dataset.containerId, index);
}
return containerOrder[node.dataset.containerId] = index; return containerOrder[node.dataset.containerId] = index;
}); });
await browser.storage.local.set({ await browser.storage.local.set({
@@ -394,7 +415,11 @@ const Logic = {
}, },
shortcutListener(e){ shortcutListener(e){
function openNewContainerTab(identity) { function openTopContainers() {
const identities = Logic.identities();
const key = e.code.substring(5);
const identity = e.code === "Digit0" ? identities[9] : identities[key - 1];
try { try {
browser.tabs.create({ browser.tabs.create({
cookieStoreId: identity.cookieStoreId cookieStoreId: identity.cookieStoreId
@@ -404,12 +429,34 @@ const Logic = {
window.close(); window.close();
} }
} }
const identities = Logic.identities();
if ((e.keyCode >= 49 && e.keyCode <= 57) && // We monitor if the search input is focused so we can disable opening
Logic._currentPanel === "containersList") { // containers by typing a digit between 0-9 while the popup is open.
const identity = identities[e.keyCode - 49]; const searchInput = document.getElementById("search-terms");
if (identity) { let isSearchInputFocused = false;
openNewContainerTab(identity);
if (document.activeElement === searchInput) {
isSearchInputFocused = true;
}
if (Logic._currentPanel === "containersList" && !isSearchInputFocused) {
switch(e.code) {
case "Digit0":
case "Digit1":
case "Digit2":
case "Digit3":
case "Digit4":
case "Digit5":
case "Digit6":
case "Digit7":
case "Digit8":
case "Digit9":
openTopContainers();
break;
case "Slash":
document.getElementById("search-terms").focus();
e.preventDefault();
break;
} }
} }
}, },
@@ -462,6 +509,23 @@ const Logic = {
default: default:
break; break;
} }
},
filterContainerList() {
const pattern = /^\s+|\s+$/g;
const list = Array.from(document.querySelectorAll("#identities-list tr"));
const search = document.querySelector("#search-terms").value.replace(pattern, "").toLowerCase();
for (const i in list) {
const text = list[i].querySelector("td div span");
if (text.innerText.replace(pattern, "").toLowerCase().includes(search) ||
!search) {
list[i].style.display = "block";
} else {
list[i].style.display = "none";
}
}
} }
}; };
@@ -621,7 +685,7 @@ Logic.registerPanel(P_ONBOARDING_7, {
// Let's move to the containers list panel. // Let's move to the containers list panel.
Utils.addEnterHandler(document.querySelector("#sign-in"), async () => { Utils.addEnterHandler(document.querySelector("#sign-in"), async () => {
browser.tabs.create({ browser.tabs.create({
url: "https://accounts.firefox.com/?service=sync&action=email&context=fx_desktop_v3&entrypoint=multi-account-containers&utm_source=addon&utm_medium=panel&utm_campaign=container-sync", url: "https://accounts.firefox.com/?service=sync&action=email&context=fx_desktop_v3&entrypoint=multi-account-containers&utm_source=addon&utm_medium=panel&utm_campaign=container-sync&brand=mozilla",
}); });
await Logic.setOnboardingStage(7); await Logic.setOnboardingStage(7);
Logic.showPanel(P_ONBOARDING_8); Logic.showPanel(P_ONBOARDING_8);
@@ -786,7 +850,6 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
</div> </div>
</div> </div>
<span class="menu-text">${identity.name}</span> <span class="menu-text">${identity.name}</span>
<span class="tooltip proxy-unavailable"></span>
</div> </div>
<span class="menu-right-float"> <span class="menu-right-float">
<img alt="" class="always-open-in-flag flag-img" src="/img/flags/.png"/> <img alt="" class="always-open-in-flag flag-img" src="/img/flags/.png"/>
@@ -845,6 +908,7 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
document.addEventListener("keydown", Logic.keyboardNavListener); document.addEventListener("keydown", Logic.keyboardNavListener);
document.addEventListener("keydown", Logic.shortcutListener); document.addEventListener("keydown", Logic.shortcutListener);
document.addEventListener("input", Logic.filterContainerList);
MozillaVPN.handleContainerList(identities); MozillaVPN.handleContainerList(identities);
@@ -921,6 +985,7 @@ Logic.registerPanel(P_CONTAINER_INFO, {
Utils.alwaysOpenInContainer(identity); Utils.alwaysOpenInContainer(identity);
window.close(); window.close();
}); });
// Show or not the has-tabs section. // Show or not the has-tabs section.
for (let trHasTabs of document.getElementsByClassName("container-info-has-tabs")) { // eslint-disable-line prefer-const for (let trHasTabs of document.getElementsByClassName("container-info-has-tabs")) { // eslint-disable-line prefer-const
trHasTabs.style.display = !identity.hasHiddenTabs && !identity.hasOpenTabs ? "none" : ""; trHasTabs.style.display = !identity.hasHiddenTabs && !identity.hasOpenTabs ? "none" : "";
@@ -944,6 +1009,13 @@ Logic.registerPanel(P_CONTAINER_INFO, {
Utils.addEnterHandler(manageContainer, async () => { Utils.addEnterHandler(manageContainer, async () => {
Logic.showPanel(P_CONTAINER_EDIT, identity); Logic.showPanel(P_CONTAINER_EDIT, identity);
}); });
const clearContainerStorageButton = document.getElementById("clear-container-storage-info");
Utils.addEnterHandler(clearContainerStorageButton, async () => {
const granted = await browser.permissions.request({ permissions: ["browsingData"] });
if (granted) {
Logic.showPanel(P_CLEAR_CONTAINER_STORAGE, identity);
}
});
return this.buildOpenTabTable(tabs); return this.buildOpenTabTable(tabs);
}, },
@@ -1244,6 +1316,7 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
if (currentTab.cookieStoreId !== "firefox-default") { if (currentTab.cookieStoreId !== "firefox-default") {
const tr = document.createElement("tr"); const tr = document.createElement("tr");
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav"); tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tr.setAttribute("tabindex", "0");
const td = document.createElement("td"); const td = document.createElement("td");
td.innerHTML = Utils.escaped` td.innerHTML = Utils.escaped`
@@ -1404,11 +1477,14 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, {
/* As we don't have the full or correct path the best we can assume is the path is HTTPS and then replace with a broken icon later if it doesn't load. /* As we don't have the full or correct path the best we can assume is the path is HTTPS and then replace with a broken icon later if it doesn't load.
This is pending a better solution for favicons from web extensions */ This is pending a better solution for favicons from web extensions */
const assumedUrl = `https://${site.hostname}/favicon.ico`; const assumedUrl = `https://${site.hostname}/favicon.ico`;
const resetSiteCookiesInfo = browser.i18n.getMessage("clearSiteCookiesTooltipInfo");
const deleteSiteInfo = browser.i18n.getMessage("deleteSiteTooltipInfo");
trElement.innerHTML = Utils.escaped` trElement.innerHTML = Utils.escaped`
<td> <td>
<div class="favicon"></div> <div class="favicon"></div>
<span title="${site.hostname}" class="menu-text">${site.hostname}</span> <span title="${site.hostname}" class="menu-text truncate-text">${site.hostname}</span>
<img class="trash-button delete-assignment" src="/img/container-delete.svg" /> <img title="${resetSiteCookiesInfo}" class="reset-button reset-assignment" src="/img/refresh-16.svg" />
<img title="${deleteSiteInfo}" class="trash-button delete-assignment" src="/img/container-delete.svg" />
</td>`; </td>`;
trElement.getElementsByClassName("favicon")[0].appendChild(Utils.createFavIconElement(assumedUrl)); trElement.getElementsByClassName("favicon")[0].appendChild(Utils.createFavIconElement(assumedUrl));
const deleteButton = trElement.querySelector(".trash-button"); const deleteButton = trElement.querySelector(".trash-button");
@@ -1420,6 +1496,20 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, {
delete assignments[siteKey]; delete assignments[siteKey];
this.showAssignedContainers(assignments); this.showAssignedContainers(assignments);
}); });
const resetButton = trElement.querySelector(".reset-button");
Utils.addEnterHandler(resetButton, async () => {
const cookieStoreId = Logic.currentCookieStoreId();
const granted = await browser.permissions.request({ permissions: ["browsingData"] });
if (!granted) {
return;
}
const result = await Utils.resetCookiesForSite(site.hostname, cookieStoreId);
if (result === true) {
Logic.notify({messageId: "cookiesClearedSuccess", placeholders: [site.hostname]});
} else {
Logic.notify({messageId: "cookiesCouldNotBeCleared", placeholders: [site.hostname]});
}
});
trElement.classList.add("menu-item", "hover-highlight", "keyboard-nav"); trElement.classList.add("menu-item", "hover-highlight", "keyboard-nav");
tableElement.appendChild(trElement); tableElement.appendChild(trElement);
}); });
@@ -1492,7 +1582,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
} else { } else {
MozillaVPN.handleMozillaCtaClick("mac-edit-container-panel-btn"); MozillaVPN.handleMozillaCtaClick("mac-edit-container-panel-btn");
} }
}); });
this.switch.addEventListener("click", async() => { this.switch.addEventListener("click", async() => {
@@ -1547,6 +1637,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
this.updateProxyDependentUi(proxy); this.updateProxyDependentUi(proxy);
} else { } else {
this.switch.checked = false; this.switch.checked = false;
this.updateProxyDependentUi({});
return; return;
} }
}); });
@@ -1677,7 +1768,6 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
this.currentCityName.textContent = proxyInfo.cityName; this.currentCityName.textContent = proxyInfo.cityName;
this.countryCode = proxyInfo.countryCode; this.countryCode = proxyInfo.countryCode;
} }
return;
} }
expandUi() { expandUi() {
@@ -1892,6 +1982,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
if (proxyPermissionEnabled) { if (proxyPermissionEnabled) {
const proxyData = await proxifiedContainers.retrieve(identity.cookieStoreId); const proxyData = await proxifiedContainers.retrieve(identity.cookieStoreId);
if (proxyData && proxyData.proxy.mozProxyEnabled && !mozillaVpnConnected) { if (proxyData && proxyData.proxy.mozProxyEnabled && !mozillaVpnConnected) {
mozillaVpnUi.updateProxyDependentUi({});
return; return;
} }
const proxy = proxyData ? proxyData.proxy : {}; const proxy = proxyData ? proxyData.proxy : {};
@@ -2194,6 +2285,47 @@ Logic.registerPanel(P_MOZILLA_VPN_SERVER_LIST, {
} }
}); });
// P_CLEAR_CONTAINER_STORAGE: Page for confirming container storage removal.
// ----------------------------------------------------------------------------
Logic.registerPanel(P_CLEAR_CONTAINER_STORAGE, {
panelSelector: "#clear-container-storage-panel",
// This method is called when the object is registered.
initialize() {
Utils.addEnterHandler(document.querySelector("#clear-container-storage-cancel-link"), () => {
const identity = Logic.currentIdentity();
Logic.showPanel(P_CONTAINER_INFO, identity, false, false);
});
Utils.addEnterHandler(document.querySelector("#close-clear-container-storage-panel"), () => {
const identity = Logic.currentIdentity();
Logic.showPanel(P_CONTAINER_INFO, identity, false, false);
});
Utils.addEnterHandler(document.querySelector("#clear-container-storage-ok-link"), async () => {
const identity = Logic.currentIdentity();
const userContextId = Utils.userContextId(identity.cookieStoreId);
const result = await browser.runtime.sendMessage({
method: "deleteContainerDataOnly",
message: { userContextId }
});
if (result.done === true) {
Logic.notify({messageId: "storageWasClearedConfirmation", placeholders: [identity.name]});
}
Logic.showPanel(P_CONTAINER_INFO, identity, false, false);
});
},
// This method is called when the panel is shown.
prepare() {
const identity = Logic.currentIdentity();
// Populating the panel: name, icon, and warning message
document.getElementById("container-clear-storage-title").textContent = identity.name;
return Promise.resolve(null);
},
});
// P_CONTAINER_DELETE: Delete a container. // P_CONTAINER_DELETE: Delete a container.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
+1 -1
View File
@@ -44,7 +44,7 @@ proxifiedContainers = {
// Parses a proxy description string of the format type://host[:port] or type://username:password@host[:port] (port is optional) // Parses a proxy description string of the format type://host[:port] or type://username:password@host[:port] (port is optional)
parseProxy(proxy_str, mozillaVpnData = null) { parseProxy(proxy_str, mozillaVpnData = null) {
const proxyRegexp = /(?<type>(https?)|(socks4?)):\/\/(\b(?<username>\w+):(?<password>\w+)@)?(?<host>((?:\d{1,3}\.){3}\d{1,3}\b)|(\b([\w.-]+)+))(:(?<port>\d+))?/; const proxyRegexp = /(?<type>(https?)|(socks4?)):\/\/(\b(?<username>[\w-]+):(?<password>[\w-]+)@)?(?<host>((?:\d{1,3}\.){3}\d{1,3}\b)|(\b([\w.-]+)+))(:(?<port>\d+))?/;
const matches = proxyRegexp.exec(proxy_str); const matches = proxyRegexp.exec(proxy_str);
if (!matches) { if (!matches) {
return false; return false;
+31
View File
@@ -2,6 +2,9 @@
const DEFAULT_FAVICON = "/img/blank-favicon.svg"; const DEFAULT_FAVICON = "/img/blank-favicon.svg";
// eslint-disable-next-line
const CONTAINER_ORDER_STORAGE_KEY = "container-order";
// TODO use export here instead of globals // TODO use export here instead of globals
const Utils = { const Utils = {
@@ -135,6 +138,14 @@ const Utils = {
}); });
}, },
resetCookiesForSite(pageUrl, cookieStoreId) {
return browser.runtime.sendMessage({
method: "resetCookiesForSite",
pageUrl,
cookieStoreId,
});
},
async reloadInContainer(url, currentUserContextId, newUserContextId, tabIndex, active) { async reloadInContainer(url, currentUserContextId, newUserContextId, tabIndex, active) {
return await browser.runtime.sendMessage({ return await browser.runtime.sendMessage({
method: "reloadInContainer", method: "reloadInContainer",
@@ -166,6 +177,26 @@ const Utils = {
false false
); );
}, },
/* Theme helper
*
* First, we look if there's a theme already set in the local storage. If
* there isn't one, we set the theme based on `prefers-color-scheme`.
* */
getTheme(currentTheme, window) {
if (typeof currentTheme !== "undefined" && currentTheme !== "auto") {
return currentTheme;
}
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
return "dark";
}
return "light";
},
async applyTheme() {
const { currentTheme } = await browser.storage.local.get("currentTheme");
const popup = document.getElementsByTagName("html")[0];
const theme = Utils.getTheme(currentTheme, window);
popup.setAttribute("data-theme", theme);
}
}; };
window.Utils = Utils; window.Utils = Utils;
+27 -18
View File
@@ -1,12 +1,12 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "Firefox Multi-Account Containers", "name": "Firefox Multi-Account Containers",
"version": "8.0.7", "version": "8.2.0",
"incognito": "not_allowed", "incognito": "not_allowed",
"description": "__MSG_extensionDescription__", "description": "__MSG_extensionDescription__",
"icons": { "icons": {
"48": "img/container-site-d-48.png", "48": "img/multiaccountcontainer-16.svg",
"96": "img/container-site-d-96.png" "96": "img/multiaccountcontainer-16.svg"
}, },
"homepage_url": "https://github.com/mozilla/multi-account-containers#readme", "homepage_url": "https://github.com/mozilla/multi-account-containers#readme",
"permissions": [ "permissions": [
@@ -26,6 +26,7 @@
], ],
"optional_permissions": [ "optional_permissions": [
"bookmarks", "bookmarks",
"browsingData",
"nativeMessaging", "nativeMessaging",
"proxy" "proxy"
], ],
@@ -41,77 +42,85 @@
"default": "Ctrl+Period", "default": "Ctrl+Period",
"mac": "MacCtrl+Period" "mac": "MacCtrl+Period"
}, },
"description": "Open containers panel" "description": "__MSG_openContainerPanel__"
},
"sort_tabs": {
"suggested_key": {
"default": "Ctrl+Comma",
"mac": "MacCtrl+Comma"
},
"description": "__MSG_sortTabsByContainer__"
}, },
"open_container_0": { "open_container_0": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+1" "default": "Ctrl+Shift+1"
}, },
"description": "Container Shortcut 1" "description": "__MSG_containerShortcut__"
}, },
"open_container_1": { "open_container_1": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+2" "default": "Ctrl+Shift+2"
}, },
"description": "Container Shortcut 2" "description": "__MSG_containerShortcut__"
}, },
"open_container_2": { "open_container_2": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+3" "default": "Ctrl+Shift+3"
}, },
"description": "Container Shortcut 3" "description": "__MSG_containerShortcut__"
}, },
"open_container_3": { "open_container_3": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+4" "default": "Ctrl+Shift+4"
}, },
"description": "Container Shortcut 4" "description": "__MSG_containerShortcut__"
}, },
"open_container_4": { "open_container_4": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+5" "default": "Ctrl+Shift+5"
}, },
"description": "Container Shortcut 5" "description": "__MSG_containerShortcut__"
}, },
"open_container_5": { "open_container_5": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+6" "default": "Ctrl+Shift+6"
}, },
"description": "Container Shortcut 6" "description": "__MSG_containerShortcut__"
}, },
"open_container_6": { "open_container_6": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+7" "default": "Ctrl+Shift+7"
}, },
"description": "Container Shortcut 7" "description": "__MSG_containerShortcut__"
}, },
"open_container_7": { "open_container_7": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+8" "default": "Ctrl+Shift+8"
}, },
"description": "Container Shortcut 8" "description": "__MSG_containerShortcut__"
}, },
"open_container_8": { "open_container_8": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+9" "default": "Ctrl+Shift+9"
}, },
"description": "Container Shortcut 9" "description": "__MSG_containerShortcut__"
}, },
"open_container_9": { "open_container_9": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+0" "default": "Ctrl+Shift+0"
}, },
"description": "Container Shortcut 10" "description": "__MSG_containerShortcut__"
} }
}, },
"browser_action": { "browser_action": {
"browser_style": true, "browser_style": true,
"default_icon": "img/multiaccountcontainer-16.svg", "default_icon": "img/multiaccountcontainer-16.svg",
"default_title": "Multi-Account Containers", "default_title": "Firefox Multi-Account Containers",
"default_popup": "popup.html", "default_popup": "popup.html",
"default_area": "navbar",
"theme_icons": [ "theme_icons": [
{ {
"light": "img/multiaccountcontainer-16-dark.svg", "light": "img/multiaccountcontainer-16.svg",
"dark": "img/multiaccountcontainer-16.svg", "dark": "img/multiaccountcontainer-16.svg",
"size": 32 "size": 32
} }
@@ -120,7 +129,7 @@
"page_action": { "page_action": {
"browser_style": true, "browser_style": true,
"default_icon": "img/container-openin-16.svg", "default_icon": "img/container-openin-16.svg",
"default_title": "Always open this in a Container", "default_title": "__MSG_alwaysOpenSiteInContainer__",
"default_popup": "pageActionPopup.html", "default_popup": "pageActionPopup.html",
"pinned": false, "pinned": false,
"show_matches": ["*://*/*"] "show_matches": ["*://*/*"]
@@ -144,7 +153,7 @@
], ],
"default_locale": "en", "default_locale": "en",
"web_accessible_resources": [ "web_accessible_resources": [
"/img/container-site-d-24.png" "/img/multiaccountcontainer-16.svg"
], ],
"options_ui": { "options_ui": {
"page": "options.html", "page": "options.html",
+19 -1
View File
@@ -40,7 +40,7 @@
</div> </div>
</div> </div>
</div> </div>
<h3 data-i18n-message-id="firefoxAccountsSync"></h3> <h3 data-i18n-message-id="sync"></h3>
<div class="settings-group"> <div class="settings-group">
<label> <label>
<input type="checkbox" id="syncCheck"> <input type="checkbox" id="syncCheck">
@@ -59,6 +59,24 @@
<p><em data-i18n-message-id="replaceTabDescription"></em></p> <p><em data-i18n-message-id="replaceTabDescription"></em></p>
</div> </div>
<!--
TODO
- Add data-i18n
-->
<h3 data-i18n-message-id="theme"></h3>
<p><label class="keyboard-shortcut">
<span data-i18n-message-id="chooseTheme"></span>
<select id="changeTheme" name="changeTheme">
<option value="auto" selected data-i18n-message-id="themeAuto">
</option>
<option value="light" data-i18n-message-id="themeLight">
</option>
<option value="dark" data-i18n-message-id="themeDark">
</option>
</select>
</label></p>
<h3 data-i18n-message-id="keyboardShortCuts"></h3> <h3 data-i18n-message-id="keyboardShortCuts"></h3>
<p><em data-i18n-message-id="editWhichContainer"></em></p> <p><em data-i18n-message-id="editWhichContainer"></em></p>
+1 -1
View File
@@ -1,7 +1,7 @@
<html> <html>
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Multi-Account Containers</title> <title>Firefox Multi-Account Containers</title>
<script type="text/javascript" src="./js/i18n.js"></script> <script type="text/javascript" src="./js/i18n.js"></script>
<link rel="stylesheet" type="text/css" href="css/popup.css"> <link rel="stylesheet" type="text/css" href="css/popup.css">
+52 -11
View File
@@ -1,7 +1,7 @@
<html> <html data-theme="auto">
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Multi-Account Containers</title> <title>Firefox Multi-Account Containers</title>
<script type="text/javascript" src="./js/i18n.js"></script> <script type="text/javascript" src="./js/i18n.js"></script>
<link rel="stylesheet" href="./css/popup.css"> <link rel="stylesheet" href="./css/popup.css">
</head> </head>
@@ -44,7 +44,7 @@
<div class="panel onboarding onboarding-panel-6 hide" id="onboarding-panel-6"> <div class="panel onboarding onboarding-panel-6 hide" id="onboarding-panel-6">
<img class="onboarding-img" alt="" src="/img/Sync.svg" /> <img class="onboarding-img" alt="" src="/img/Sync.svg" />
<h3 class="onboarding-title" data-i18n-message-id="onboarding-6-header"></h3> <h3 class="onboarding-title" data-i18n-message-id="onboarding-6-header"></h3>
<p data-i18n-message-id="onboarding-6-description"></p> <p data-i18n-message-id="onboarding-6-description-2"></p>
<div class="half-button-wrapper"> <div class="half-button-wrapper">
<a href="#" id="no-sync" class="half-onboarding-button grey-button keyboard-nav" tabindex="0" data-i18n-message-id="notNow"></a> <a href="#" id="no-sync" class="half-onboarding-button grey-button keyboard-nav" tabindex="0" data-i18n-message-id="notNow"></a>
<a href="#" id="start-sync-button" class="half-onboarding-button keyboard-nav" tabindex="0" data-i18n-message-id="startSyncing"></a> <a href="#" id="start-sync-button" class="half-onboarding-button keyboard-nav" tabindex="0" data-i18n-message-id="startSyncing"></a>
@@ -53,8 +53,8 @@
<div class="panel onboarding onboarding-panel-7 hide" id="onboarding-panel-7"> <div class="panel onboarding onboarding-panel-7 hide" id="onboarding-panel-7">
<img class="onboarding-img" alt="" src="/img/Account.svg" /> <img class="onboarding-img" alt="" src="/img/Account.svg" />
<h3 class="onboarding-title" data-i18n-message-id="onboarding-7-header"></h3> <h3 class="onboarding-title" data-i18n-message-id="onboarding-7-header-2"></h3>
<p data-i18n-message-id="onboarding-7-description"></p> <p data-i18n-message-id="onboarding-7-description-2"></p>
<div class="half-button-wrapper"> <div class="half-button-wrapper">
<a href="#" id="no-sign-in" class="half-onboarding-button grey-button keyboard-nav" tabindex="0" data-i18n-message-id="notNow"></a> <a href="#" id="no-sign-in" class="half-onboarding-button grey-button keyboard-nav" tabindex="0" data-i18n-message-id="notNow"></a>
<a href="#" id="sign-in" class="half-onboarding-button keyboard-nav" tabindex="0" data-i18n-message-id="signIn"></a> <a href="#" id="sign-in" class="half-onboarding-button keyboard-nav" tabindex="0" data-i18n-message-id="signIn"></a>
@@ -107,7 +107,8 @@
</div> </div>
<div class="panel menu-panel container-panel hide" id="container-panel"> <div class="panel menu-panel container-panel hide" id="container-panel">
<h3 class="title">Multi-Account Containers</h3> <span class="popup-notification-card"></span>
<h3 class="title">Firefox Multi-Account Containers</h3>
<a href="#" class="info-icon" id="info-icon" tabindex="10"> <a href="#" class="info-icon" id="info-icon" tabindex="10">
<img data-i18n-attribute-message-id="info" data-i18n-attribute="alt" alt="" src="/img/info.svg" / > <img data-i18n-attribute-message-id="info" data-i18n-attribute="alt" alt="" src="/img/info.svg" / >
</a> </a>
@@ -154,11 +155,22 @@
<div class="sub-header" data-i18n-message-id="containers"></div> <div class="sub-header" data-i18n-message-id="containers"></div>
<h4 class="moz-vpn-logotype vpn-status-container-list display-none">Mozilla VPN <h4 class="moz-vpn-logotype vpn-status-container-list display-none">Mozilla VPN
<span class="moz-vpn-connection-status-indicator container-list-status-icon"> <span class="moz-vpn-connection-status-indicator container-list-status-icon">
<span class="tooltip"></span>
</span> </span>
</h4> </h4>
</div> </div>
<div class="scrollable identities-list"> <div class="scrollable identities-list">
<div class="searchbar">
<label for="search-terms"
class="hide-label"
data-i18n-message-id="filterInputLabel">
</label>
<input type="text"
id="search-terms"
name="search-terms"
placeholder="Search container name"
data-i18n-attribute="placeholder"
data-i18n-attribute-message-id="filterInputPlaceholder">
</div>
<table class="menu" id="identities-list"> <table class="menu" id="identities-list">
<tr class="menu-item hover-highlight"> <tr class="menu-item hover-highlight">
<td> <td>
@@ -198,6 +210,7 @@
<div class="hide panel menu-panel container-info-panel" id="container-info-panel" tabindex="-1"> <div class="hide panel menu-panel container-info-panel" id="container-info-panel" tabindex="-1">
<span class="popup-notification-card"></span>
<h3 class="title" id="container-info-title" data-i18n-attribute-message-id="personal"></h3> <h3 class="title" id="container-info-title" data-i18n-attribute-message-id="personal"></h3>
<button class="btn-return arrow-left controller keyboard-nav-back" id="close-container-info-panel" tabindex="0"></button> <button class="btn-return arrow-left controller keyboard-nav-back" id="close-container-info-panel" tabindex="0"></button>
<hr> <hr>
@@ -234,6 +247,14 @@
</span> </span>
</td> </td>
</tr> </tr>
<tr class="menu-item hover-highlight keyboard-nav" id="clear-container-storage" tabindex="0">
<td>
<img class="menu-icon clear-storage-icon" alt="" src="img/container-delete.svg" />
<span class="menu-text" id="clear-container-storage-info" data-i18n-message-id="clearContainerStorage"></span>
<span class="menu-arrow">
</span>
</td>
</tr>
</table> </table>
<hr> <hr>
<div class="sub-header-wrapper"> <div class="sub-header-wrapper">
@@ -251,13 +272,14 @@
</table> </table>
</div> </div>
<v-padding-hack-footer></v-padding-hack-footer> <v-padding-hack-footer></v-padding-hack-footer>
<div class="bottom-btn keyboard-nav hover-highlight" id="manage-container-link" tabindex="0" data-i18n-message-id="manageThisContainer"></div> <div class="bottom-btn keyboard-nav hover-highlight controller" id="manage-container-link" tabindex="0" data-i18n-message-id="manageThisContainer"></div>
</div> </div>
<div class="panel menu-panel container-picker-panel hide" id="container-picker-panel"> <div class="panel menu-panel container-picker-panel hide" id="container-picker-panel">
<span class="popup-notification-card"></span>
<h3 class="title" id="picker-title"> <h3 class="title" id="picker-title">
Multi-Account Containers Firefox Multi-Account Containers
</h3> </h3>
<button class="btn-return arrow-left controller keyboard-nav-back" id="close-container-picker-panel" tabindex="0"></button> <button class="btn-return arrow-left controller keyboard-nav-back" id="close-container-picker-panel" tabindex="0"></button>
<hr> <hr>
@@ -280,6 +302,7 @@
</div> </div>
<div class="panel menu-panel edit-container-panel hide" id="edit-container-panel"> <div class="panel menu-panel edit-container-panel hide" id="edit-container-panel">
<span class="popup-notification-card"></span>
<h3 class="title" id="container-edit-title" data-i18n-message-id="default"></h3> <h3 class="title" id="container-edit-title" data-i18n-message-id="default"></h3>
<button class="btn-return arrow-left controller" id="close-container-edit-panel"></button> <button class="btn-return arrow-left controller" id="close-container-edit-panel"></button>
<hr> <hr>
@@ -342,10 +365,11 @@
</button> </button>
</div> </div>
</moz-vpn-container-ui> </moz-vpn-container-ui>
<button id="advanced-proxy-settings-btn" class="proxy-section advanced-proxy-settings-btn controller"> <button id="advanced-proxy-settings-btn" class="proxy-section advanced-proxy-settings-btn">
<span class="advanced-proxy-settings-btn-label" data-i18n-message-id="advancedProxySettings"></span> <span class="advanced-proxy-settings-btn-label" data-i18n-message-id="advancedProxySettings"></span>
<span id="advanced-proxy-address"></span> <span id="advanced-proxy-address"></span>
</button> </button>
<hr>
<button class="delete-container delete-btn alert-text" id="delete-container-button" data-i18n-message-id="deleteThisContainer"></button> <button class="delete-container delete-btn alert-text" id="delete-container-button" data-i18n-message-id="deleteThisContainer"></button>
<!-- TODO get UX / CONTENT on how to message about unavailable proxies --> <!-- TODO get UX / CONTENT on how to message about unavailable proxies -->
@@ -369,6 +393,7 @@
</div> </div>
<div class="panel menu-panel edit-container-assignments hide" id="edit-container-assignments"> <div class="panel menu-panel edit-container-assignments hide" id="edit-container-assignments">
<span class="popup-notification-card"></span>
<h3 class="title" id="edit-assignments-title" data-i18n-message-id="default"></h3> <h3 class="title" id="edit-assignments-title" data-i18n-message-id="default"></h3>
<button class="btn-return arrow-left controller" id="close-container-assignment-panel"></button> <button class="btn-return arrow-left controller" id="close-container-assignment-panel"></button>
<hr> <hr>
@@ -398,7 +423,23 @@
</div> </div>
<div class="panel-footer"> <div class="panel-footer">
<a href="#" class="button expanded secondary footer-button cancel-button" data-i18n-message-id="cancel" id="delete-container-cancel-link"></a> <a href="#" class="button expanded secondary footer-button cancel-button" data-i18n-message-id="cancel" id="delete-container-cancel-link"></a>
<a href="#" class="button expanded primary footer-button" data-i18n-message-id="ok" id="delete-container-ok-link"></a> <a href="#" class="button expanded confirmation-destructive-ok-btn footer-button alert-text" data-i18n-message-id="ok" id="delete-container-ok-link"></a>
</div>
</div>
<div class="hide panel clear-container-storage-panel" id="clear-container-storage-panel">
<h3 class="title" id="container-clear-storage-title" data-i18n-message-id="default">
</h3>
<button class="btn-return arrow-left controller" id="close-clear-container-storage-panel"></button>
<hr>
<div class="panel-content clear-container-storage-confirm">
<h4 class="clear-container-storage-confirm-title" data-i18n-message-id="clearContainerStoragePanelTitle"></h4>
<p class="clear-container-storage-warning" data-i18n-message-id="clearContainerStorageConfirmation"></p>
</div>
<div class="panel-footer">
<a href="#" class="button expanded secondary footer-button cancel-button" data-i18n-message-id="cancel" id="clear-container-storage-cancel-link"></a>
<a href="#" class="button expanded confirmation-destructive-ok-btn footer-button alert-text" data-i18n-message-id="ok" id="clear-container-storage-ok-link"></a>
</div> </div>
</div> </div>
+27
View File
@@ -0,0 +1,27 @@
const { sinon, nextTick, buildBackgroundDom } = require("../common");
describe("#1140", () => {
beforeEach(async () => {
this.background = await buildBackgroundDom();
});
describe("removing containers", () => {
beforeEach(async () => {
this.background.browser.contextualIdentities.onRemoved.addListener = sinon.stub();
const [promise] = this.background.browser.runtime.onMessage.addListener.yield({
method: "deleteContainer",
message: {
userContextId: "1"
}
});
await promise;
await nextTick();
});
it("should remove the identitystate from storage as well", async () => {
this.background.browser.storage.local.remove.should.have.been.calledWith([
"identitiesState@@_firefox-container-1"
]);
});
});
});