mirror of https://github.com/gorhill/uBlock.git
[mv3] Fix bad call in nostif
This commit is contained in:
parent
ffc46534ac
commit
f19fd391de
|
@ -67,14 +67,14 @@ const scriptlet = (
|
||||||
needle = needle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
needle = needle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||||
}
|
}
|
||||||
const reNeedle = new RegExp(needle);
|
const reNeedle = new RegExp(needle);
|
||||||
const regexpTest = RegExp.prototype.test.call;
|
const regexpTest = RegExp.prototype.test;
|
||||||
self.setTimeout = new Proxy(self.setTimeout, {
|
self.setTimeout = new Proxy(self.setTimeout, {
|
||||||
apply: function(target, thisArg, args) {
|
apply: function(target, thisArg, args) {
|
||||||
const a = String(args[0]);
|
const a = String(args[0]);
|
||||||
const b = args[1];
|
const b = args[1];
|
||||||
let defuse;
|
let defuse;
|
||||||
if ( needle !== '' ) {
|
if ( needle !== '' ) {
|
||||||
defuse = regexpTest(reNeedle, a) !== needleNot;
|
defuse = regexpTest.call(reNeedle, a) !== needleNot;
|
||||||
}
|
}
|
||||||
if ( defuse !== false && delay !== undefined ) {
|
if ( defuse !== false && delay !== undefined ) {
|
||||||
defuse = (b === delay || isNaN(b) && isNaN(delay) ) !== delayNot;
|
defuse = (b === delay || isNaN(b) && isNaN(delay) ) !== delayNot;
|
||||||
|
|
Loading…
Reference in New Issue