mirror of https://github.com/gorhill/uBlock.git
Drop js-loader, updates from gorhill/uBlock/master
This commit is contained in:
parent
ba0b11aabe
commit
d98a8161f9
|
@ -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": {
|
||||
|
|
|
@ -18,14 +18,12 @@
|
|||
<p><button id="userFiltersApply" disabled="true" data-i18n="1pApplyChanges"></button></p>
|
||||
</div>
|
||||
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
js/vapi-common.js
|
||||
js/vapi-client.js
|
||||
js/udom.js
|
||||
js/i18n.js
|
||||
js/dashboard-common.js
|
||||
js/1p-filters.js
|
||||
"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/1p-filters.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -31,16 +31,14 @@
|
|||
|
||||
<div id="busyOverlay"></div>
|
||||
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
lib/publicsuffixlist.min.js
|
||||
js/vapi-common.js
|
||||
js/vapi-client.js
|
||||
js/udom.js
|
||||
js/i18n.js
|
||||
js/uritools.js
|
||||
js/dashboard-common.js
|
||||
js/3p-filters.js
|
||||
"></script>
|
||||
<script src="lib/publicsuffixlist.min.js"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/uritools.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/3p-filters.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.7.0.8</string>
|
||||
<string>0.7.0.9</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1454679</string>
|
||||
<string>1455205</string>
|
||||
<key>Chrome</key>
|
||||
<dict>
|
||||
<key>Database Quota</key>
|
||||
|
|
|
@ -31,15 +31,13 @@
|
|||
<p><button type="button" id="reset" data-i18n="aboutResetDataButton"></button>
|
||||
</div>
|
||||
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
js/vapi-common.js
|
||||
js/vapi-client.js
|
||||
js/vapi-appinfo.js
|
||||
js/udom.js
|
||||
js/i18n.js
|
||||
js/dashboard-common.js
|
||||
js/about.js
|
||||
"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/vapi-appinfo.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/about.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -13,11 +13,9 @@
|
|||
<body>
|
||||
<div id="content"></div>
|
||||
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
js/udom.js
|
||||
js/vapi-client.js
|
||||
js/asset-viewer.js
|
||||
"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/asset-viewer.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -22,12 +22,10 @@
|
|||
|
||||
<iframe src=""></iframe>
|
||||
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
js/vapi-common.js
|
||||
js/udom.js
|
||||
js/i18n.js
|
||||
js/dashboard.js
|
||||
"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
})();
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
};
|
|
@ -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
|
||||
|
|
|
@ -52,14 +52,12 @@
|
|||
<div class="label"><iframe></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
js/vapi-common.js
|
||||
js/vapi-client.js
|
||||
js/vapi-appinfo.js
|
||||
js/udom.js
|
||||
js/i18n.js
|
||||
js/popup.js
|
||||
"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/vapi-appinfo.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/popup.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
|
|
|
@ -25,14 +25,12 @@ ul {
|
|||
(<a href="https://github.com/gorhill/uBlock/wiki/Experimental-features" style="font-style:italic">Experimental features</a>)
|
||||
</ul>
|
||||
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
js/vapi-common.js
|
||||
js/vapi-client.js
|
||||
js/udom.js
|
||||
js/i18n.js
|
||||
js/dashboard-common.js
|
||||
js/settings.js
|
||||
"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -29,14 +29,12 @@
|
|||
|
||||
</div>
|
||||
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
js/vapi-common.js
|
||||
js/vapi-client.js
|
||||
js/udom.js
|
||||
js/i18n.js
|
||||
js/dashboard-common.js
|
||||
js/stats.js
|
||||
"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/stats.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -18,15 +18,13 @@
|
|||
<p><button id="whitelistApply" type="button" disabled="true" data-i18n="whitelistApply"></button></p>
|
||||
</div>
|
||||
|
||||
<script src="js/js-loader.js" data-jsList="
|
||||
lib/punycode.min.js
|
||||
js/vapi-common.js
|
||||
js/vapi-client.js
|
||||
js/udom.js
|
||||
js/i18n.js
|
||||
js/dashboard-common.js
|
||||
js/whitelist.js
|
||||
"></script>
|
||||
<script src="lib/punycode.min.js"></script>
|
||||
<script src="js/vapi-common.js"></script>
|
||||
<script src="js/vapi-client.js"></script>
|
||||
<script src="js/udom.js"></script>
|
||||
<script src="js/i18n.js"></script>
|
||||
<script src="js/dashboard-common.js"></script>
|
||||
<script src="js/whitelist.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue