mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-01 16:49:39 +02:00
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",
|
"url": "https://github.com/gorhill/uBlock",
|
||||||
"author": "Raymond Hill",
|
"author": "Raymond Hill",
|
||||||
"author_email": "rhill@raymondhill.net",
|
"author_email": "rhill@raymondhill.net",
|
||||||
"version": "0.7.0.7",
|
"version": "0.7.0.9",
|
||||||
"def_lang": "en",
|
"def_lang": "en",
|
||||||
"vendors": {
|
"vendors": {
|
||||||
"crx": {
|
"crx": {
|
||||||
|
@ -18,14 +18,12 @@
|
|||||||
<p><button id="userFiltersApply" disabled="true" data-i18n="1pApplyChanges"></button></p>
|
<p><button id="userFiltersApply" disabled="true" data-i18n="1pApplyChanges"></button></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="js/vapi-common.js"></script>
|
||||||
js/vapi-common.js
|
<script src="js/vapi-client.js"></script>
|
||||||
js/vapi-client.js
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/i18n.js"></script>
|
||||||
js/i18n.js
|
<script src="js/dashboard-common.js"></script>
|
||||||
js/dashboard-common.js
|
<script src="js/1p-filters.js"></script>
|
||||||
js/1p-filters.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -31,16 +31,14 @@
|
|||||||
|
|
||||||
<div id="busyOverlay"></div>
|
<div id="busyOverlay"></div>
|
||||||
|
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="lib/publicsuffixlist.min.js"></script>
|
||||||
lib/publicsuffixlist.min.js
|
<script src="js/vapi-common.js"></script>
|
||||||
js/vapi-common.js
|
<script src="js/vapi-client.js"></script>
|
||||||
js/vapi-client.js
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/i18n.js"></script>
|
||||||
js/i18n.js
|
<script src="js/uritools.js"></script>
|
||||||
js/uritools.js
|
<script src="js/dashboard-common.js"></script>
|
||||||
js/dashboard-common.js
|
<script src="js/3p-filters.js"></script>
|
||||||
js/3p-filters.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.7.0.8</string>
|
<string>0.7.0.9</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1454679</string>
|
<string>1455205</string>
|
||||||
<key>Chrome</key>
|
<key>Chrome</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Database Quota</key>
|
<key>Database Quota</key>
|
||||||
|
@ -31,15 +31,13 @@
|
|||||||
<p><button type="button" id="reset" data-i18n="aboutResetDataButton"></button>
|
<p><button type="button" id="reset" data-i18n="aboutResetDataButton"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="js/vapi-common.js"></script>
|
||||||
js/vapi-common.js
|
<script src="js/vapi-client.js"></script>
|
||||||
js/vapi-client.js
|
<script src="js/vapi-appinfo.js"></script>
|
||||||
js/vapi-appinfo.js
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/i18n.js"></script>
|
||||||
js/i18n.js
|
<script src="js/dashboard-common.js"></script>
|
||||||
js/dashboard-common.js
|
<script src="js/about.js"></script>
|
||||||
js/about.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -13,11 +13,9 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
|
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/vapi-client.js"></script>
|
||||||
js/vapi-client.js
|
<script src="js/asset-viewer.js"></script>
|
||||||
js/asset-viewer.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -22,12 +22,10 @@
|
|||||||
|
|
||||||
<iframe src=""></iframe>
|
<iframe src=""></iframe>
|
||||||
|
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="js/vapi-common.js"></script>
|
||||||
js/vapi-common.js
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/i18n.js"></script>
|
||||||
js/i18n.js
|
<script src="js/dashboard.js"></script>
|
||||||
js/dashboard.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -229,7 +229,9 @@ var cachedAssetsManager = (function() {
|
|||||||
var getTextFileFromURL = function(url, onLoad, onError) {
|
var getTextFileFromURL = function(url, onLoad, onError) {
|
||||||
// https://github.com/gorhill/uMatrix/issues/15
|
// https://github.com/gorhill/uMatrix/issues/15
|
||||||
var onResponseReceived = function() {
|
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 onLoad.call(this);
|
||||||
}
|
}
|
||||||
return onError.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
|
// https://github.com/gorhill/uBlock/issues/314#issuecomment-58878112
|
||||||
// Using an id makes uBlock's CSS rules more specific, thus prevents
|
// Using an id makes uBlock's CSS rules more specific, thus prevents
|
||||||
// surrounding external rules from winning over own rules.
|
// surrounding external rules from winning over own rules.
|
||||||
@ -874,7 +879,7 @@ var startPicker = function(details) {
|
|||||||
].join('');
|
].join('');
|
||||||
pickerRoot.appendChild(divDialog);
|
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.
|
// Insert in `html` tag, not `body` tag.
|
||||||
document.documentElement.appendChild(pickerRoot);
|
document.documentElement.appendChild(pickerRoot);
|
||||||
svgRoot.addEventListener('click', onSvgClicked);
|
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)) {
|
if (/^www\.youtube(-nocookie)?\.com/.test(location.host)) {
|
||||||
vAPI.sitePatch = function() {
|
vAPI.sitePatch = function() {
|
||||||
window.addEventListener('load', function onWindowLoad() {
|
var onWindowLoad = function() {
|
||||||
this.removeEventListener('load', onWindowLoad, true);
|
this.removeEventListener('load', onWindowLoad, true);
|
||||||
var spf = this._spf_state;
|
var spf = this._spf_state;
|
||||||
|
|
||||||
@ -19,7 +19,8 @@ if (/^www\.youtube(-nocookie)?\.com/.test(location.host)) {
|
|||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, true);
|
};
|
||||||
|
window.addEventListener('load', onWindowLoad, true);
|
||||||
|
|
||||||
|
|
||||||
// based on ExtendTube's ad removing solution
|
// based on ExtendTube's ad removing solution
|
||||||
|
@ -5,6 +5,6 @@ self.vAPI = self.vAPI || {};
|
|||||||
|
|
||||||
vAPI.app = {
|
vAPI.app = {
|
||||||
/**/name: 'µBlock',
|
/**/name: 'µBlock',
|
||||||
/**/version: '0.7.0.7',
|
/**/version: '0.7.0.9',
|
||||||
/**/url: 'https://github.com/gorhill/uBlock',
|
/**/url: 'https://github.com/gorhill/uBlock',
|
||||||
};
|
};
|
@ -74,14 +74,14 @@ if (self.chrome) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.listenerId) {
|
|
||||||
this.setup();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.channels[name] = {
|
this.channels[name] = {
|
||||||
portName: name,
|
portName: name,
|
||||||
listener: typeof callback === 'function' ? callback : null,
|
listener: typeof callback === 'function' ? callback : null,
|
||||||
send: function(message, callback) {
|
send: function(message, callback) {
|
||||||
|
if (!vAPI.messaging.listenerId) {
|
||||||
|
vAPI.messaging.setup();
|
||||||
|
}
|
||||||
|
|
||||||
message = {
|
message = {
|
||||||
portName: this.portName,
|
portName: this.portName,
|
||||||
msg: message
|
msg: message
|
||||||
@ -137,14 +137,14 @@ if (self.chrome) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._connector) {
|
|
||||||
this.setup();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.channels[name] = {
|
this.channels[name] = {
|
||||||
portName: name,
|
portName: name,
|
||||||
listener: typeof callback === 'function' ? callback : null,
|
listener: typeof callback === 'function' ? callback : null,
|
||||||
send: function(message, callback) {
|
send: function(message, callback) {
|
||||||
|
if (!vAPI.messaging._connector) {
|
||||||
|
vAPI.messaging.setup();
|
||||||
|
}
|
||||||
|
|
||||||
message = {
|
message = {
|
||||||
portName: this.portName,
|
portName: this.portName,
|
||||||
msg: message
|
msg: message
|
||||||
|
@ -52,14 +52,12 @@
|
|||||||
<div class="label"><iframe></div>
|
<div class="label"><iframe></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="js/vapi-common.js"></script>
|
||||||
js/vapi-common.js
|
<script src="js/vapi-client.js"></script>
|
||||||
js/vapi-client.js
|
<script src="js/vapi-appinfo.js"></script>
|
||||||
js/vapi-appinfo.js
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/i18n.js"></script>
|
||||||
js/i18n.js
|
<script src="js/popup.js"></script>
|
||||||
js/popup.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -25,14 +25,12 @@ ul {
|
|||||||
(<a href="https://github.com/gorhill/uBlock/wiki/Experimental-features" style="font-style:italic">Experimental features</a>)
|
(<a href="https://github.com/gorhill/uBlock/wiki/Experimental-features" style="font-style:italic">Experimental features</a>)
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="js/vapi-common.js"></script>
|
||||||
js/vapi-common.js
|
<script src="js/vapi-client.js"></script>
|
||||||
js/vapi-client.js
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/i18n.js"></script>
|
||||||
js/i18n.js
|
<script src="js/dashboard-common.js"></script>
|
||||||
js/dashboard-common.js
|
<script src="js/settings.js"></script>
|
||||||
js/settings.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -29,14 +29,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="js/vapi-common.js"></script>
|
||||||
js/vapi-common.js
|
<script src="js/vapi-client.js"></script>
|
||||||
js/vapi-client.js
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/i18n.js"></script>
|
||||||
js/i18n.js
|
<script src="js/dashboard-common.js"></script>
|
||||||
js/dashboard-common.js
|
<script src="js/stats.js"></script>
|
||||||
js/stats.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -18,15 +18,13 @@
|
|||||||
<p><button id="whitelistApply" type="button" disabled="true" data-i18n="whitelistApply"></button></p>
|
<p><button id="whitelistApply" type="button" disabled="true" data-i18n="whitelistApply"></button></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/js-loader.js" data-jsList="
|
<script src="lib/punycode.min.js"></script>
|
||||||
lib/punycode.min.js
|
<script src="js/vapi-common.js"></script>
|
||||||
js/vapi-common.js
|
<script src="js/vapi-client.js"></script>
|
||||||
js/vapi-client.js
|
<script src="js/udom.js"></script>
|
||||||
js/udom.js
|
<script src="js/i18n.js"></script>
|
||||||
js/i18n.js
|
<script src="js/dashboard-common.js"></script>
|
||||||
js/dashboard-common.js
|
<script src="js/whitelist.js"></script>
|
||||||
js/whitelist.js
|
|
||||||
"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user