You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3012,6 +3013,42 @@ Rules with the `$urltransform` modifier are supported by AdGuard for Windows, Ad
3012
3013
3013
3014
:::
3014
3015
3016
+
#### **`$reason`** {#reason-modifier}
3017
+
3018
+
The `$reason` modifier allows you to add a custom explanation message that will be displayed on the blocking page when a request is blocked by this rule.
3019
+
This modifier only works with the `$document` content-type modifier.
3020
+
3021
+
**Character limitations and escaping requirements:**
3022
+
3023
+
- There is no maximum length limit for the reason text
3024
+
- All characters are allowed in the reason text
3025
+
- Special characters (such as quotes, commas, and backslashes) must be properly escaped using the backslash (`\`)
3026
+
3027
+
**Predefined localizable tokens:**
3028
+
3029
+
Instead of custom text, you can use predefined tokens that will be automatically localized:
3030
+
3031
+
- `malicious` — for malicious content
3032
+
- `tracker` — for tracking content
3033
+
- `disreputable` — for disreputable content
3034
+
3035
+
**Examples**
3036
+
3037
+
```adblock
3038
+
||example.com^$document,reason="Tracker"
3039
+
||example.com^$document,reason="Malicious site blocked by security filter"
3040
+
||ads.example.com^$document,reason="This site contains tracking scripts"
AdGuard for Windows, AdGuard for Mac, AdGuard for Android, and AdGuard for Linux with CoreLibs v1.20 or later support rules with the `$reason` modifier. AdGuard Content Blocker does not support these rules.
3049
+
3050
+
:::
3051
+
3015
3052
#### **`noop`** {#noop-modifier}
3016
3053
3017
3054
`noop` modifier does nothing and can be used solely to increase rules' readability. It consists of a sequence of underscore characters (`_`) of arbitrary length and can appear in a rule as often as needed.
0 commit comments