Skip to content

Commit 3b36c4e

Browse files
committed
Added an option to exclude certain containers
1 parent 9a589b5 commit 3b36c4e

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Firefox extension to automatically open websites in a container
44

5+
> This is a fork of [kintesh/containerise](https://github.com/kintesh/containerise) (based on the v3.9.0 release) which adds an option to exclude certain containers.
6+
>
7+
> The (signed) .xpi file for manual installation can be found in the [release assets](https://github.com/berrnd/containerise/releases/latest).
8+
59
|![](https://raw.githubusercontent.com/kintesh/containerise/master/static/screenshots/1.png) | ![](https://raw.githubusercontent.com/kintesh/containerise/master/static/screenshots/2.png) | ![](https://raw.githubusercontent.com/kintesh/containerise/master/static/screenshots/3.png) | ![](https://raw.githubusercontent.com/kintesh/containerise/master/static/screenshots/4.png)|
610
| --- | --- | --- | --- |
711
|Select your container and add a domain to always open all visits in the chosen container. | Add many domains as you wish. | Special `No Container` option to break out of a container. | Simple CSV based mapping of a domain to a container by name for easy backup and bulk editing. |

src/containers.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ async function handle(url, tabId) {
7777
if (currentTab.incognito || !hostMap) {
7878
return {};
7979
}
80+
81+
// Excluded containers feature
82+
if (typeof preferences.excludedContainers !== 'undefined' && preferences.excludedContainers !== '') {
83+
const excludedContainersArr = preferences.excludedContainers.split(',');
84+
const currentTabContainer = identities.find(x => x.cookieStoreId === currentTab.cookieStoreId);
85+
if (excludedContainersArr.indexOf(currentTabContainer.name) > -1)
86+
return {};
87+
}
8088

8189
const hostIdentity = identities.find((identity) => identity.cookieStoreId === hostMap.cookieStoreId);
8290
let targetCookieStoreId;

src/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
3-
"name": "Containerise",
4-
"version": "3.9.0",
3+
"name": "Containerise @berrnd Fork",
4+
"version": "3.9.0.1001",
55
"description": "Firefox extension to automatically open websites in a container",
66
"icons": {
77
"48": "icons/icon.png",
@@ -18,7 +18,7 @@
1818
],
1919
"browser_action": {
2020
"browser_style": true,
21-
"default_title": "Containerise",
21+
"default_title": "Containerise @berrnd Fork",
2222
"default_popup": "ui/index.html",
2323
"default_icon": "icons/icon.png"
2424
},
@@ -27,7 +27,7 @@
2727
},
2828
"applications": {
2929
"gecko": {
30-
"id": "containerise@kinte.sh",
30+
"id": "containerise-fork@berrnd.de",
3131
"strict_min_version": "53.0"
3232
}
3333
},

src/ui-preferences/preferences.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
"label": "Keep old tabs",
1212
"description": "After a contained tab has been created, the old won't be closed"
1313
},
14+
{
15+
"type": "string",
16+
"name": "excludedContainers",
17+
"label": "Excluded Containers",
18+
"description": "A comma separated list of excluded containers (names)",
19+
"defaultValue": ""
20+
},
1421
{
1522
"type": "group",
1623
"name": "defaultContainer",

0 commit comments

Comments
 (0)