Skip to content

Commit 462e407

Browse files
committed
Added compatibility with my fork of Temporary Containers
1 parent d80eed6 commit 462e407

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
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.
5+
> This is a fork of [Containerise](https://github.com/kintesh/containerise) (based on the v3.9.0 release) which adds an option to exclude certain containers.
66
>
77
> The (signed) .xpi file for manual installation can be found in the [release assets](https://github.com/berrnd/containerise/releases/latest).
88
>
9+
> If you also use [Temporary Containers](https://github.com/stoically/temporary-containers), here is a compatible fork: <https://github.com/berrnd/temporary-containers>
10+
>
911
> _Dev note: Node v16 is needed for building._
1012
1113
|![](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)|

src/manifest.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Containerise @berrnd Fork",
4-
"version": "3.9.0.1001",
4+
"version": "3.9.0.1002",
55
"description": "Firefox extension to automatically open websites in a container",
66
"icons": {
77
"48": "icons/icon.png",
@@ -23,7 +23,9 @@
2323
"default_icon": "icons/icon.png"
2424
},
2525
"background": {
26-
"scripts": ["index.js"]
26+
"scripts": [
27+
"index.js"
28+
]
2729
},
2830
"applications": {
2931
"gecko": {

src/messageExternalListener.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@ import HostStorage from './Storage/HostStorage';
22

33
const allowedExternalExtensions = [
44
'{c607c8df-14a7-4f28-894f-29e8722976af}', // Temporary Containers
5+
'temporary-containers-fork@berrnd.de', // Temporary Containers @berrnd Fork
56
];
67

7-
export const messageExternalListener = (message, sender) => {
8+
export const messageExternalListener = (message, sender) =>
9+
{
810

9-
if (!allowedExternalExtensions.includes(sender.id)) {
11+
if (!allowedExternalExtensions.includes(sender.id))
12+
{
1013
throw new Error('Extension not allowed to receive an answer');
1114
}
1215

13-
switch (message.method) {
16+
switch (message.method)
17+
{
1418
case 'getHostMap':
15-
if (typeof message.url === 'undefined') {
19+
if (typeof message.url === 'undefined')
20+
{
1621
throw new Error('Missing message.url');
1722
}
1823
return HostStorage.get(message.url);

0 commit comments

Comments
 (0)