Skip to content

Commit f03404a

Browse files
Removal of legacy CSS for builds after 2015-08-06. Fixes #714
1 parent ee8c69b commit f03404a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,14 +592,22 @@ ContainerWindow.prototype = {
592592
_init(window) {
593593
this._window = window;
594594
this._tabsElement = this._window.document.getElementById("tabbrowser-tabs");
595+
const NATIVE_CSS_BUILD_DATE = 20170806;
596+
const NATIVE_CSS_VERSION = 57;
597+
598+
const buildID = Services.appinfo.appBuildID;
599+
const version = Services.appinfo.version.match(/^[0-9]+\./)[1];
595600
this._style = Style({ uri: self.data.url("usercontext.css") });
596601
this._plusButton = this._window.document.getAnonymousElementByAttribute(this._tabsElement, "anonid", "tabs-newtab-button");
597602
this._overflowPlusButton = this._window.document.getElementById("new-tab-button");
598603

599604
// Only hack the normal plus button as the alltabs is done elsewhere
600605
this.attachMenuEvent("plus-button", this._plusButton);
601606

602-
attachTo(this._style, this._window);
607+
if (Number(buildID.substring(0, 8)) < NATIVE_CSS_BUILD_DATE
608+
|| version < NATIVE_CSS_VERSION) {
609+
attachTo(this._style, this._window);
610+
}
603611
},
604612

605613
attachMenuEvent(source, button) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "testpilot-containers",
33
"title": "Containers Experiment",
44
"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.",
5-
"version": "3.0.0",
5+
"version": "3.0.1",
66
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
77
"bugs": {
88
"url": "https://github.com/mozilla/testpilot-containers/issues"

webextension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Containers Experiment",
4-
"version": "3.0.0",
4+
"version": "3.0.1",
55

66
"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.",
77
"icons": {

0 commit comments

Comments
 (0)