Removal of legacy CSS for builds after 2015-08-06. Fixes #714

This commit is contained in:
Jonathan Kingston 2017-08-06 15:18:46 +01:00
parent ee8c69b73e
commit f03404ad9e
3 changed files with 11 additions and 3 deletions

View file

@ -592,6 +592,11 @@ ContainerWindow.prototype = {
_init(window) {
this._window = window;
this._tabsElement = this._window.document.getElementById("tabbrowser-tabs");
const NATIVE_CSS_BUILD_DATE = 20170806;
const NATIVE_CSS_VERSION = 57;
const buildID = Services.appinfo.appBuildID;
const version = Services.appinfo.version.match(/^[0-9]+\./)[1];
this._style = Style({ uri: self.data.url("usercontext.css") });
this._plusButton = this._window.document.getAnonymousElementByAttribute(this._tabsElement, "anonid", "tabs-newtab-button");
this._overflowPlusButton = this._window.document.getElementById("new-tab-button");
@ -599,7 +604,10 @@ ContainerWindow.prototype = {
// Only hack the normal plus button as the alltabs is done elsewhere
this.attachMenuEvent("plus-button", this._plusButton);
attachTo(this._style, this._window);
if (Number(buildID.substring(0, 8)) < NATIVE_CSS_BUILD_DATE
|| version < NATIVE_CSS_VERSION) {
attachTo(this._style, this._window);
}
},
attachMenuEvent(source, button) {

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": "3.0.0",
"version": "3.0.1",
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
"bugs": {
"url": "https://github.com/mozilla/testpilot-containers/issues"

View file

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Containers Experiment",
"version": "3.0.0",
"version": "3.0.1",
"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": {