I apologize if this has been asked already, but I was wondering if there is a way to do this particular thing I was thinking. I know the rule parsing algorithm is very robust in uBlock, so I am hopeful it is already baked in or easily extended.
Here is my scenario. Say you want to check the option "Block remote fonts" so that it generally blocks all remote fonts, would love that. However, there are several legitimately needed fonts that are unfortunately hosted offsite or on CDN by just about everyone (think fonts such as FontAwesome or Roboto which are nearly always cross-domained which would tag them as remote).
I want to be able to add an "exception" for a particular remote font without going all or nothing by choosing to disable them all or enable them all just for a few exception cases. I am hoping there is a built in syntax for doing it in the rules tab, perhaps using the no-remote-fonts trigger already there but extended to include the exceptions perhaps a la block/filter rules we do for ads or whatnot?
I would be grateful for the assist on this or alternatively I would be just as happy being pointed to the section in the documentation that addresses this and I will happily do it myself. Or an issue that already answers this that I couldn't find. TIA.
You can use static variant remote fonts blocking. Uncheck "Block remote fonts" and add
$font,third-party to My filters
Now you can add an exceptions
@@FontAwesome$font @@Roboto$font
I think I get what you are saying, so I am going to play with it and see how it actually behaves. I will get back to you on the success of it or if it does what I need. If so, then thanks in advance. In the meantime, any other feedback would be excellent.
Alternatively, you can set website based exceptions like no-remote-fonts: example.com false, so web fonts on example.com will not be blocked and you will still be blocking web fonts on other websites.
Use this page only to report bugs, i.e. problems that make uBlock Origin stop working. Please close this issue and read this carefully before posting here again: CONTRIBUTING.md.
For support/discussions, there is Mozilla Discourse.
@uBlock-user thank you, that might actually work better, will give that a shot. The other suggestion "worked" but had a lot of nonsensical practical behavior that was not helpful.
@anewuser not helpful as the context of the discussion is very legitimately applicable to development of the software - as it can lead to observation of things that can be improved. You are welcome to your opinion but don't presume to dictate.
If the problem has been solved, the thread can be closed.
@uBlock-user I ended up using this method but what I found is that it creates a lot of sparse entries that I have to go back and consolidate so that easier to track. But besides that, seems to be the way to go, maybe I can find a way to get it to auto-consolidate these $font rules as one entry. We'll see.
@atavic yes when the issue is done, it will be closed. thank you. Rushing testing doesn't do anyone any service.