
Loading…
Dynamic filter to block only external requests #713
What is the issue exactly? That you have to use two rules instead of one?
Tell me what you want to accomplish, not what you did.
If I hadn't told you that I had already found a way, you or somebody else would've assumed that I hadn't tried it by myself and then just pointed me to the wiki page.
With my rules, translate.google.com still works as expected, but external requests to its widget are blocked. I just wanted to make sure that my solution is the most efficient way to do it, or if there was a method to achieve it with a single rule.
@anewuser if I understand correctly, you should try this:
* translate.google.com 3p block
3p is for all third-party requests.
@chrisaljoudi That would not work. uBlock works differently than uMatrix.
A rule must not have both a specific destination hostname and a specific type, at least one of the destination hostname or the type must be *. Supporting anything more than this would require a larger matrix than the current UI -- i.e. uMatrix. Of course I don't intend to go further than what we have now in uBlock.
-
* translate.google.com * block= good, because type is* -
translate.google.com translate.google.com * noop= good, because type is* -
translate.google.com * 3p block= good, because destination type is* -
* translate.google.com 3p-script block= bad, because neither destination or type is* -
* translate.google.com 3p block= bad, because neither destination or type is* -
* * * block= good, because at least one of destination or type is*
Bottom-line, if the UI allows it, it's allowed, otherwise the assumption should be it's not supported.
Thank you for the help. Sorry for not being clear at first.
I've written these dynamic filters to block Google Translate on external sites:
Could this be simplied to a single rule? I've tried using this to no avail:
Running uBlock 0.8.0.6 on Firefox 36.