Skip to content

Commit

Permalink
Description for scriptlets exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
anyakushin committed Jun 20, 2024
1 parent 03e16b7 commit 576ef73
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/general/ad-filtering/create-own-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -3934,6 +3934,37 @@ example.org#%#//scriptlet("abort-on-property-read", "alert")

This rule will be applied to `example.org` and subdomains pages and will execute the `abort-on-property-read` scriptlet with the `alert` parameter.

**Exceptions**

Exception rules can disable some scriptlets on particullar domains.

```text
rule = [domains] "#@%#//scriptlet(" [name] ")"
```

- `domains` — optional, a list of domains where the rule should be applied;
- `name` — optional, a name of the scriptlet to except from the applying. If not set, all scriptlets will not be applied.

For example, if you want to disable the rule

```adblock
example.org,example.com#%#//scriptlet("abort-on-property-read", "alert")
```

for `example.com` domain, the following exception rule could be used:

```adblock
example.com#@%#//scriptlet("abort-on-property-read")
```

to disable only `abort-on-property-read` scriptlet or

```adblock
example.com#@%#//scriptlet()
```

to disable all scriptlets on `example.com`

Learn more about [how to debug scriptlets](#debug-scriptlets).

More information about scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#scriptlets).
Expand Down

0 comments on commit 576ef73

Please sign in to comment.