mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Updated "urlskip": positional lookup + example, also base64 example
parent
856d66ef1a
commit
899ee5b80a
1 changed files with 15 additions and 0 deletions
|
|
@ -1033,6 +1033,8 @@ The syntax is `urlskip=[steps]`, where steps is a space-separated list of extrac
|
|||
Valid directives:
|
||||
|
||||
- `?name`: the value of parameter named `name` will be extracted and replace the current URL as the new URL
|
||||
- `&i` ([dev build 1.60.1b6+](https://github.com/gorhill/uBlock/commit/64b2086ba4)): meant to lookup a parameter's name at position `i` (1-based). The parameter name will be used as the
|
||||
URL (whereas `?` is meant to lookup a parameter's value)
|
||||
- `+https`: the protocol of the current URL will be forced to `https:`<br>
|
||||
This directive will succeed only if the protocol of the current URL is either absent or matches `http:` or `https:`
|
||||
- `-base64` ([dev build 1.61.1+](https://github.com/gorhill/uBlock/commit/e81e70937f5b6f8f98bdd8e6f71af030486efab8)): decode as a base64-encoded string
|
||||
|
|
@ -1056,6 +1058,19 @@ The above filter will cause navigation to `https://example.com/path/to/tracker?u
|
|||
|
||||
_Note:_ No skip will occur if not all extraction directives can be fulfilled in a given URL. For example, `https://example.com/path/to/tracker?url=https%3A%2F%2Fexample.org%2Fpath%2Fto%2Ftracker` won't be skipped by the filter above because the `?to` step can't be fulfilled.
|
||||
|
||||
```adb
|
||||
||shrinkearn.com/full?$urlskip=?url -base64
|
||||
```
|
||||
|
||||
The above filter will decode `base64` encoded URL in `urlskip=` in example link `https://shrinkearn.com/full?api=3dd1f43f5fded450a0e4691e503bf19b31f35f44&url=aHR0cHM6Ly9rcmFrZW5maWxlcy5jb20vdmlldy9zamJ1RmpQVTF2L2ZpbGUuaHRtbA==&type=2`.
|
||||
|
||||
```adb
|
||||
||pixiv.net/jump.php?$urlskip=&1
|
||||
```
|
||||
|
||||
The above filter will lookup a parameter's name at given position in example link: `https://www.pixiv.net/jump.php?https%3A%2F%2Fx.com%2FExample_Username`, the parameter name will be used as the
|
||||
URL (whereas `?` is meant to lookup a parameter's value).
|
||||
|
||||
<details><summary>Technical notes</summary>
|
||||
|
||||
First commit in [1.59.1b22](https://github.com/gorhill/uBlock/commit/266ec4894b).
|
||||
|
|
|
|||
Loading…
Reference in a new issue