1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 10:22:30 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Raymond Hill
72bb700568
Add procedural cosmetic operators remove() and upward()
***

New procedural cosmetic operator: `:remove()`

Related issue:
- https://github.com/gorhill/uBlock/issues/2252

The purpose is to outright remove elements from the
DOM tree. Since `:remove()` is an "action" operator,
it must only be used as a trailing operator (just
like the `:style()` operator).

AdGuard's cosmetic filter syntax `{ remove: true; }`
will be converted to uBO's `:remove()` operator
internally.

***

New procedural cosmetic operator: `:upward(...)`

The purpose is to lookup an ancestor element.

When used with an integer argument, it is synonym of
`:nth-ancestor()`, which will be deprecated and which
will no longer be supported once no longer used in
mainstream filter lists.

Filter lists maintainers must only use `:upward(int)`
instead of `:nth-ancestor(int)` once the new operator
become available in all stable releases of uBO.

`:upward()` can also accept a CSS selector as argument,
in which case the nearest ancestor which matches the
CSS selector will be selected.
2020-03-07 14:25:06 -05:00
Raymond Hill
c4ee846cd4
Fix title 2019-09-15 14:53:18 -04:00
Raymond Hill
e0fd9750d4
Further fix new setTimeout-if/setInterval-if scriptlets
Addtionally, a dedicated test page has been added:

https://gorhill.github.io/uBlock/tests/scriptlet-injection-filters-1.html
2019-08-25 09:03:24 -04:00
Raymond Hill
10236552ca
Add test pages for procedural filters
Procedural cosmetic filters:
https://gorhill.github.io/uBlock/tests/procedural-cosmetic-filters.html

Procedural HTML filters:
https://gorhill.github.io/uBlock/tests/procedural-html-filters.html
2019-06-22 10:00:25 -04:00
Raymond Hill
1b6fea16da
3rd-gen hntrie, suitable for large set of hostnames 2018-12-04 13:02:09 -05:00
Raymond Hill
bfb9d50d23
hopefully increase mobile friendliness 2018-11-04 22:18:45 -02:00
Raymond Hill
6a2c6faeb4
typo 2018-11-04 22:15:46 -02:00
Raymond Hill
e18ec4357e
github-pages: ensure wasm resources can be loaded with Firefox 2018-11-04 22:12:21 -02:00
Raymond Hill
e2b330f211
move tests where they can be browsed by all online 2018-11-04 18:25:38 -02:00