Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting rules affinity to a content blocker #1104

Closed
ameshkov opened this issue Jul 3, 2019 · 1 comment
Closed

Allow setting rules affinity to a content blocker #1104

ameshkov opened this issue Jul 3, 2019 · 1 comment
Assignees
Milestone

Comments

@ameshkov
Copy link
Member

@ameshkov ameshkov commented Jul 3, 2019

The main issue with using multiple content blockers is that rules inside these content blockers cannot influence each other. This may lead to different unexpected issues. For instance, like this one: #1055

I suppose we should let filters maintainers control the rules "affinity" to a content blocker by using a new pre-processor directive.

More info on the pre-processor directives:
https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#pre-processor-directives

!#safari_cb_affinity

Defines Safari content blockers affinity for the rules inside the safari_cb_affinity block.

Syntax

!#safari_cb_affinity(list)
@@||example.org^
example.org##banner
!#safari_cb_affinity
  • !#safari_cb_affinity(list) -- start of the block.
  • list -- comma-separated list of content blockers. There are 6 pre-defined values:
    • general -- "AdGuard - General" content blocker
    • privacy -- "AdGuard - Privacy" content blocker
    • social -- "AdGuard - Social" content blocker
    • security -- "AdGuard - Security" content blocker (missing from the
    • other -- "AdGuard - Other" content blocker
    • custom -- "AdGuard - Custom" content blocker
    • all -- special keyword that means that the rules must be included into ALL content blockers.
  • !#safari_cb_affinity -- ends the block of rules
@ameshkov ameshkov added this to the 3.1 milestone Jul 3, 2019
ameshkov pushed a commit that referenced this issue Jul 18, 2019
ameshkov pushed a commit that referenced this issue Jul 18, 2019
ameshkov pushed a commit that referenced this issue Jul 18, 2019
ameshkov pushed a commit that referenced this issue Jul 18, 2019
ameshkov pushed a commit that referenced this issue Jul 18, 2019
ameshkov pushed a commit that referenced this issue Jul 18, 2019
…to master

* commit '54f2eefd77ffbf469578a1e06fcadb551b0bb786':
  #1104 affinity nullable affinity prop
  #1104 affinity nullable affinity prop
  #1104 affinity nullable affinity prop
  #1104 affinity rules blocks
  #1104 affinity rules blocks
@slavaleleka

This comment has been minimized.

Copy link

@slavaleleka slavaleleka commented Aug 19, 2019

add this filter list as custom filter
https://raw.githubusercontent.com/slavaleleka/webweb/master/customlist.txt

and go to checkadblock.ru

Expected result

63264708-695a8880-c294-11e9-9881-221bb4012264

Actual result

slbdzd8ld48sx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.