-
Notifications
You must be signed in to change notification settings - Fork 192
Description
It seems you do have support for the has-text selector?
adblock-rust/tests/unit/filters/cosmetic.rs
Lines 714 to 720 in 1bf068d
| check_procedural( | |
| ".items:has-text(Sponsored)", | |
| vec![ | |
| CosmeticFilterOperator::CssSelector(".items".to_string()), | |
| CosmeticFilterOperator::HasText("Sponsored".to_string()), | |
| ], | |
| ); |
But this does not seem to work in Brave? Anything with :has-text(...) in it does not seem to parse correctly?
It's incredibly hard to tell what's going on - in the "block element" dialog, there is no indication of whether or not your selector is even valid. You can't tell if your selector has a syntax error, or it just doesn't match any elements. I don't understand how people develop or test filters for this ad blocker? Is this really the best/only tool we have for this?
(I want to block "Reels" on facebook, but there are literally no stable selectors to be had anywhere on the page - every single ID and class name are generated at build-time and will change with their next deployment. The only reasonably stable selector would be a text selector. I know this would have performance implications.)