mirror of https://github.com/gorhill/uBlock.git
Merge branch 'master' of github.com:gorhill/uBlock into inspector
This commit is contained in:
commit
bd9a63a73c
|
@ -41,7 +41,8 @@
|
|||
"matches": [
|
||||
"https://*.adblockplus.org/*",
|
||||
"https://*.adblockplus.me/*",
|
||||
"https://www.fanboy.co.nz/*"
|
||||
"https://www.fanboy.co.nz/*",
|
||||
"https://github.com/gorhill/uBlock/wiki/Filter-lists-from-around-the-web"
|
||||
],
|
||||
"js": ["js/subscriber.js"],
|
||||
"run_at": "document_idle"
|
||||
|
|
|
@ -355,7 +355,10 @@ const contentObserver = {
|
|||
doc.removeEventListener(e.type, docReady, true);
|
||||
lss(this.contentBaseURI + 'contentscript-end.js', sandbox);
|
||||
|
||||
if ( doc.querySelector('a[href^="abp:"]') ) {
|
||||
if (
|
||||
doc.querySelector('a[href^="abp:"]') ||
|
||||
loc.href === 'https://github.com/gorhill/uBlock/wiki/Filter-lists-from-around-the-web'
|
||||
) {
|
||||
lss(this.contentBaseURI + 'subscriber.js', sandbox);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ if ( document instanceof HTMLDocument === false ) {
|
|||
}
|
||||
|
||||
// Because in case
|
||||
if ( !vAPI ) {
|
||||
if ( typeof vAPI !== 'object' ) {
|
||||
//console.debug('subscriber.js > vAPI not found');
|
||||
return;
|
||||
}
|
||||
|
@ -52,7 +52,10 @@ if ( !vAPI ) {
|
|||
// The links look like this:
|
||||
// abp:subscribe?location=https://easylist-downloads.adblockplus.org/easyprivacy.txt[...]
|
||||
|
||||
if ( document.querySelector('a[href^="abp:"]') === null ) {
|
||||
if (
|
||||
document.querySelector('a[href^="abp:"]') === null &&
|
||||
window.location.href !== 'https://github.com/gorhill/uBlock/wiki/Filter-lists-from-around-the-web'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -80,9 +83,12 @@ var onAbpLinkClicked = function(ev) {
|
|||
return;
|
||||
}
|
||||
var matches = /^abp:\/*subscribe\/*\?location=([^&]+).*title=([^&]+)/.exec(href);
|
||||
if ( matches === null ) {
|
||||
matches = /^https?:\/\/[^?]+\?location=([^&]+).*title=([^&]+)/.exec(href);
|
||||
if ( matches === null ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var location = decodeURIComponent(matches[1]);
|
||||
var title = decodeURIComponent(matches[2]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue