From dfd45efa467becaa112952daa01d13b2859cd93e Mon Sep 17 00:00:00 2001 From: gwarser Date: Sat, 7 Mar 2020 23:20:05 +0100 Subject: [PATCH] :remove() --- Procedural-cosmetic-filters.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Procedural-cosmetic-filters.md b/Procedural-cosmetic-filters.md index 4d9bf7b..260868d 100644 --- a/Procedural-cosmetic-filters.md +++ b/Procedural-cosmetic-filters.md @@ -154,6 +154,20 @@ See also [`Element.closest()` ↪](https://developer.mozilla.org/en-US/docs/Web/ *** +### `subject:remove()` + +- Description: remove elements from the DOM tree. +- Chainable: No. +- _subject_: Can be a plain CSS selector, or a procedural cosmetic filter. + +Introduced in uBO [1.25.3b0](https://github.com/gorhill/uBlock/commit/72bb70056843024b1a31fe1ab9c90bd4e8260ba2). Fixes [#2252](https://github.com/gorhill/uBlock/issues/2252) + +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. + +*** + ### `subject:watch-attrs(arg)` Deprecated in favor of [`subject:watch-attr(arg)`](#subjectwatch-attrarg) in [1.20.1b3](https://github.com/gorhill/uBlock/commit/41685f4cce084f3f89e9cdd8fc1cde5b57862958)