From f5cb570aa95741a61341e746b926d48836388b97 Mon Sep 17 00:00:00 2001 From: Helen Date: Wed, 5 Feb 2025 17:24:57 +0300 Subject: [PATCH] fix links --- .../ad-filtering/create-own-filters.md | 60 ++++++------------- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git a/docs/general/ad-filtering/create-own-filters.md b/docs/general/ad-filtering/create-own-filters.md index de37b747d95..ba7f6f18164 100644 --- a/docs/general/ad-filtering/create-own-filters.md +++ b/docs/general/ad-filtering/create-own-filters.md @@ -153,13 +153,13 @@ Safari Converter supports a substantial subset of [basic rules](#basic-rules) an ##### Supported with limitations -- [Regular expression rules][regexrules] are limited to the subset of regex that is [supported by Safari][safariregex]. +- [Regular expression rules](#regexp-support) are limited to the subset of regex that is [supported by Safari](https://developer.apple.com/documentation/safariservices/creating-a-content-blocker#Capture-URLs-by-pattern). -- `$domain` - [domain modifier][domainmodifier] is supported with several limitations. +- `$domain` - [domain modifier](#domain-modifier) is supported with several limitations. - - It's impossible to mix allowed and disallowed domains (like `$domain=example.org|~sub.example.org`). Please upvote the [feature request][webkitmixeddomainsissue] to WebKit to lift this limitation. - - "Any TLD" (i.e. `domain.*`) is not fully supported. In the current implementation the converter just replaces `.*` with top 100 popular TLDs. This implementation will be improved [in the future][iftopurlissue]. - - Using regular expressions in `$domain` is not supported, but it also will be improved [in the future][iftopurlissue]. + - It's impossible to mix allowed and disallowed domains (like `$domain=example.org|~sub.example.org`). Please upvote the [feature request](https://bugs.webkit.org/show_bug.cgi?id=226076) to WebKit to lift this limitation. + - "Any TLD" (i.e. `domain.*`) is not fully supported. In the current implementation the converter just replaces `.*` with top 100 popular TLDs. This implementation will be improved [in the future](https://github.com/AdguardTeam/SafariConverterLib/issues/20#issuecomment-2532818732). + - Using regular expressions in `$domain` is not supported, but it also will be improved [in the future](https://github.com/AdguardTeam/SafariConverterLib/issues/20#issuecomment-2532818732). - `$denyallow` - this modifier is supported via converting `$denyallow` rule to a set of rules (one blocking rule + several unblocking rules). @@ -190,47 +190,36 @@ Safari Converter supports a substantial subset of [basic rules](#basic-rules) an Exception rules in Safari rely on the rule type `ignore-previous-rules` so to make it work we have to order the rules in a specific order. Exception rules without modifiers are placed at the end of the list and therefore they disable not just URL blocking, but cosmetic rules as well. - This limitation may be lifted if [#70] is implemented. + This limitation may be lifted if [#70](https://github.com/AdguardTeam/SafariConverterLib/issues/70) is implemented. - `$urlblock`, `$genericblock` is basically the same as `$document`, i.e. it disables all kinds of filtering on websites. - These limitations may be lifted when [#69] and [#71] are implemented. + These limitations may be lifted when [#69](https://github.com/AdguardTeam/SafariConverterLib/issues/69) and [#71](https://github.com/AdguardTeam/SafariConverterLib/issues/71) are implemented. - `$content` makes no sense in the case of Safari since HTML filtering rules are not supported so it's there for compatibility purposes only. Rules with `$content` modifier are limited to `document` resource type. - `$specifichide` is implemented by scanning existing element hiding rules and removing the target domain from their `if-domain` array. - `$specifichide` rules MUST target a domain, i.e. be like this: `||example.org^$specifichide`. Rules with more specific patterns will be discarded, i.e. `||example.org/path$specifichide` will not be supported. - - `$specifichide` rules only cover rules that target the same domain as the rule itself, subdomains are ignored. I.e. the rule `@@||example.org^$specifichide` will disable `example.org##.banner`, but will ignore `sub.example.org##.banner`. This limitation may be lifted if [#72] is implemented. + - `$specifichide` rules only cover rules that target the same domain as the rule itself, subdomains are ignored. I.e. the rule `@@||example.org^$specifichide` will disable `example.org##.banner`, but will ignore `sub.example.org##.banner`. This limitation may be lifted if [#(72](https://github.com/AdguardTeam/SafariConverterLib/issues/72) is implemented. -- `urlblock`, `genericblock`, `generichide`, `elemhide`, `specifichide`, and `jsinject` modifiers can be used only as a single modifier in a rule. This limitation may be lifted in the future: [#73]. +- `urlblock`, `genericblock`, `generichide`, `elemhide`, `specifichide`, and `jsinject` modifiers can be used only as a single modifier in a rule. This limitation may be lifted in the future: [#73](https://github.com/AdguardTeam/SafariConverterLib/issues/73). - `$websocket` (fully supported starting with Safari 15). - `$ping` (fully supported starting with Safari 14). -[regexrules]: https://adguard.com/kb/general/ad-filtering/create-own-filters/#regexp-support -[safariregex]: https://developer.apple.com/documentation/safariservices/creating-a-content-blocker#Capture-URLs-by-pattern -[webkitmixeddomainsissue]: https://bugs.webkit.org/show_bug.cgi?id=226076 -[domainmodifier]: https://adguard.com/kb/general/ad-filtering/create-own-filters/#domain-modifier -[iftopurlissue]: https://github.com/AdguardTeam/SafariConverterLib/issues/20#issuecomment-2532818732 -[#69]: https://github.com/AdguardTeam/SafariConverterLib/issues/69 -[#70]: https://github.com/AdguardTeam/SafariConverterLib/issues/70 -[#71]: https://github.com/AdguardTeam/SafariConverterLib/issues/71 -[#72]: https://github.com/AdguardTeam/SafariConverterLib/issues/72 -[#73]: https://github.com/AdguardTeam/SafariConverterLib/issues/73 - ##### Not supported - `$app` - `$header` - `$method` -- `$strict-first-party` (to be supported in the future: [#64]) -- `$strict-third-party` (to be supported in the future: [#65]) -- `$to` (to be supported in the future: [#60]) +- `$strict-first-party` (to be supported in the future: [#64](https://github.com/AdguardTeam/SafariConverterLib/issues/64)) +- `$strict-third-party` (to be supported in the future: [#65](https://github.com/AdguardTeam/SafariConverterLib/issues/65)) +- `$to` (to be supported in the future: [#60](https://github.com/AdguardTeam/SafariConverterLib/issues/60)) - `$extension` - `$stealth` -- `$cookie` (partial support in the future: [#54]) +- `$cookie` (partial support in the future: [#54](https://github.com/AdguardTeam/SafariConverterLib/issues/54)) - `$csp` - `$hls` - `$inline-script` @@ -247,34 +236,24 @@ Safari Converter supports a substantial subset of [basic rules](#basic-rules) an - `$replace` - `$urltransform` -[#64]: https://github.com/AdguardTeam/SafariConverterLib/issues/64 -[#65]: https://github.com/AdguardTeam/SafariConverterLib/issues/65 -[#60]: https://github.com/AdguardTeam/SafariConverterLib/issues/60 -[#54]: https://github.com/AdguardTeam/SafariConverterLib/issues/54 - #### Cosmetic rules -Safari Converter supports most of the [cosmetic rules][cosmeticrules] although only element hiding rules with basic CSS selectors are supported natively via Safari Content Blocking, everything else needs to be interpreted by an additional extension. - -[cosmeticrules]: https://adguard.com/kb/general/ad-filtering/create-own-filters/#cosmetic-rules +Safari Converter supports most of the [cosmetic rules](#cosmetic-rules) although only element hiding rules with basic CSS selectors are supported natively via Safari Content Blocking, everything else needs to be interpreted by an additional extension. ##### Limitations of cosmetic rules - Specifying domains is subject of the same limitations as the `$domain` modifier of basic rules. -- [Non-basic rules modifiers][nonbasicmodifiers] are supported with some limitations: +- [Non-basic rules modifiers](#non-basic-rules-modifiers) are supported with some limitations: - `$domain` - the same limitations as everywhere else. - `$path` - supported, but if you use regular expressions, they will be limited to the subset of regex that is [supported by Safari][safariregex]. - - `$url` - to be supported in the future: [#68] - -[nonbasicmodifiers]: https://adguard.com/kb/general/ad-filtering/create-own-filters/#non-basic-rules-modifiers -[#68]: https://github.com/AdguardTeam/SafariConverterLib/issues/68 + - `$url` - to be supported in the future: [#68](https://github.com/AdguardTeam/SafariConverterLib/issues/68) #### Script/scriptlet rules -Safari Converter fully supports both [script rules][scriptrules] and -[scriptlet rules][scriptletrules]. However, these rules can only be interpreted by a separate extension. +Safari Converter fully supports both [script rules](#javascript-rules) and +[scriptlet rules](#scriptlets). However, these rules can only be interpreted by a separate extension. :::warning @@ -282,9 +261,6 @@ For scriptlet rules it is **very important** to run them as soon as possible whe ::: -[scriptrules]: https://adguard.com/kb/general/ad-filtering/create-own-filters/#javascript-rules -[scriptletrules]: https://adguard.com/kb/general/ad-filtering/create-own-filters/#scriptlets - #### HTML filtering rules [HTML filtering rules][htmlfilteringrules] are **not supported** and will not be supported in the future. Unfortunately, Safari does not provide necessary technical capabilities to implement them.