uBlock/src/js/codemirror
Raymond Hill 9dece3bd30
Add new procedural cosmetic operator: :matches-path(...)
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1690

New procedural operator: `:matches-path(...)`

Description: this is a all-or-nothing passthrough operator, which
on/off behavior is dictated by whether the argument match the
path of the current location. The argument can be either plain
text to be found at any position in the path, or a literal regex
against which the path is tested.

Whereas cosmetic filters can be made specific to whole domain,
the new `:matches-path()` operator allows to further narrow
the specificity according to the path of the current document
lcoation.

Typically this procedural operator is used as first operator in
a procedural cosmetic filter, so as to ensure that no further
matching work is performed should there be no match against the
current path of the current document location.

Example of usage:

    example.com##:matches-path(/shop) p

Will hide all `p` elements when visiting `https://example.com/shop/stuff`,
but not when visiting `https://example.com/` or any other page
on `example.com` which has no instance of `/shop` in the path part
of the URL.
2021-08-21 09:41:48 -04:00
..
search-thread.js Fine tune CodeMirror editor's search widget 2020-08-03 08:55:02 -04:00
search.js Fine tune visuals of CodeMirror's search feature 2020-08-04 10:14:38 -04:00
ubo-dynamic-filtering.js Export the rule-based filtering engines to the nodejs package 2021-08-03 12:19:25 -04:00
ubo-static-filtering.js Add new procedural cosmetic operator: :matches-path(...) 2021-08-21 09:41:48 -04:00