uBlock/src/js/scriptlets
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
..
cosmetic-logger.js Add procedural cosmetic operators remove() and upward() 2020-03-07 14:25:06 -05:00
cosmetic-off.js guard against future instances of issue fixed in #3721 2018-05-03 09:55:36 -04:00
cosmetic-on.js guard against future instances of issue fixed in #3721 2018-05-03 09:55:36 -04:00
dom-inspector.js Code review re. dynamically loaded vapi-client-extra.js 2019-09-26 15:57:55 -04:00
dom-survey-elements.js Fine tune cosmetic filtering badge-related code 2019-11-03 09:38:36 -05:00
dom-survey-scripts.js Fine tune script tags survey scriptlet 2019-11-01 14:28:15 -04:00
element-picker.js Add procedural cosmetic operators remove() and upward() 2020-03-07 14:25:06 -05:00
load-large-media-all.js guard against future instances of issue fixed in #3721 2018-05-03 09:55:36 -04:00
load-large-media-interactive.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
noscript-spoof.js fix #308, #3436, https://github.com/uBlockOrigin/uBlock-issues/issues/155 2018-08-31 18:47:02 -04:00
should-inject-contentscript.js Minor generic code review of changes since 1.18.2 2019-02-02 08:09:34 -05:00
subscriber.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00