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

Exception filters do not disable domain-based cosmetic filters #229

Closed
g3939434 opened this issue May 22, 2015 · 2 comments
Closed

Exception filters do not disable domain-based cosmetic filters #229

g3939434 opened this issue May 22, 2015 · 2 comments

Comments

@g3939434
Copy link

Exception filters do not disable domain-based cosmetic filters.
Tested with: uBlock 0.9.7.6-dev.0, Firefox 38.0.1, Windows 8.1

Steps to Reproduce:

  1. Add the following filters:
    google.com###lga
    @@||google.com^$elemhide
  2. Visit google.com:
    The logo is hidden.
    Exception filters fail to disable domain-based cosmetic filters.

Control group:

  1. Add the following filters
    ###lga
    @@||google.com^$elemhide
  2. Visit google.com
    The logo is visible.
    Exception filters disable cosmetic filters successfully.

I discovered this bug when a website only hidden part of the elements suddenly. The log only listed some cosmetic filters. Later I found out that one of the subscription lists added @@||example.com^$elemhide. So it would be better if the log can list the exceptions filters on cosmetic filters the same way as the net block filters. And the ability to override $elemhide like the way net block filters does by using !important, for example.

@gorhill
Copy link
Owner

gorhill commented May 22, 2015

I implemented it this way on purpose, i.e. to have elemhide cancel only the generic cosmetic filters. To have elemhide cancel specific cosmetic filters does not make much sense to me.

Since generic cosmetic filters apply everywhere, they are the ones which usually need cancelling. If a filter list maintainer feels the need to use a elemhide filter option to cancel specific cosmetic filters, than common sense says that the specific cosmetic filters should be removed altogether, not cancelled with another filter (though I see there could be in theory a edge case, in practice I didn't see a case yet).

Can you share the case you encountered? I would like to see if it's a "breaking the page" case.

if the log can list the exceptions filters on cosmetic filters

Issue #127.

@g3939434
Copy link
Author

Thanks for your reply and explanation.
No doubt your method has a better logic. I just got a little bit confused when the result was different comparing to Adblock Plus.

Can you share the case you encountered? I would like to see if it's a "breaking the page" case.

It's definitely not a "breaking the page" case. The list maintainers did it right in order to counter anti-adblock. I just don't need that $elemhide after using a script to remove anti-adblock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants