mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Updated "no-fetch-if" (added support for negated matches)
parent
4538961650
commit
2bb3f31503
1 changed files with 2 additions and 1 deletions
|
|
@ -651,7 +651,7 @@ Defuses calls to `fetch()` by returning a promise which always resolve to an emp
|
|||
|
||||
Parameters:
|
||||
- optional, space-separated list of conditions which must be ALL fulfilled in order for the defusing to take place:
|
||||
- string/_regular expression_ matching in URL passed to `fetch()` call
|
||||
- string/_regular expression_, prefixed by `!` for negation (new in [1.59.1b13](https://github.com/gorhill/uBlock/commit/e8202af11d)), matching in URL passed to `fetch()` call
|
||||
- colon-separated `name:value` pairs of [`init` option name](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) and string/_regular expression_ matching in value of that option passed to `fetch()` call.
|
||||
- optional, (new in [1.58.1rc4](https://github.com/gorhill/uBlock/commit/e785b99338)), string for defining response type / JSON string with
|
||||
properties to set on the returned response instance, original response type is used if not specified:
|
||||
|
|
@ -663,6 +663,7 @@ When used without parameters, the parameters passed to `no-fetch-if` will be log
|
|||
Examples:
|
||||
- `example.com##+js(no-fetch-if, method:HEAD)`
|
||||
- `example.com##+js(no-fetch-if, adsbygoogle.js)`
|
||||
- `example.com##+js(no-fetch-if, !adsbygoogle.js)`
|
||||
- `example.com##+js(no-fetch-if, adsbygoogle.js method:HEAD)`
|
||||
- `example.com##+js(no-fetch-if, /adsbygoogle.js$/ method:/HEAD|POST/)`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue