mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-07-01 12:30:23 +12:00
this fixes #224 for Chromium
This commit is contained in:
parent
b1acfb08e6
commit
7243aedf17
|
@ -55,6 +55,11 @@ const contentObserver = {
|
||||||
cpMessageName: hostName + ':shouldLoad',
|
cpMessageName: hostName + ':shouldLoad',
|
||||||
ignoredPopups: new WeakMap(),
|
ignoredPopups: new WeakMap(),
|
||||||
uniqueSandboxId: 1,
|
uniqueSandboxId: 1,
|
||||||
|
subscriberTargets: {
|
||||||
|
'adblockplus.org': true,
|
||||||
|
'adblockplus.me': true,
|
||||||
|
'fanboy.co.nz': true
|
||||||
|
},
|
||||||
|
|
||||||
get componentRegistrar() {
|
get componentRegistrar() {
|
||||||
return Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
return Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
||||||
|
@ -295,6 +300,27 @@ const contentObserver = {
|
||||||
};
|
};
|
||||||
|
|
||||||
subject.addEventListener('DOMContentLoaded', docReady, true);
|
subject.addEventListener('DOMContentLoaded', docReady, true);
|
||||||
|
|
||||||
|
/* Does not work, I do not know why
|
||||||
|
|
||||||
|
let docIdle = function(e) {
|
||||||
|
this.removeEventListener(e.type, docIdle);
|
||||||
|
lss(this.contentBaseURI + 'subscriber.js', sandbox);
|
||||||
|
};
|
||||||
|
|
||||||
|
var target = loc.host;
|
||||||
|
while ( target !== '' ) {
|
||||||
|
if ( this.subscriberTargets.hasOwnProperty(target) ) {
|
||||||
|
subject.addEventListener('load', docIdle);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
let pos = target.indexOf('.');
|
||||||
|
if ( pos === -1 ) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
target = target.slice(pos + 1);
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue