mirror of
https://github.com/gorhill/uBlock.git
synced 2025-04-07 16:52:03 +08: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
@ -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…
x
Reference in New Issue
Block a user