Merge branch 'master' into fingerprint-famous

This commit is contained in:
John Gruen 2017-02-21 16:55:51 -05:00 committed by GitHub
commit 89eeb4741a
10 changed files with 117 additions and 24 deletions

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -50,5 +50,23 @@
<path id="food" d="M14.1,0.9v5.3h-1.4V0.9c0-1.1-1.4-1.1-1.4,0v5.3h-1.2V0.9c0-1.1-1.4-1.1-1.4,0v5.3H7.2V0.9c0-1.2-1.6-1.1-1.6,0
v10.4c0,1.8,1.2,3,2.8,3v15.2c0,1.6,1.1,2.5,2.1,2.5s2.1-0.9,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7,2"/>
<circle id="circle" r="16" cx="16" cy="16" fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View file

@ -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
},

View file

@ -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"
}

View file

@ -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;

View file

@ -50,5 +50,23 @@
<path id="food" d="M14.1,0.9v5.3h-1.4V0.9c0-1.1-1.4-1.1-1.4,0v5.3h-1.2V0.9c0-1.1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.4c0,2,0.7,3.7,2.1,5c1.4,1.4,3,2.1,5,2.1l0,0c2,0,3.6-0.7,5-2.1c1.4-1.2,2.1-3.2,2.1-5V9.2
C32,5.2,28.8,2,24.7,2"/>
<circle id="circle" r="16" cx="16" cy="16" fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View file

@ -494,7 +494,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
return `<input type="radio" value="${containerIcon}" name="container-icon" id="edit-container-panel-choose-icon-${containerIcon}" />
<label for="edit-container-panel-choose-icon-${containerIcon}" class="usercontext-icon choose-color-icon" data-identity-color="grey" data-identity-icon="${containerIcon}">`;
};
const icons = ["fingerprint", "briefcase", "dollar", "cart", "vacation", "gift", "food", "circle"];
const icons = ["fingerprint", "briefcase", "dollar", "cart", "vacation", "gift", "food", "fruit", "pet", "tree", "chill", "circle"];
const iconRadioFieldset = document.getElementById("edit-container-panel-choose-icon");
icons.forEach((containerIcon) => {
const templateInstance = document.createElement("span");

View file

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Containers Experiment",
"version": "0.9.0",
"version": "0.9.2",
"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.",
"icons": {