diff --git a/meta/config.json b/meta/config.json index a396a7dfd..8d9af82c4 100644 --- a/meta/config.json +++ b/meta/config.json @@ -4,7 +4,7 @@ "url": "https://github.com/gorhill/uBlock", "author": "Raymond Hill", "author_email": "rhill@raymondhill.net", - "version": "0.7.0.7", + "version": "0.7.0.9", "def_lang": "en", "vendors": { "crx": { diff --git a/src/1p-filters.html b/src/1p-filters.html index 1705b5f5d..8425d6e2d 100644 --- a/src/1p-filters.html +++ b/src/1p-filters.html @@ -18,14 +18,12 @@

- + + + + + + diff --git a/src/3p-filters.html b/src/3p-filters.html index 5e6198add..3ee5213a1 100644 --- a/src/3p-filters.html +++ b/src/3p-filters.html @@ -31,16 +31,14 @@
- + + + + + + + + diff --git a/src/Info.plist b/src/Info.plist index 12c1ae936..bcb06731b 100644 --- a/src/Info.plist +++ b/src/Info.plist @@ -13,9 +13,9 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleShortVersionString - 0.7.0.8 + 0.7.0.9 CFBundleVersion - 1454679 + 1455205 Chrome Database Quota diff --git a/src/about.html b/src/about.html index e7507c0c7..101ffd66f 100644 --- a/src/about.html +++ b/src/about.html @@ -31,15 +31,13 @@

- + + + + + + + diff --git a/src/asset-viewer.html b/src/asset-viewer.html index 103b9d89e..88091255e 100644 --- a/src/asset-viewer.html +++ b/src/asset-viewer.html @@ -13,11 +13,9 @@

- + + + diff --git a/src/dashboard.html b/src/dashboard.html index 75b963873..bc53db07b 100644 --- a/src/dashboard.html +++ b/src/dashboard.html @@ -22,12 +22,10 @@ - + + + + diff --git a/src/js/assets.js b/src/js/assets.js index 83b07e821..737dea631 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -229,7 +229,9 @@ var cachedAssetsManager = (function() { var getTextFileFromURL = function(url, onLoad, onError) { // https://github.com/gorhill/uMatrix/issues/15 var onResponseReceived = function() { - if ( typeof this.status === 'number' && this.status >= 200 && this.status < 300 ) { + // xhr for local files gives status 0, but actually succeeds + if ( this.status >= 200 && this.status < 300 + || this.status === 0 && this.responseText ) { return onLoad.call(this); } return onError.call(this); diff --git a/src/js/element-picker.js b/src/js/element-picker.js index fa29f6af7..9cf4a3266 100644 --- a/src/js/element-picker.js +++ b/src/js/element-picker.js @@ -120,6 +120,11 @@ /******************************************************************************/ +// don't run in frames +if (window.top !== window) { + return; +} + // https://github.com/gorhill/uBlock/issues/314#issuecomment-58878112 // Using an id makes uBlock's CSS rules more specific, thus prevents // surrounding external rules from winning over own rules. @@ -874,7 +879,7 @@ var startPicker = function(details) { ].join(''); pickerRoot.appendChild(divDialog); - // https://github.com/gorhill/uBlock/issues/344#issuecomment-60775958 + // https://github.com/gorhill/uBlock/issues/344#issuecomment-60775958 // Insert in `html` tag, not `body` tag. document.documentElement.appendChild(pickerRoot); svgRoot.addEventListener('click', onSvgClicked); diff --git a/src/js/js-loader.js b/src/js/js-loader.js deleted file mode 100644 index cd60baa47..000000000 --- a/src/js/js-loader.js +++ /dev/null @@ -1,39 +0,0 @@ -(function() { - 'use strict'; - - document.body.style.display = "none"; - document.addEventListener("DOMContentLoaded", function onDOMReady(e) { - document.removeEventListener(e.type, onDOMReady, false); - - var jsListToLoad = document.querySelector("script[data-jsList]"); - - if (jsListToLoad) { - jsListToLoad = jsListToLoad.getAttribute("data-jsList").trim().split(/\s+/); - } - - if (Array.isArray(jsListToLoad)) { - var loadNextJSFile = function() { - var script, src = jsListToLoad.shift(); - - if (src) { - script = document.createElement("script"); - script.onload = function() { - this.onload = null; - - if (jsListToLoad.length) { - loadNextJSFile(); - } - else { - document.body.style.display = ""; - jsListToLoad = document.querySelector("script[data-jsList]"); - jsListToLoad.parentNode.removeChild(jsListToLoad); - } - }; - document.body.appendChild(script).src = src; - } - }; - - loadNextJSFile(); - } - }, false); -})(); \ No newline at end of file diff --git a/src/js/sitepatch-safari.js b/src/js/sitepatch-safari.js index e4eee9007..4c4e9f671 100644 --- a/src/js/sitepatch-safari.js +++ b/src/js/sitepatch-safari.js @@ -9,7 +9,7 @@ self.vAPI = self.vAPI || {}; if (/^www\.youtube(-nocookie)?\.com/.test(location.host)) { vAPI.sitePatch = function() { - window.addEventListener('load', function onWindowLoad() { + var onWindowLoad = function() { this.removeEventListener('load', onWindowLoad, true); var spf = this._spf_state; @@ -19,7 +19,8 @@ if (/^www\.youtube(-nocookie)?\.com/.test(location.host)) { window.location.href = url; }; } - }, true); + }; + window.addEventListener('load', onWindowLoad, true); // based on ExtendTube's ad removing solution diff --git a/src/js/vapi-appinfo.js b/src/js/vapi-appinfo.js index 2dea72c19..372fc04a1 100644 --- a/src/js/vapi-appinfo.js +++ b/src/js/vapi-appinfo.js @@ -5,6 +5,6 @@ self.vAPI = self.vAPI || {}; vAPI.app = { /**/name: 'µBlock', - /**/version: '0.7.0.7', + /**/version: '0.7.0.9', /**/url: 'https://github.com/gorhill/uBlock', }; \ No newline at end of file diff --git a/src/js/vapi-client.js b/src/js/vapi-client.js index 071f813d8..51d73114b 100644 --- a/src/js/vapi-client.js +++ b/src/js/vapi-client.js @@ -74,14 +74,14 @@ if (self.chrome) { return; } - if (!this.listenerId) { - this.setup(); - } - this.channels[name] = { portName: name, listener: typeof callback === 'function' ? callback : null, send: function(message, callback) { + if (!vAPI.messaging.listenerId) { + vAPI.messaging.setup(); + } + message = { portName: this.portName, msg: message @@ -137,14 +137,14 @@ if (self.chrome) { return; } - if (!this._connector) { - this.setup(); - } - this.channels[name] = { portName: name, listener: typeof callback === 'function' ? callback : null, send: function(message, callback) { + if (!vAPI.messaging._connector) { + vAPI.messaging.setup(); + } + message = { portName: this.portName, msg: message diff --git a/src/popup.html b/src/popup.html index 535dfc07f..8857d86bd 100644 --- a/src/popup.html +++ b/src/popup.html @@ -52,14 +52,12 @@
<iframe>
- + + + + + + diff --git a/src/settings.html b/src/settings.html index 1f96982ae..34c57eed9 100644 --- a/src/settings.html +++ b/src/settings.html @@ -25,14 +25,12 @@ ul { (Experimental features) - + + + + + + diff --git a/src/stats.html b/src/stats.html index b6ca1f5d7..ab3187ec6 100644 --- a/src/stats.html +++ b/src/stats.html @@ -29,14 +29,12 @@ - + + + + + + diff --git a/src/whitelist.html b/src/whitelist.html index c1a0b0a85..2a5789f41 100644 --- a/src/whitelist.html +++ b/src/whitelist.html @@ -18,15 +18,13 @@

- + + + + + + +