Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 50f5ebfcff | |||
| 0b760ce465 | |||
| bedebb7c0e | |||
| 9447792e53 | |||
| 8512794b43 | |||
| 081ea0bedb | |||
| d2c00a10cf | |||
| 56b85a8cdd | |||
| 4e4ed390e0 | |||
| 86edd8c8a2 | |||
| 4b56a2f0bb | |||
| 4d76c937fe | |||
| 649110ed45 | |||
| a1d01f8ff2 | |||
| 2ed9eaee8a | |||
| c03c3c118c | |||
| 4bd412aa9b |
@@ -2,7 +2,7 @@
|
||||
|
||||
The Firefox Multi-Account Containers extension lets you carve out a separate box for each of your online lives – no more opening a different browser just to check your work email! [Learn More Here](https://blog.mozilla.org/firefox/introducing-firefox-multi-account-containers/)
|
||||
|
||||
[Available on addons.mozilla.org](https://addons.mozilla.org/en-GB/firefox/addon/multi-account-containers/)
|
||||
[Available on addons.mozilla.org](https://addons.mozilla.org/firefox/addon/multi-account-containers/)
|
||||
|
||||
For more info, see:
|
||||
|
||||
@@ -18,17 +18,43 @@ For more info, see:
|
||||
|
||||
## Development
|
||||
|
||||
1. `npm install`
|
||||
2. `./node_modules/web-ext/bin/web-ext run -s src/`
|
||||
### Running Locally
|
||||
|
||||
#### Via WebExtensions API (web-ext)
|
||||
|
||||
1. Install the [web-ext](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext) tool.
|
||||
2. Run `web-ext run -s src/`. This launches Firefox and installs the extension automatically.
|
||||
|
||||
This tool provides some additional development features, such as [automatic reloading](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext#Automatic_extension_reloading).
|
||||
|
||||
#### Via about:debugging in Firefox
|
||||
|
||||
1. Open the `about:debugging` page in Firefox.
|
||||
2. Click on `This Firefox`.
|
||||
3. Click on [Load Temporary Add-on](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox).
|
||||
4. Select `src/manifest.json`.
|
||||
|
||||
Here is a [video](https://www.youtube.com/watch?v=cer9EUKegG4) that demonstrates how to do this.
|
||||
|
||||
### Testing
|
||||
`npm run test`
|
||||
|
||||
or
|
||||
* Install dependencies:
|
||||
|
||||
`npm run lint`
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
for just the linter
|
||||
* Run all tests:
|
||||
|
||||
```
|
||||
npm run test
|
||||
```
|
||||
|
||||
* Only run the linter:
|
||||
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
There is a timeout test that sometimes fails on certain machines, so make sure to run the tests on your clone before you make any changes to see if you have this problem.
|
||||
|
||||
@@ -43,12 +69,12 @@ There is a timeout test that sometimes fails on certain machines, so make sure t
|
||||
#### Publish to AMO
|
||||
|
||||
1. `npm run-script build`
|
||||
2. [Upload the `.zip` to AMO](https://addons.mozilla.org/en-US/developers/addon/multi-account-containers/versions/submit/)
|
||||
2. [Upload the `.zip` to AMO](https://addons.mozilla.org/developers/addon/multi-account-containers/versions/submit/)
|
||||
|
||||
#### Publish to GitHub
|
||||
Finally, we also publish the release to GitHub for those followers.
|
||||
|
||||
1. Download the signed `.xpi` from [the addon versions page](https://addons.mozilla.org/en-US/developers/addon/multi-account-containers/versions)
|
||||
1. Download the signed `.xpi` from [the addon versions page](https://addons.mozilla.org/developers/addon/multi-account-containers/versions)
|
||||
2. [Make the new release on
|
||||
GitHub](https://github.com/mozilla/multi-account-containers/releases/new)
|
||||
* Use the version number for "Tag version" and "Release title"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "testpilot-containers",
|
||||
"title": "Multi-Account Containers",
|
||||
"description": "Containers helps you keep all the parts of your online life contained in different tabs. Custom labels and color-coded tabs help keep different activities — like online shopping, travel planning, or checking work email — separate.",
|
||||
"version": "7.3.0",
|
||||
"version": "7.4.0",
|
||||
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mozilla/multi-account-containers/issues"
|
||||
|
||||
@@ -27,7 +27,7 @@ button .container-name,
|
||||
|
||||
/* for a mid sized window we have enough for this but not our image */
|
||||
.title {
|
||||
background-image: url("chrome://global/skin/icons/info.svg");
|
||||
background-image: url('chrome://global/skin/icons/info.svg');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,11 @@ dfn {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
#deny,
|
||||
#confirm {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.button-container > button {
|
||||
min-inline-size: 240px;
|
||||
}
|
||||
|
||||
@@ -698,7 +698,7 @@ window.assignManager = {
|
||||
|
||||
reloadPageInContainer(url, currentUserContextId, userContextId, index, active, neverAsk = false, openerTabId = null) {
|
||||
const cookieStoreId = backgroundLogic.cookieStoreId(userContextId);
|
||||
const loadPage = browser.extension.getURL("confirm-page.html");
|
||||
const loadPage = browser.runtime.getURL("confirm-page.html");
|
||||
// False represents assignment is not permitted
|
||||
// If the user has explicitly checked "Never Ask Again" on the warning page we will send them straight there
|
||||
if (neverAsk) {
|
||||
|
||||
@@ -22,7 +22,7 @@ const backgroundLogic = {
|
||||
},
|
||||
|
||||
async getExtensionInfo() {
|
||||
const manifestPath = browser.extension.getURL("manifest.json");
|
||||
const manifestPath = browser.runtime.getURL("manifest.json");
|
||||
const response = await fetch(manifestPath);
|
||||
const extensionInfo = await response.json();
|
||||
return extensionInfo;
|
||||
|
||||
@@ -24,7 +24,7 @@ async function addMessage(message) {
|
||||
divElement.innerText = message.text;
|
||||
|
||||
const imageElement = document.createElement("img");
|
||||
const imagePath = browser.extension.getURL("/img/container-site-d-24.png");
|
||||
const imagePath = browser.runtime.getURL("/img/container-site-d-24.png");
|
||||
const response = await fetch(imagePath);
|
||||
const blob = await response.blob();
|
||||
const objectUrl = URL.createObjectURL(blob);
|
||||
|
||||
+15
-15
@@ -41,7 +41,7 @@ function addRemoveSiteIsolation() {
|
||||
}
|
||||
|
||||
async function getExtensionInfo() {
|
||||
const manifestPath = browser.extension.getURL("manifest.json");
|
||||
const manifestPath = browser.runtime.getURL("manifest.json");
|
||||
const response = await fetch(manifestPath);
|
||||
const extensionInfo = await response.json();
|
||||
return extensionInfo;
|
||||
@@ -803,8 +803,8 @@ Logic.registerPanel(P_CONTAINER_INFO, {
|
||||
});
|
||||
// Populating the panel: name and icon
|
||||
document.getElementById("container-info-title").textContent = identity.name;
|
||||
|
||||
const alwaysOpen = document.querySelector("#always-open-in-info-panel");
|
||||
|
||||
const alwaysOpen = document.querySelector("#always-open-in-info-panel");
|
||||
Utils.addEnterHandler(alwaysOpen, async () => {
|
||||
Utils.alwaysOpenInContainer(identity);
|
||||
window.close();
|
||||
@@ -941,7 +941,7 @@ Logic.registerPanel(OPEN_NEW_CONTAINER_PICKER, {
|
||||
tr.setAttribute("tabindex", "0");
|
||||
const td = document.createElement("td");
|
||||
|
||||
td.innerHTML = Utils.escaped`
|
||||
td.innerHTML = Utils.escaped`
|
||||
<div class="menu-icon">
|
||||
<div class="usercontext-icon"
|
||||
data-identity-icon="${identity.icon}"
|
||||
@@ -1017,7 +1017,7 @@ Logic.registerPanel(MANAGE_CONTAINERS_PICKER, {
|
||||
tr.setAttribute("tabindex", "0");
|
||||
const td = document.createElement("td");
|
||||
|
||||
td.innerHTML = Utils.escaped`
|
||||
td.innerHTML = Utils.escaped`
|
||||
<div class="menu-icon hover-highlight">
|
||||
<div class="usercontext-icon"
|
||||
data-identity-icon="${identity.icon}"
|
||||
@@ -1110,10 +1110,10 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
|
||||
const pickedFunction = function (identity) {
|
||||
const newUserContextId = Utils.userContextId(identity.cookieStoreId);
|
||||
Utils.reloadInContainer(
|
||||
currentTab.url,
|
||||
false,
|
||||
currentTab.url,
|
||||
false,
|
||||
newUserContextId,
|
||||
currentTab.index + 1,
|
||||
currentTab.index + 1,
|
||||
currentTab.active
|
||||
);
|
||||
window.close();
|
||||
@@ -1126,7 +1126,7 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
|
||||
tr.classList.add("menu-item", "hover-highlight", "keyboard-nav");
|
||||
const td = document.createElement("td");
|
||||
|
||||
td.innerHTML = Utils.escaped`
|
||||
td.innerHTML = Utils.escaped`
|
||||
<div class="menu-icon hover-highlight">
|
||||
<div class="mac-icon">
|
||||
</div>
|
||||
@@ -1139,10 +1139,10 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
|
||||
|
||||
Utils.addEnterHandler(tr, () => {
|
||||
Utils.reloadInContainer(
|
||||
currentTab.url,
|
||||
false,
|
||||
currentTab.url,
|
||||
false,
|
||||
0,
|
||||
currentTab.index + 1,
|
||||
currentTab.index + 1,
|
||||
currentTab.active
|
||||
);
|
||||
window.close();
|
||||
@@ -1156,7 +1156,7 @@ Logic.registerPanel(REOPEN_IN_CONTAINER_PICKER, {
|
||||
tr.setAttribute("tabindex", "0");
|
||||
const td = document.createElement("td");
|
||||
|
||||
td.innerHTML = Utils.escaped`
|
||||
td.innerHTML = Utils.escaped`
|
||||
<div class="menu-icon hover-highlight">
|
||||
<div class="usercontext-icon"
|
||||
data-identity-icon="${identity.icon}"
|
||||
@@ -1197,7 +1197,7 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, {
|
||||
// This method is called when the panel is shown.
|
||||
prepare() {
|
||||
Logic.listenToPickerBackButton();
|
||||
document.getElementById("picker-title").textContent = "Reopen This Site in";
|
||||
document.getElementById("picker-title").textContent = "Always Open in";
|
||||
const fragment = document.createDocumentFragment();
|
||||
|
||||
document.getElementById("new-container-div").innerHTML = "";
|
||||
@@ -1208,7 +1208,7 @@ Logic.registerPanel(ALWAYS_OPEN_IN_PICKER, {
|
||||
tr.setAttribute("tabindex", "0");
|
||||
const td = document.createElement("td");
|
||||
|
||||
td.innerHTML = Utils.escaped`
|
||||
td.innerHTML = Utils.escaped`
|
||||
<div class="menu-icon hover-highlight">
|
||||
<div class="usercontext-icon"
|
||||
data-identity-icon="${identity.icon}"
|
||||
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Firefox Multi-Account Containers",
|
||||
"version": "7.3.0",
|
||||
"version": "7.4.0",
|
||||
"incognito": "not_allowed",
|
||||
"description": "Multi-Account Containers helps you keep all the parts of your online life contained in different tabs. Custom labels and color-coded tabs help keep different activities — like online shopping, travel planning, or checking work email — separate.",
|
||||
"icons": {
|
||||
@@ -25,6 +25,7 @@
|
||||
"idle",
|
||||
"management",
|
||||
"storage",
|
||||
"unlimitedStorage",
|
||||
"tabs",
|
||||
"webRequestBlocking",
|
||||
"webRequest"
|
||||
|
||||
Reference in New Issue
Block a user