Skip to content

Commit

Permalink
Merge pull request #281 from AdguardTeam/update-aliases
Browse files Browse the repository at this point in the history
Add descriptions for supported aliases
  • Loading branch information
SeverAnna authored Aug 24, 2023
2 parents e9b807e + 9bb0fa6 commit e69518f
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions docs/general/ad-filtering/create-own-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,12 @@ If there is a `$~third-party` modifier, the rule is only applied to the requests

- `||domain.com$~third-party` — this rule is applied to `domain.com`, but not to the other domains. Example of a request that is not a third-party request: `http://domain.com/icon.ico`.

:::note

You may use a shorter name (alias) instead of using the full modifier name: `$3p`.

:::

#### **`$to`** {#to-modifier}

`$to` limits the rule scope to requests made **to** the specified domains and their subdomains. To add multiple domains to one rule, use the `|` character as a separator.
Expand Down Expand Up @@ -673,6 +679,12 @@ If this modifier is used with an exclusion rule (`@@`), it completely disables b
- `||example.com^$document,removeparam=test` removes `test` query parameter from HTML document request to `example.com`.
- `||example.com^$document,replace=/test1/test2/` replaces `test1` with `test2` in HTML document request to `example.com`.

:::note

You may use a shorter name (alias) instead of using the full modifier name: `$doc`.

:::

#### **`$font`** {#font-modifier}

The rule corresponds to requests for fonts, e.g. `.woff` filename extension.
Expand Down Expand Up @@ -714,6 +726,12 @@ The rule corresponds to script requests, e.g. javascript, vbscript.

The rule corresponds to CSS files requests.

:::note

You may use a shorter name (alias) instead of using the full modifier name: `$css`.

:::

#### **`$subdocument`** {#subdocument-modifier}

The rule corresponds to requests for built-in pages — HTML tags `frame` and `iframe`.
Expand All @@ -723,6 +741,12 @@ The rule corresponds to requests for built-in pages — HTML tags `frame` and `i
- `||example.com^$subdocument` blocks built-in page requests (`frame` and `iframe`) to `example.com` and all its subdomains anywhere.
- `||example.com^$subdocument,domain=domain.com` blocks built-in page requests (`frame` и `iframe`) to `example.com` (and its subdomains) from `domain.com` and all its subdomains.

:::note

You may use a shorter name (alias) instead of using the full modifier name: `$frame`.

:::

:::info Compatibility

In AdGuard for Windows, Mac, and Android subdocuments are being detected
Expand All @@ -747,6 +771,12 @@ The rule applies only to WebSocket connections.

The rule applies only to ajax requests (requests sent via javascript object `XMLHttpRequest`).

:::note

You may use a shorter name (alias) instead of using the full modifier name: `$xhr`.

:::

:::info Compatibility

AdGuard for Windows, Mac, Android when filtering older browsers cannot accurately detect this type and sometimes detects it as [`$other`](#other-modifier) or [`$script`](#script-modifier). They can only reliably detect this content type when filtering modern browsers that support [Fetch metadata request headers](https://developer.mozilla.org/en-US/docs/Glossary/Fetch_metadata_request_header).
Expand Down Expand Up @@ -824,6 +854,12 @@ Disables any [cosmetic rules](#cosmetic-rules) on the pages matching the rule.

- `@@||example.com^$elemhide` disables all cosmetic rules on pages at `example.com` and all subdomains.

:::note

You may use a shorter name (alias) instead of using the full modifier name: `$ehide`.

:::

#### **`$extension`** {#extension-modifier}

Disables specific userscripts or all userscripts for a given domain.
Expand Down Expand Up @@ -993,6 +1029,12 @@ Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond

- `@@||example.com^$generichide` disables generic cosmetic rules on any pages at `example.com` and its subdomains.

:::note

You may use a shorter name (alias) instead of using the full modifier name: `$ghide`.

:::

#### **`specifichide`** {#specifichide-modifier}

Disables all specific element hiding and CSS rules, but not general ones. Has an opposite effect to [`$generichide`](#generichide-modifier).
Expand All @@ -1003,6 +1045,12 @@ Disables all specific element hiding and CSS rules, but not general ones. Has an

:::note

You may use a shorter name (alias) instead of using the full modifier name: `$shide`.

:::

:::note

All cosmetic rules — not just specific ones — can be disabled by [`$elemhide` modifier](#elemhide-modifier).

:::
Expand Down

0 comments on commit e69518f

Please sign in to comment.