mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Improve trusted-suppress-native-method scriptlet
As per AdGuard's documentation `/.../` is a valid matcher, to match a string argument against a regex pattern.
This commit is contained in:
parent
3ae28423b9
commit
cb6c11ab6f
1 changed files with 3 additions and 0 deletions
|
|
@ -3313,6 +3313,9 @@ function trustedSuppressNativeMethod(
|
|||
if ( /^".*"$/.test(v) ) {
|
||||
return { type: 'pattern', re: safe.patternToRegex(v.slice(1, -1)) };
|
||||
}
|
||||
if ( /^\/.+\/$/.test(v) ) {
|
||||
return { type: 'pattern', re: safe.patternToRegex(v) };
|
||||
}
|
||||
if ( v === 'false' ) {
|
||||
return { type: 'exact', value: false };
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue