mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-13 02:14:17 +01:00
Moved down "regex-based values as target domain for static extended filters"
parent
8a6f94b9e7
commit
8e06b1e8d6
1 changed files with 16 additions and 9 deletions
|
@ -2,15 +2,7 @@ uBlock Origin (uBO) supports most of the EasyList filter syntax. You can refer t
|
||||||
|
|
||||||
While uBO does not support some specific cases, it further extends the EasyList filter syntax, which also may share with AG's extended syntax. [Here](./Syntax-quirks) are the most surprising cases documented.
|
While uBO does not support some specific cases, it further extends the EasyList filter syntax, which also may share with AG's extended syntax. [Here](./Syntax-quirks) are the most surprising cases documented.
|
||||||
|
|
||||||
Starting with [1.46.1b15](https://github.com/gorhill/uBlock/commit/81498474d6d440b032681aa9952d593749b39efb), you can use regex-based values as target domain for static extended filters. Examples of usage:
|
Starting with [1.46.1b15](https://github.com/gorhill/uBlock/commit/81498474d6d440b032681aa9952d593749b39efb), you can use regex-based values as target domain for static extended filters, see more [here](#hostame-regex).
|
||||||
- `/img[a-z]{3,5}\.buzz/##+js(nowoif)` (solves: [regex-fied domain](https://github.com/uBlockOrigin/uBlock-issues/discussions/2234))
|
|
||||||
- solves: [Hiding rules are unable to specify to only block on the core domain and none of the subdomains (e.g. ~*.example.org doesn't work)](https://github.com/uBlockOrigin/uBlock-issues/issues/3291) :
|
|
||||||
- `/^example\.org$/##h1` - matches only `example.org` without subdomains
|
|
||||||
- `/^www\.example\.org$/##h1` - matches only `www.example.org` without subdomains and without `example.org`
|
|
||||||
- `/^(?:www\.)?example\.org$/##h1` - matches only `example.org` + `www.example.org` without subdomains
|
|
||||||
- `/^example\.org$/,somesite.org##h1` - can also be combined with normal names
|
|
||||||
|
|
||||||
Use sparingly, when no other solution is practical from a maintenance point of view -- keeping in mind that uBO has to iterate through all the regex-based values, unlike plain hostname or entity-based values which are mere lookups.
|
|
||||||
|
|
||||||
- [Not supported](#not-supported)
|
- [Not supported](#not-supported)
|
||||||
- [Pre-parsing directives](#pre-parsing-directives)
|
- [Pre-parsing directives](#pre-parsing-directives)
|
||||||
|
@ -21,6 +13,7 @@ Use sparingly, when no other solution is practical from a maintenance point of v
|
||||||
- [Narrowing options for network filters ↪](./Filter-Performance#narrowing-options-for-network-filters)
|
- [Narrowing options for network filters ↪](./Filter-Performance#narrowing-options-for-network-filters)
|
||||||
- [Static extended filtering](#static-extended-filtering)
|
- [Static extended filtering](#static-extended-filtering)
|
||||||
- [Entity](#entity)
|
- [Entity](#entity)
|
||||||
|
- [Hostame regex](#hostame-regex)
|
||||||
- [Specific-generic](#specific-generic)
|
- [Specific-generic](#specific-generic)
|
||||||
- [Cosmetic filters](#cosmetic-filters)
|
- [Cosmetic filters](#cosmetic-filters)
|
||||||
- [Procedural cosmetic filters ↪](./Procedural-cosmetic-filters)
|
- [Procedural cosmetic filters ↪](./Procedural-cosmetic-filters)
|
||||||
|
@ -960,6 +953,20 @@ Since the base domain name gets used to derive the name of the "entity", `google
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
#### Hostname regex
|
||||||
|
|
||||||
|
Starting with [1.46.1b15](https://github.com/gorhill/uBlock/commit/81498474d6d440b032681aa9952d593749b39efb), you can use regex-based values as target domain (hostname) for static extended filters. Examples of usage:
|
||||||
|
- `/img[a-z]{3,5}\.buzz/##+js(nowoif)` (solves: [regex-fied domain](https://github.com/uBlockOrigin/uBlock-issues/discussions/2234))
|
||||||
|
- solves: [Hiding rules are unable to specify to only block on the core domain and none of the subdomains (e.g. ~*.example.org doesn't work)](https://github.com/uBlockOrigin/uBlock-issues/issues/3291) :
|
||||||
|
- `/^example\.org$/##h1` - matches only `example.org` without subdomains
|
||||||
|
- `/^www\.example\.org$/##h1` - matches only `www.example.org` without subdomains and without `example.org`
|
||||||
|
- `/^(?:www\.)?example\.org$/##h1` - matches only `example.org` + `www.example.org` without subdomains
|
||||||
|
- `/^example\.org$/,somesite.org##h1` - can also be combined with normal names
|
||||||
|
|
||||||
|
Use sparingly, when no other solution is practical from a maintenance point of view -- keeping in mind that uBO has to iterate through all the regex-based values, unlike plain hostname or entity-based values which are mere lookups.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
#### Specific-generic
|
#### Specific-generic
|
||||||
|
|
||||||
New in [1.25.0](https://github.com/gorhill/uBlock/commit/3fab7bfdb4f892f3d33159fd53ccf1d5342a090a).
|
New in [1.25.0](https://github.com/gorhill/uBlock/commit/3fab7bfdb4f892f3d33159fd53ccf1d5342a090a).
|
||||||
|
|
Loading…
Reference in a new issue