Merge pull request #715 from jonathanKingston/remove-legacy-css
Removal of legacy CSS for builds after 2015-08-06. Fixes #714
This commit is contained in:
commit
8f8fc322eb
3 changed files with 11 additions and 3 deletions
10
index.js
10
index.js
|
@ -592,6 +592,11 @@ ContainerWindow.prototype = {
|
||||||
_init(window) {
|
_init(window) {
|
||||||
this._window = window;
|
this._window = window;
|
||||||
this._tabsElement = this._window.document.getElementById("tabbrowser-tabs");
|
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._style = Style({ uri: self.data.url("usercontext.css") });
|
||||||
this._plusButton = this._window.document.getAnonymousElementByAttribute(this._tabsElement, "anonid", "tabs-newtab-button");
|
this._plusButton = this._window.document.getAnonymousElementByAttribute(this._tabsElement, "anonid", "tabs-newtab-button");
|
||||||
this._overflowPlusButton = this._window.document.getElementById("new-tab-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
|
// Only hack the normal plus button as the alltabs is done elsewhere
|
||||||
this.attachMenuEvent("plus-button", this._plusButton);
|
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) {
|
attachMenuEvent(source, button) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "testpilot-containers",
|
"name": "testpilot-containers",
|
||||||
"title": "Containers Experiment",
|
"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.",
|
"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",
|
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/mozilla/testpilot-containers/issues"
|
"url": "https://github.com/mozilla/testpilot-containers/issues"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Containers Experiment",
|
"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.",
|
"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": {
|
"icons": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue