
Loading…
Need help with exception syntax! #1160
You might want to try
@@popup.$domain=bodybuilding.com
@erkjhgdfn Hi! The rule you had there looks like it should work (or else I'm way behind on sleep). Mind sharing a URL where this is occurring?
@chrisaljoudi : Chris, according to the image the filter
popup.
was triggered (although I didn't see it on my system when I loaded that site). So, shouldn't the exception created for that one?
@tlu1024 Exception filters, I believe, don't have to be the exact "opposite" of the original filter. They just have to match the URL you're trying to allow.
For instance, say you have a filter that looks like this:
tracking.js$script
We can see that would block a URL like https://google.com/tracking.js, right?
Now, if we add the following exception filter:
@@||google.com^$script
That URL will no longer be blocked — because it matches the rule in the exception filter.
Am I making sense? Sorry if not.
The title of the page in his screenshot looks to be this link , http://www.bodybuilding.com/fun/7-quick-n-easy-lunches-for-a-healthy-diet.htm
Under "Ingredients", click the "1 can of Canned Light Tuna" link.
Using default lists didn't block the popup with popup.. I added popup.$popup to "My filters" to block it and to make an exception you have to add $popup or it didn't work.
This worked, @@||bodybuilding.com/fun/nutrient-popup.php^$popup
This didn't work, @@||bodybuilding.com/fun/nutrient-popup.php^
Thanks for the link — much appreciated. :)
I was mistaken — popup-related filters do indeed require the filter to explicitly mention the $popup type (which makes sense).
Sorry about that.
@erkjhgdfn so, when you want a rule to affect popups, you should have the popup type suffix after the $. In other words, this should work for your example:
@@||bodybuilding.com/fun/nutrient-popup.php^$popup
Exception filters, I believe, don't have to be the exact "opposite" of the original filter. They just have to match the URL you're trying to allow.
I agree. But the "opposite" should work nevertheless provided the filter syntax is correct, shouldn't it? Thus, the filter suggested by myself should probably be changed to
@@popup.$domain=bodybuilding.com,popup
I cannot test it as I don't see any popups on that site even with uMatrix deactivated.
BTW: Where is the popup option documented? I couldn't find it here.
As a side note: Shouldn't issues regarding filters (which are not uBlock specific) strictly rejected and pointed to the Easylist forum instead? I think those countless issues were one of the major reasons why gorhill was more and more overburdened.
@my-password-is-password
@chrisaljoudi
Thank you, resolved.
How do I write an exception to these popups? My attempts have so far been futile and I'm not really sure what I'm doing wrong.
My exception filter: @@||http://bodybuilding.com/fun/nutrient-popup.php^