AdguardTeam / FiltersCompiler

A tool that compiles & validates filters
GNU Lesser General Public License v3.0
52 stars 12 forks source link

Improve '!#safari_cb_affinity' directive — support 'advanced' value for Advanced Protection in AdGuard for iOS #226

Open Alex-302 opened 3 weeks ago

Alex-302 commented 3 weeks ago

Problem

Blocking of some ads requires applying both basic rule + advanced rule. The problem is that in free AdGuard for iOS only a basic rule can be applied, which breaks a site completely, because advanced rule is not applied.

Example:

||ads.com/loader.min.js$domain=example.com
example.com#%#//scriptlet('abort-on-stack-trace', 'document.getElementById', 'onerror')

Without the second rule, after applying only the first rule, the site will be broken.

Proposed solution

Add ability to apply a rule on iOS, only if advanced protection is enabled. The basic rule must be applied in specified content blocker(s).