mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Fix hasty last commit
This commit is contained in:
parent
36f82b8a5a
commit
f07b1475a3
1 changed files with 2 additions and 3 deletions
|
|
@ -41,7 +41,7 @@
|
|||
if ( target === '' || target === '{{1}}' ) { return; }
|
||||
const reRegexEscape = /[.*+?^${}()|[\]\\]/g;
|
||||
const needle = '{{2}}';
|
||||
const reText = (( ) => {
|
||||
const reNeedle = (( ) => {
|
||||
if ( needle === '' || needle === '{{2}}' ) { return /^/; }
|
||||
if ( /^\/.+\/$/.test(needle) ) {
|
||||
return new RegExp(needle.slice(1,-1));
|
||||
|
|
@ -57,7 +57,6 @@
|
|||
return new RegExp(context.replace(reRegexEscape, '\\$&'));
|
||||
})();
|
||||
const thisScript = document.currentScript;
|
||||
const re = new RegExp(reText);
|
||||
const chain = target.split('.');
|
||||
let owner = window;
|
||||
let prop;
|
||||
|
|
@ -84,7 +83,7 @@
|
|||
e instanceof HTMLScriptElement &&
|
||||
reContext.test(e.src) &&
|
||||
e !== thisScript &&
|
||||
re.test(e.textContent)
|
||||
reNeedle.test(e.textContent)
|
||||
) {
|
||||
throw new ReferenceError(magic);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue