Opened on 10/22/2017 at 07:12:46 AM
Closed on 08/29/2019 at 05:48:47 PM
#5901 closed change (rejected)
Implement important / badfilter keywords
Reported by: | mapx | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Platform | Keywords: | closed-in-favor-of-gitlab |
Cc: | mjethani, hfiguiere, kzar, sebastian, SMed79, fanboy, arthur, greiner | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by mapx)
Implement a new filter option / keyword: important
The filter option important means to ignore all exception filters (those prefixed with @@). It applies only to network block filters. The important option will allow you to block with 100% certainty specific network requests. Example: ||google-analytics.com^$important,third-party will block all network requests to google-analytics.com, disregarding any existing network exception filters. Another example: ||twitter.com^$important,third-party. Etc.
from https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#important
Implement a new filter option / keyword: badfilter
Used to prevent a filter from being loaded in memory One would use https:*_ad_$badfilter to prevent the filter https:*_ad_ from being loaded in memory. The badfilter option indicates to uBO to not load in memory the functional form of a filter. For example, https:*_ad_$badfilter would not prevent loading into memory the filter https:*_ad_$script, or https:*_ad_$domain=example.com
from https://github.com/uBlockOrigin/uAssets/issues/192#issuecomment-285904675
Where to use such options ?
Example:
Pages where whitelisting filters are necessary to fight anti adblocking circumventions.
existing filter in easylist:
@@||sankakucomplex.com^$script
The webmasters are using the exception pushing a first-party script:
https://chan.sankakucomplex.com/javascripts/ps.js
injecting popups / popunders in the page.
A normal user has no weapon, the easylist authors are volunteers and sometimes ignore such issues or delaying for months.
The current UI in ABP platform does not offer a way to fix the issue.
ABP legacy (FF) is dead.
Attachments (0)
Change History (12)
comment:2 Changed on 10/22/2017 at 07:45:30 AM by SMed79
comment:3 Changed on 11/27/2017 at 12:13:27 PM by greiner
- Cc greiner added
While $important might help in the short-term, I don't think it's a good idea beyond that because it's merely a workaround. Rather than that, we could introduce a proper model for filter prioritization.
What's the purpose of $badfilter? It sounds like it's the same as commenting out a filter based on this comment.
comment:4 Changed on 11/27/2017 at 12:18:50 PM by mapx
it's not the same: while $important overrides a wrong or too broad exception, $badfilter simply "removes" any filter (marks it "invisible"). $badfilter can destroy an $important filter too
comment:5 Changed on 11/27/2017 at 12:21:28 PM by mapx
And ...not for short-term, $important is useful maintaining the exception in the list but overriding dynamically for a specific case (faster and without needing to go into UI, enable / disable a filter etc)
comment:6 Changed on 11/27/2017 at 12:36:48 PM by mapx
see where could be useful $badfilter:
https://issues.adblockplus.org/ticket/6083#comment:9
comment:7 Changed on 11/27/2017 at 01:20:50 PM by greiner
it's not the same: while $important overrides a wrong or too broad exception, $badfilter simply "removes" any filter (marks it "invisible"). $badfilter can destroy an $important filter too
That's not what I said. I said that $badfilter looks similar to a filter that's commented out (i.e. disabled).
Based on the comment you linked to, it seems that $badfilter is supposed to disable a filter that's in a different filter list - similar to how element hiding exception rules work. In that case, I do see the value of this feature although I do find the name "badfilter" confusing.
And ...not for short-term, $important is useful maintaining the exception in the list but overriding dynamically for a specific case
The reason why I think it's a workaround is because it won't work anymore as soon as you're trying to override a filter that's marked as $important. On the other hand, some proper prioritization model could allow overriding any filter, irregardless of its priority.
comment:8 follow-up: ↓ 9 Changed on 11/27/2017 at 01:31:46 PM by mapx
the filter marked as $important can be disabled by $badfilter (maximum priority).
comment:9 in reply to: ↑ 8 ; follow-up: ↓ 10 Changed on 11/27/2017 at 02:09:24 PM by greiner
Replying to mapx:
the filter marked as $important can be disabled by $badfilter (maximum priority).
Just to make sure I understand you. What you're suggesting is this!?
Highest priority
- filter with $badfilter option (disables the given filter)
- blocking filter with $important option (overrides any exception filter)
- exception filter (overrides any blocking filter)
- blocking filter
Lowest priority
Still, some more generic prioritization model could be more beneficial in the long-term. Here's how this could look like (based on HTML's "tabindex" and CSS' "z-index"):
Highest priority
- filter with $priority=-1 option (disables the given filter)
- filter with $priority=2 option (overrides any filters with priority 1 or lower)
- exception filter
- blocking filter
- filter with $priority=1 option (overrides any filters with priority 0)
- exception filter
- blocking filter
- filter with $priority=0 or without $priority option
- exception filter
- blocking filter
Lowest priority
comment:10 in reply to: ↑ 9 Changed on 11/27/2017 at 02:20:00 PM by mapx
Replying to greiner:
Replying to mapx:
the filter marked as $important can be disabled by $badfilter (maximum priority).
Just to make sure I understand you. What you're suggesting is this!?
Highest priority
- filter with $badfilter option (disables the given filter)
- blocking filter with $important option (overrides any exception filter)
- exception filter (overrides any blocking filter)
- blocking filter
Lowest priority
yes, exactly, the $badfilter should disable only the exact filter from the list (no wildcards, combinations)
comment:11 Changed on 12/21/2017 at 11:26:28 AM by fhd
- Cc trev removed
comment:12 Changed on 08/29/2019 at 05:48:47 PM by sebastian
- Keywords closed-in-favor-of-gitlab added
- Resolution set to rejected
- Status changed from new to closed
Sorry, but we switched to GitLab. If this issue is still relevant, please file it again in the new issue tracker.
Similar case with depositfiles.com reported a few months ago #p122995.