diff --git a/.jpmignore b/.jpmignore index 0fc6d0e..100666b 100644 --- a/.jpmignore +++ b/.jpmignore @@ -5,12 +5,13 @@ node_modules/ .env .eslintrc.js +.eslintignore .gitignore .htmllintrc .jpmignore .stylelintrc .travis.yml -testpilot-containers.xpi +*.xpi .vimrc .DS_Store .gdb_history diff --git a/README.md b/README.md index f0194d6..7c8b6a8 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,20 @@ The only way to run the experiment is using an [unbranded version build](https:/ Check out the [Browser Toolbox](https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox) for more information about debugging add-on code. +### Building .xpi + +To build a local .xpi, use the plain [`jpm +xpi`](https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm#jpm_xpi) command. + +### Signing an .xpi + +To sign an .xpi, use [`jpm +sign`](https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm#jpm_sign) +command. + +Note: You will need to be [an author on the AMO +add-on](https://addons.mozilla.org/en-US/developers/addon/containers-experiment/ownership). + ### Testing TBD diff --git a/data/usercontext.css b/data/usercontext.css index c9c2d80..911743f 100644 --- a/data/usercontext.css +++ b/data/usercontext.css @@ -86,6 +86,22 @@ value, or chrome url path as an alternate selector mitiages this bug.*/ --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#food"); } +[data-identity-icon="fruit"] { + --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#fruit"); +} + +[data-identity-icon="pet"] { + --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#pet"); +} + +[data-identity-icon="tree"] { + --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#tree"); +} + +[data-identity-icon="chill"] { + --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#chill"); +} + #userContext-indicator { height: 16px; width: 16px; diff --git a/data/usercontext.svg b/data/usercontext.svg index 3237e98..f58067a 100644 --- a/data/usercontext.svg +++ b/data/usercontext.svg @@ -50,5 +50,23 @@ + + + + diff --git a/index.js b/index.js index f01122f..87442e7 100644 --- a/index.js +++ b/index.js @@ -27,6 +27,10 @@ const IDENTITY_ICONS = [ { name: "gift", image: "gift" }, { name: "vacation", image: "vacation" }, { name: "food", image: "food" }, + { name: "fruit", image: "fruit" }, + { name: "pet", image: "pet" }, + { name: "tree", image: "tree" }, + { name: "chill", image: "chill" }, { name: "circle", image: "circle" }, // this doesn't exist in m-b ]; @@ -243,22 +247,22 @@ const ContainerService = { color: "", name: "Pending to be deleted", public: true, - } + }; } return identity; } - let oldGetIdentityFromId = ContextualIdentityService.getIdentityFromId; + const oldGetIdentityFromId = ContextualIdentityService.getIdentityFromId; ContextualIdentityService.getIdentityFromId = function(userContextId) { return workaroundForCookieManager(oldGetIdentityFromId, userContextId); - } + }; if ("getPublicIdentityFromId" in ContextualIdentityService) { - let oldGetPublicIdentityFromId = ContextualIdentityService.getIdentityFromId; + const oldGetPublicIdentityFromId = ContextualIdentityService.getIdentityFromId; ContextualIdentityService.getIdentityFromId = function(userContextId) { return workaroundForCookieManager(oldGetPublicIdentityFromId, userContextId); - } + }; } // End-Of-Hack }, diff --git a/package.json b/package.json index 18f560b..eb0180f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "testpilot-containers", "title": "Containers Experiment", "description": "Containers works by isolating cookie jars using separate origin-attributes defined visually by colored ‘Container Tabs’. This add-on is a modified version of the containers feature for Firefox Test Pilot.", - "version": "0.9.0", + "version": "0.9.2", "author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston", "bugs": { "url": "https://github.com/mozilla/testpilot-containers/issues" @@ -44,5 +44,6 @@ "lint:html": "htmllint webextension/*.html", "lint:js": "eslint .", "test": "npm run lint" - } + }, + "updateURL": "https://testpilot.firefox.com/files/@testpilot-containers/updates.json" } diff --git a/webextension/css/popup.css b/webextension/css/popup.css index cdb0a99..3b0498b 100644 --- a/webextension/css/popup.css +++ b/webextension/css/popup.css @@ -37,18 +37,18 @@ table { /* Color and icon helpers */ [data-identity-color="blue"] { - --identity-tab-color: #0996f8; - --identity-icon-color: #00a7e0; + --identity-tab-color: #37adff; + --identity-icon-color: #37adff; } [data-identity-color="turquoise"] { - --identity-tab-color: #01bdad; - --identity-icon-color: #01bdad; + --identity-tab-color: #00c79a; + --identity-icon-color: #00c79a; } [data-identity-color="green"] { - --identity-tab-color: #57bd35; - --identity-icon-color: #7dc14c; + --identity-tab-color: #51cd00; + --identity-icon-color: #51cd00; } [data-identity-color="yellow"] { @@ -57,23 +57,23 @@ table { } [data-identity-color="orange"] { - --identity-tab-color: #ff9216; - --identity-icon-color: #ff9216; + --identity-tab-color: #ff9f00; + --identity-icon-color: #ff9f00; } [data-identity-color="red"] { - --identity-tab-color: #d92215; - --identity-icon-color: #d92215; + --identity-tab-color: #ff613d; + --identity-icon-color: #ff613d; } [data-identity-color="pink"] { - --identity-tab-color: #ea385e; - --identity-icon-color: #ee5195; + --identity-tab-color: #ff4bda; + --identity-icon-color: #ff4bda; } [data-identity-color="purple"] { - --identity-tab-color: #7a2f7a; - --identity-icon-color: #7a2f7a; + --identity-tab-color: #af51f5; + --identity-icon-color: #af51f5; } [data-identity-icon="fingerprint"] { @@ -108,6 +108,22 @@ table { --identity-icon: url("/img/usercontext.svg#vacation"); } +[data-identity-icon="fruit"] { + --identity-icon: url("/img/usercontext.svg#fruit"); +} + +[data-identity-icon="pet"] { + --identity-icon: url("/img/usercontext.svg#pet"); +} + +[data-identity-icon="tree"] { + --identity-icon: url("/img/usercontext.svg#tree"); +} + +[data-identity-icon="chill"] { + --identity-icon: url("/img/usercontext.svg#chill"); +} + /* Buttons */ .button.primary { background-color: #0996f8; @@ -520,6 +536,11 @@ span ~ .panel-header-text { opacity: 0 !important; } +.edit-container-panel [type="radio"] { + display: inline; + opacity: 0; +} + .edit-container-panel [type="radio"]:checked + label { outline: 2px solid grey; -moz-outline-radius: 50px; diff --git a/webextension/img/usercontext.svg b/webextension/img/usercontext.svg index 3237e98..f58067a 100644 --- a/webextension/img/usercontext.svg +++ b/webextension/img/usercontext.svg @@ -50,5 +50,23 @@ + + + + diff --git a/webextension/js/popup.js b/webextension/js/popup.js index 5264f71..b8f982c 100644 --- a/webextension/js/popup.js +++ b/webextension/js/popup.js @@ -494,7 +494,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, { return `