From 17f43fb6e1e7cfb767d30448dd5aebfa84772b4e Mon Sep 17 00:00:00 2001 From: gwarser Date: Fri, 6 Jul 2018 12:00:16 +0200 Subject: [PATCH] Updated Procedural cosmetic filters (markdown) --- Procedural-cosmetic-filters.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Procedural-cosmetic-filters.md b/Procedural-cosmetic-filters.md index 06126bf..feaec7b 100644 --- a/Procedural-cosmetic-filters.md +++ b/Procedural-cosmetic-filters.md @@ -23,7 +23,8 @@ Efficient procedural cosmetic filters (or any cosmetic filters really) are the o - _arg_: **must** be a plain CSS selector. - Examples: - `strikeout.me##body > div:has(img[alt="AdBlock Alert"])` - - `yandex.ru##.serp-item:has(:scope > .organic > .organic__subtitle > .label_color_yellow)` + - `yandex.ru##.serp-item:has(:scope > .organic > .organic__subtitle > .label_color_yellow)` - `:scope` forces `.organic` to match inside `.serp-item`[1](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll#JavaScript),[2](https://developer.mozilla.org/en-US/docs/Web/CSS/:scope) + - `strdef.world##div[style]:has(> a[href="http://www.streamdefence.com/index.php"])` - `>` forces `a` to be direct descendant of `div` The `:has(arg)` operator is actually a planned pseudo-class in CSS4, but as of writing no browser supports it. Instead of waiting for browser vendors to provide support, uBO provides support for `:has(arg)` as a procedural operator. By restricting `subject` and `arg` to be valid CSS selectors, this means uBO will be able to support the `:has(...)` operator declaratively once a browser supports it.