
Loading…
How do I exclude a specific filter included in a list from being used? #963
The closest thing for exception rules is the important specifier, but for blocking rules like this you can add an appropriate exception in your custom filters.
Notably, the only ad-blocking extension I know of that allows you to specify particular filters in a subscription to be inoperative is ABP for Firefox: Neither AdBlock nor uBlock nor ABP for anything but Firefox allows you to do this. Maybe there are performance issues, or maybe it has never been a high priority.
How would I properly exclude the filter I mentioned? I entered the ff. in My Filters: @@||google.com/cse/$third-party and it seems to work, but I am not entirely sure if it is entirely correct.
What that means is that any URL from google.com or its subdomains with no explicit port and with path component starting with /cse/ that is third-party to the main document (that means the hostname in the address bar is not equal to or a subdomain of the URL's hostname, or that they have different protocols or ports) will be loaded even if a blocking rule in any of your subscriptions or custom filters (as long as they don't have the important specifier) says it should be blocked.
Based on the nature of Custom Search Engines, it doesn't look like you'll be allowing in too much with that exception rule; in particular, if the CSE results normally have ads, this rule won't allow them, unless Google started serving CSE-specific ads from URLs starting with google.com/cse/ (or using a subdomain of google.com). This rule does not whitelist all resources that may be loaded just because the whitelisted CSE was loaded.
@AmperAndSand you're correct. The filter you mentioned:
@@||google.com/cse/$third-party
is an exception filter, which would cancel out a filter such as ||google.com/cse/.
So if you simply place that in your "My Filters", you should be fine.
@lewisje important option is only for block filters. Exception filters already override block filter by default, so there is no need for important for exception filters.
Usually to cancel a block filter is to create an exception filter by prefixing the same block filter with @@.
So ||google.com/cse/$third-party,~stylesheet means "block requests which URL contains google.com/cse/, which are 3rd-party to the current site, and which are not stylesheets".
Conversely, @@||google.com/cse/$third-party,~stylesheet means "do not block requests which URL contains google.com/cse/, which are 3rd-party to the current site, and which are not stylesheets".
I guess I didn't make it clear enough when I said "The closest thing for exception rules is the important specifier" and should have said "is a blocking rule with the important specifier"; I already knew that important was only for blocking rules and only for custom filters.
I am using Fanboy's Ultimate List. In ABP, I can uncheck a filter to have it excluded. e.g. I exclude
||google.com/cse/$third-party,~stylesheetbecause I would like to see Google Custom Search Engine results for various websites.How do I do the same for uBlock?