SafariConverterLib
SafariConverterLib copied to clipboard
Swift library that converts AdGuard rules to Safari content blocking rules
in the same way as `:has()` I mean https://github.com/AdguardTeam/SafariConverterLib/issues/43 https://caniuse.com/mdn-css_selectors_not https://caniuse.com/css-matches-pseudo
How to reproduce: 1. go to: https://triblive.com 2. disable all filters in safari extension 3. add to user rules: ``` ||embed.sendtonews.com^$third-party ||embed.sendtonews.com^$third-party,badfilter,domain=miamiherald.com ``` (note that domain in the domain modifier...
It seems that the scriptlets using the `[$path]` modifier are not applying. STR: 1. Add these rules to User rules in AdGuard for iOS ```adblock [$path=/\/(?:weather\/|pogoda\/|hava\/)/]yandex.*#%#//scriptlet('prevent-eval-if', 'Id":"R-I') [$path=/\/(?:weather\/|pogoda\/|hava\/)/]yandex.*#%#//scriptlet('abort-on-property-read', 'Object.prototype.renderDirect') [$path=/\/(?:weather\/|pogoda\/|hava\/)/]yandex.*#%#//scriptlet('json-prune',...
Test Rule: ``` ||example.com/foo/bar| ``` Generated rule: ```json { "trigger": { "url-filter": "^[htpsw]+:\\/\\/([a-z0-9-]+\\.)?example\\.com\\/foo\\/bar$" }, "action": { "type": "block" } } ``` There are two issues on this generated rule: 1....
Safari content blocking API provides rules with action `block-cookies`: > Strips cookies from the header before sending it to the server. This only blocks cookies otherwise acceptable to Safari's privacy...
Now that we have specified how rules should be prioiritized, lets consider sorting rules in a content blocker using the computed priority value. **Before doing that we should check that...
such rules are parsed as advanced now ``` ||ak.oalsauwy.net^$document ||efully.info^$document ```
It's related to https://github.com/AdguardTeam/AdguardFilters/issues/128326. The problem is seen in `AdGuard for iOS / Safari`. There is anti-adblock script that check the elements and If the check fails, you will also...
Check the explanation here: https://github.com/AdguardTeam/AdGuardForSafari/issues/770#issuecomment-1381471076 This way we can: 1. Add "AdGuard URL Tracking filter" to AdGuard for iOS 2. The `redirect` and `removeparam` rules both should be based on...
Original issue here https://github.com/AdguardTeam/AdguardFilters/issues/134357. The problem is when you turn on 5 content blockers with AdGuard filters, the rules below from the AdGuard Turkish filter does not apply to the...