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

Dynamic, static or advanced cosmetic filters settings. #617

Closed
Piter432 opened this issue Aug 20, 2015 · 3 comments
Closed

Dynamic, static or advanced cosmetic filters settings. #617

Piter432 opened this issue Aug 20, 2015 · 3 comments
Labels

Comments

@Piter432
Copy link

Currently there's only per-site switch in uBlock's Origin to enable/disable cosmetic filters. I think, should be also settings to enable/disable specific cosmetic filter/s without disabling/enabling all cosmetic filters on current site or all sites. What do you think about that, @gorhill?

@harshanvn
Copy link

enable/disable specific cosmetic filter/s without disabling/enabling all cosmetic filters

this can be achieved using Dom Inspector (accessed from Logger) @https://github.com/gorhill/uBlock/wiki/DOM-inspector

@Piter432
Copy link
Author

Unfortunately, this doesn't work with many filters lists.

@sumyungguy
Copy link

sumyungguy commented Sep 12, 2015

Piter432, very good point. Practical fine-grain control of cosmetic filters in 3rd-party lists is an important capability. But can you explain why/how the DOM inspector "doesn't work for many filters lists"? Because it has worked for me...

I had an issue where a domain-specific cosmetic (element hiding) rule in Fanboy's Annoyances list was incorrectly blocking some genuine image content, because the image had a certain CSS class. Dynamic filtering wasn't useful, because I could only allow all requests for the site, which un-hid a lot of social buttons and so on.

Here's what I did, in Firefox:

  • temporarily turn off ublock for the site with the "standby switch", so I could see the incorrectly hidden image
  • right click and choose "Inspect Element", to use Firefox's native DOM inspector to find and note its place in the DOM
  • open ublock's logger and click on </> to open ublock's DOM inspector, and drill down to find it there
  • on the right, in red, was the name of the rule that was hiding it; click on that and it gets struck out
  • click the save (floppy disk) icon, and then "create" to create an override exception rule
  • close the ublock logger/DOM inspector tab, and reload the page
  • the exception rule showed up in the "my filters" tab, and the site was then working properly.

I have to say though, that the procedure was somewhat obscure and hard to figure out. Not sure what to suggest to make it more obvious. Dynamic filtering is good for unbreaking basic URL/domain based blocking rules, but it would be good if overriding a cosmetic filter in a 3rd party list was easier.

In Adblock Plus, it's fairly easy to open the list of "blockable items", and click on the "x" to disable a cosmetic rule from a 3rd-party list. It would be nice if you could do the same in ublock's logger.

On the other hand, neither ABP nor ublock's list show that a particular image is being blocked by a particular cosmetic filter rule; both of them in my case indicated that the image wasn't being blocked. [edit: this may have been a bug or missing feature, since the uBlock logger does now indicate items blocked by cosmetic filters]. So actually, ublock's DOM inspector is more useful than ABP's interface, for tracking down why something is being incorrectly filtered.

Of course it makes sense that the UI is more oriented towards blocking visible elements, than unblocking invisible ones... At first I tried disabling ublock for the site, then using the element picker mode to try to generate an exception, but it wasn't helpful.

If there was a right-click context menu item similar to Firefox's "inspect element", for "inspect element in ublock", that brought you directly to the element in ublock's DOM inspector, that would be a start. The problem then, is that if you've disabled ublock for the site in order to see the hidden element, then it won't show you anymore, in the ublock DOM inspector, the cosmetic rule that's hiding it, because the rule is now disabled!

Any suggestions welcome... cheers...

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

No branches or pull requests

4 participants