├── README.md
├── .eslintrc
├── _locales
├── nl
│ └── messages.json
└── en_US
│ └── messages.json
├── manifest.json
├── icons
├── circle.svg
├── fence.svg
├── fruit.svg
├── food.svg
├── tree.svg
├── briefcase.svg
├── gift.svg
├── cart.svg
├── pet.svg
├── dollar.svg
├── chill.svg
├── vacation.svg
└── fingerprint.svg
├── .tools
└── colorize-svg.awk
├── background.js
└── LICENSE
/README.md:
--------------------------------------------------------------------------------
1 | # Open bookmark in Container Tab
2 |
3 | This Firefox add-on adds an "Open in Container Tab" menu item to bookmark menus to open bookmarks in a container tab.
4 |
5 | https://addons.mozilla.org/firefox/addon/open-bookmark-in-container-tab/
6 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "eslint:recommended",
3 | "parserOptions": {
4 | "ecmaVersion": 8
5 | },
6 | "env": {
7 | "es6": true,
8 | "browser": true,
9 | "webextensions": true
10 | },
11 | "rules": {
12 | "max-len": [2, {
13 | "code": 100,
14 | "ignoreUrls": true
15 | }],
16 | "no-console": [0]
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/_locales/nl/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "extensionDescription": {
3 | "message": "Voegt 'Openen in een nieuw containertabblad' toe aan het menu van bladwijzers"
4 | },
5 | "open_one_in_container_tab": {
6 | "message": "Openen in een nieuw containertabblad"
7 | },
8 | "open_all_in_container_tab": {
9 | "message": "Alle openen in containertabbladen"
10 | },
11 | "no_container": {
12 | "message": "Geen container"
13 | }
14 | }
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "__MSG_extensionName__",
3 | "description": "__MSG_extensionDescription__",
4 | "default_locale": "en_US",
5 | "version": "1.3",
6 | "manifest_version": 2,
7 | "background": {
8 | "scripts": ["background.js"]
9 | },
10 | "permissions": [
11 | "bookmarks",
12 | "contextualIdentities",
13 | "cookies",
14 | "menus"
15 | ],
16 | "applications": {
17 | "gecko": {
18 | "id": "bookmark-menu-container@robwu.nl",
19 | "strict_min_version": "60.0"
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/_locales/en_US/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "extensionName": {
3 | "message": "Open bookmark in Container Tab menu item",
4 | "description": "Name of the extension."
5 | },
6 | "extensionDescription": {
7 | "message": "Add 'Open in Container Tab' menu item to bookmarks",
8 | "description": "Short description of the extension."
9 | },
10 | "open_one_in_container_tab": {
11 | "message": "Open in a New Container Tab",
12 | "description": "Label of item in the context menu of a bookmark. Language and capitalization should be consistent with built-in menu items such as 'Open in a New Tab'."
13 | },
14 | "open_all_in_container_tab": {
15 | "message": "Open All in Container Tabs",
16 | "description": "Label of item in the context menu of a bookmark folder. Language and capitalization should be consistent with built-in menu items such as 'Open All in Tabs'."
17 | },
18 | "no_container": {
19 | "message": "No Container",
20 | "description": "Label of item in the submenu of the 'Open ... in Container' menu item."
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/icons/circle.svg:
--------------------------------------------------------------------------------
1 |
4 |
24 |
25 |
--------------------------------------------------------------------------------
/icons/fence.svg:
--------------------------------------------------------------------------------
1 |
4 |
24 |
--------------------------------------------------------------------------------
/icons/fruit.svg:
--------------------------------------------------------------------------------
1 |
4 |
26 |
27 |
--------------------------------------------------------------------------------
/icons/food.svg:
--------------------------------------------------------------------------------
1 |
4 |
26 |
27 |
--------------------------------------------------------------------------------
/icons/tree.svg:
--------------------------------------------------------------------------------
1 |
4 |
26 |
27 |
--------------------------------------------------------------------------------
/icons/briefcase.svg:
--------------------------------------------------------------------------------
1 |
4 |
27 |
28 |
--------------------------------------------------------------------------------
/icons/gift.svg:
--------------------------------------------------------------------------------
1 |
4 |
28 |
29 |
--------------------------------------------------------------------------------
/.tools/colorize-svg.awk:
--------------------------------------------------------------------------------
1 | #!/usr/bin/awk -f
2 | # Converts a 32x32 svg icon to the same version but supporting different colors via its reference fragment.
3 | # Usage:
4 | # 1. Copy all base icons from browser/components/contextualidentity/content/*.svg to icons/
5 | # 2. Run:
6 | # for i in icons/*.svg ; do .tools/colorize-svg.awk "$i" > "$i.tmp" && mv "$i.tmp" "$i" ; done
7 |
8 |
9 | # Colors from https://searchfox.org/mozilla-central/rev/37663bb87004167184de6f2afa6b05875eb0528e/toolkit/components/extensions/parent/ext-contextualIdentities.js#25-32
10 | BEGIN {
11 | COLORS[0] = "blue"
12 | COLORS[1] = "turquoise"
13 | COLORS[2] = "green"
14 | COLORS[3] = "yellow"
15 | COLORS[4] = "orange"
16 | COLORS[5] = "red"
17 | COLORS[6] = "pink"
18 | COLORS[7] = "purple"
19 |
20 | COLORCODES[0] = "#37adff"
21 | COLORCODES[1] = "#00c79a"
22 | COLORCODES[2] = "#51cd00"
23 | COLORCODES[3] = "#ffcb00"
24 | COLORCODES[4] = "#ff9f00"
25 | COLORCODES[5] = "#ff613d"
26 | COLORCODES[6] = "#ff4bda"
27 | COLORCODES[7] = "#af51f5"
28 | }
29 |
30 | # Add identifier to base image (and remove the unneeded fill attribute).
31 | {
32 | sub("fill=\"context-fill\"", "id=\"icon\"")
33 | }
34 |
35 | {
36 | print
37 | }
38 |
39 | # Append the and