diff --git a/index.js b/index.js index 9b14add..0d33891 100644 --- a/index.js +++ b/index.js @@ -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) { diff --git a/package.json b/package.json index 85177f0..6755f58 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": "3.0.0", + "version": "3.0.1", "author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston", "bugs": { "url": "https://github.com/mozilla/testpilot-containers/issues" diff --git a/webextension/manifest.json b/webextension/manifest.json index bab84d9..52229ac 100644 --- a/webextension/manifest.json +++ b/webextension/manifest.json @@ -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": {