brave / adblock-rust

Brave's Rust-based adblock engine
Mozilla Public License 2.0
1.39k stars 119 forks source link

Filter list not fully working #313

Open ghost opened 11 months ago

ghost commented 11 months ago

I have added some ag filter lists as a custom filter to the shields which is based on adblock plus syntax. but those filter lists does not fully working with shields. Kindly resolve the issue.

antonok-edm commented 11 months ago

@Green-Leaves500 could you provide a link to the lists and/or specific filters that are not working?

antonok-edm commented 11 months ago

Looking at mail.com-related filters:

mail.com#?##content > .content-wrapper > .mod-container > .container-headline:has(> p:contains(/^SPONSORED NEWS$/))
mail.com#?#.content-wrapper > div[data-mod-name="container"]:has(> div > p:contains(/sponsored news/i))
mail.com#?#.blocks > div.block:has(> div.ad-container)
mail.com#?#.content-wrapper > div.mod-container > div.blocks > div.block > div.mod-taboolateasers:upward(div.mod-container)

Only the 3rd one uses supported syntax at the moment. The other 3 use :contains or :upward, which are procedural filters (see #293). I am working on them, but it won't work quite yet.

In the other list, related to gmx.com:

web.de,gmx.net,gmx.at,gmx.ch,gmx.com#$##abd-container { display: block !important; }

We don't support the #$#-syntax for :style(). That may also come at some point in the future, but not for now.


Generally, my recommendation is to stick with uBlock Origin-flavor syntax when possible. For example, Easylist Cookie List is very well supported by adblock-rust/Brave.

superlex commented 11 months ago

@Green-Leaves500 They know it :) https://github.com/brave/adblock-rust/issues/236 https://github.com/brave/adblock-rust/issues/293