mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Fine tune regex used to detect inline script contexts
Related commit:
- b735ac6b6a
This commit is contained in:
parent
2533735c49
commit
1e91fb8733
@ -221,7 +221,7 @@
|
|||||||
}
|
}
|
||||||
const reDocURL = new RegExp(docURL.replace(reRegexEscape, '\\$&'), 'g');
|
const reDocURL = new RegExp(docURL.replace(reRegexEscape, '\\$&'), 'g');
|
||||||
const stack = err.stack
|
const stack = err.stack
|
||||||
.replace(/^.*?\b[gs]et\b[^\n\r]+?[\n\r]*/m, '')
|
.replace(/^.*?\b[gs]et\b[^\n\r]+?(?:[\n\r]+|$)/m, '')
|
||||||
.replace(reDocURL, '<inline-script>');
|
.replace(reDocURL, '<inline-script>');
|
||||||
const r = reNeedle.test(stack);
|
const r = reNeedle.test(stack);
|
||||||
if (
|
if (
|
||||||
|
Loading…
Reference in New Issue
Block a user