From c744bc36eccaddafdeec95b4d6a14ca9065f4576 Mon Sep 17 00:00:00 2001 From: gwarser Date: Sat, 7 Sep 2019 20:18:33 +0200 Subject: [PATCH] (revert) "Important" box does not work in this case (it should apply to the end of section) --- Procedural-cosmetic-filters.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Procedural-cosmetic-filters.md b/Procedural-cosmetic-filters.md index 4ee43d7..daa7f61 100644 --- a/Procedural-cosmetic-filters.md +++ b/Procedural-cosmetic-filters.md @@ -12,11 +12,9 @@ Normal, standard cosmetic filters are _declarative_, i.e. they are used as selec _Procedural_ means javascript code is used to find DOM elements which must be hidden. A procedural cosmetic filter makes use of cosmetic filter _operator_, which will tell uBO how to find/filter DOM elements in order to find which DOM elements to target. -> *** -> **Important:** -> -> Procedural filters must always be specific, i.e. prefixed with the hostname of the site(s) on which they are meant to apply[[exception](https://github.com/gorhill/uBlock/wiki/Advanced-settings#allowgenericproceduralfilters)]. If a procedural cosmetic filter is generic, i.e. meant to apply everywhere, it will be discarded by uBO. Examples: Good, because specific: `example.com##body > div:has-text(Sponsored)`. Bad, because generic: `##body > div:has-text(Sponsored)`. The element picker always prefix automatically with the hostname to ensure created cosmetic filters are specific. -> *** +**Important:** + +Procedural filters must always be specific, i.e. prefixed with the hostname of the site(s) on which they are meant to apply[[exception](https://github.com/gorhill/uBlock/wiki/Advanced-settings#allowgenericproceduralfilters)]. If a procedural cosmetic filter is generic, i.e. meant to apply everywhere, it will be discarded by uBO. Examples: Good, because specific: `example.com##body > div:has-text(Sponsored)`. Bad, because generic: `##body > div:has-text(Sponsored)`. The element picker always prefix automatically with the hostname to ensure created cosmetic filters are specific. Also note that concatenating multiple procedural selectors in one filter is not supported. `example.com##p:has(img),div:has-text(advert)` will not work as expected ([#453](https://github.com/uBlockOrigin/uBlock-issues/issues/453)).