Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cosmetic filtering to override in-page !important styles #19085

Closed
antonok-edm opened this issue Oct 28, 2021 · 4 comments
Closed

Allow cosmetic filtering to override in-page !important styles #19085

antonok-edm opened this issue Oct 28, 2021 · 4 comments
Assignees
Labels
bug closed/duplicate Issue has already been reported feature/shields/adblock Blocking ads & trackers with Shields features/shields/cosmetic-filtering OS/Android Fixes related to Android browser functionality OS/Desktop

Comments

@antonok-edm
Copy link
Collaborator

Followup for #17013 (comment)

Steps to reproduce

From an EU IP (the cookie banner does not show up in the US):

  1. go to brave://adblock
  2. Set the Custom Filters textarea to just ###cookiebanner (and nothing else)
  3. Go to https://www.circleci.com
  4. Obnoxious cookiebanner is displayed (the element containing it is a div with id cookiebanner)

The cookie banner should be hidden; any cosmetic filters entered in brave://adblock's "Custom filters" box should not be subject to first-party exemption heuristics.

@JakobJingleheimer
Copy link

Bump. Any chance of a fix for this? It was a great feature 😀

@ceejay2k
Copy link

ceejay2k commented Jan 18, 2022

Same Issue for. me You can use right-click on content -> brave -> block element to block a certain element. it only works once (the element is blocked, the rule is added to custom rules, but after reload/restart/new page it is not applied).

i just tried this filter to get an annoying empty space on top of the page gone, obviously its only empty because the ad itself was blocked already:

arstechnica.com##.ad.ad_crown

will not work. now use the context menu to block the same element (the rule was actually created by this) and see what happens (see above).

@antonok-edm
Copy link
Collaborator Author

Finally got a chance to look into this one. It appears to be related to #20177 - i.e., not working in cases where there's an !important added to the display style of the element in question. Not sure how we let this one regress, but I will be working on the fix shortly and making sure there's adequate testing to prevent it from happening again.

@antonok-edm antonok-edm added this to the Closed / Dupe / Invalid milestone Jan 28, 2022
@antonok-edm
Copy link
Collaborator Author

Ok, this should be fixed by brave/brave-core#12038 in the next Nightly build - please let me know if you see any other issues!

@antonok-edm antonok-edm added the closed/duplicate Issue has already been reported label Jan 28, 2022
@antonok-edm antonok-edm changed the title Custom generic cosmetic filters not force-applied in Standard Shields blocking mode Allow cosmetic filtering to override in-page !important styles Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug closed/duplicate Issue has already been reported feature/shields/adblock Blocking ads & trackers with Shields features/shields/cosmetic-filtering OS/Android Fixes related to Android browser functionality OS/Desktop
Projects
None yet
Development

No branches or pull requests

3 participants