From 57d07e7b97d8c52de3342215171c4f94ab116a26 Mon Sep 17 00:00:00 2001 From: SeverAnna Date: Wed, 16 Aug 2023 16:40:58 +0300 Subject: [PATCH 1/3] Update create-own-filters.md Added description for supported aliases #207 --- .../ad-filtering/create-own-filters.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/general/ad-filtering/create-own-filters.md b/docs/general/ad-filtering/create-own-filters.md index da070d52b47..643360f4bb8 100644 --- a/docs/general/ad-filtering/create-own-filters.md +++ b/docs/general/ad-filtering/create-own-filters.md @@ -530,6 +530,12 @@ AdGuard will try to close the browser tab with any address that matches a blocki #### **`$third-party`** {#third-party-modifier} +:::note + +The `$3p` alias is also used. + +::: + A restriction of third-party and own requests. A third-party request is a request from a different domain. For example, a request to `example.org` from `domain.com` is a third-party request. :::note @@ -612,6 +618,12 @@ There is a big difference in how AdGuard determines the content type on differen #### **`$document`** {#document-modifier} +:::note + +The `$doc` alias is also used. + +::: + The rule corresponds to the main frame document requests, i.e. HTML documents that are loaded in the browser tab. It does not match iframes, there is a [`$subdocument` modifier](#subdocument-modifier) for these. By default, AdGuard does not block the requests that are loaded in the browser tab (e.g. "main frame bypass"). The idea is not to prevent pages from loading as the user clearly indicated that they want this page to be loaded. However, if the `$document` modifier is specified explicitly, AdGuard does not use that logic and prevents the page load. Instead, it responds with a "blocking page". @@ -663,10 +675,22 @@ The rule corresponds to script requests, e.g. javascript, vbscript. #### **`$stylesheet`** {#stylesheet-modifier} +:::note + +The `$css` alias is also used. + +::: + The rule corresponds to CSS files requests. #### **`$subdocument`** {#subdocument-modifier} +:::note + +The `$frame` alias is also used. + +::: + The rule corresponds to requests for built-in pages — HTML tags `frame` and `iframe`. **Examples** @@ -686,6 +710,12 @@ The rule applies only to WebSocket connections. #### **`$xmlhttprequest`** {#xmlhttprequest-modifier} +:::note + +The `$xhr` alias is also used. + +::: + The rule applies only to ajax requests (requests sent via javascript object `XMLHttpRequest`). :::info Compatibility @@ -750,6 +780,12 @@ Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$re #### **`$elemhide`** {#elemhide-modifier} +:::note + +The `$ehide` alias is also used. + +::: + Disables any [cosmetic rules](#cosmetic-rules) on the pages matching the rule. **Examples** @@ -901,6 +937,12 @@ Disables generic basic rules on pages that correspond to exception rule. #### **`$generichide`** {#generichide-modifier} +:::note + +The `$ghide` alias is also used. + +::: + Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. **Examples** @@ -909,6 +951,12 @@ Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond #### **`specifichide`** {#specifichide-modifier} +:::note + +The `$shide` alias is also used. + +::: + Disables all specific element hiding and CSS rules, but not general ones. Has an opposite effect to [`$generichide`](#generichide-modifier). **Examples** From 5829e75f9a810edd9595d8945c831d3c84713c0a Mon Sep 17 00:00:00 2001 From: SeverAnna Date: Thu, 17 Aug 2023 16:01:11 +0300 Subject: [PATCH 2/3] Update create-own-filters.md fixed alias descriptions #207 --- .../ad-filtering/create-own-filters.md | 77 ++++++++++--------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/docs/general/ad-filtering/create-own-filters.md b/docs/general/ad-filtering/create-own-filters.md index 643360f4bb8..58da33acf10 100644 --- a/docs/general/ad-filtering/create-own-filters.md +++ b/docs/general/ad-filtering/create-own-filters.md @@ -530,12 +530,6 @@ AdGuard will try to close the browser tab with any address that matches a blocki #### **`$third-party`** {#third-party-modifier} -:::note - -The `$3p` alias is also used. - -::: - A restriction of third-party and own requests. A third-party request is a request from a different domain. For example, a request to `example.org` from `domain.com` is a third-party request. :::note @@ -560,6 +554,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. @@ -618,12 +618,6 @@ There is a big difference in how AdGuard determines the content type on differen #### **`$document`** {#document-modifier} -:::note - -The `$doc` alias is also used. - -::: - The rule corresponds to the main frame document requests, i.e. HTML documents that are loaded in the browser tab. It does not match iframes, there is a [`$subdocument` modifier](#subdocument-modifier) for these. By default, AdGuard does not block the requests that are loaded in the browser tab (e.g. "main frame bypass"). The idea is not to prevent pages from loading as the user clearly indicated that they want this page to be loaded. However, if the `$document` modifier is specified explicitly, AdGuard does not use that logic and prevents the page load. Instead, it responds with a "blocking page". @@ -639,6 +633,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. @@ -675,22 +675,17 @@ The rule corresponds to script requests, e.g. javascript, vbscript. #### **`$stylesheet`** {#stylesheet-modifier} -:::note - -The `$css` alias is also used. - -::: The rule corresponds to CSS files requests. -#### **`$subdocument`** {#subdocument-modifier} - :::note -The `$frame` alias is also used. +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`. **Examples** @@ -698,6 +693,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`. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -710,14 +711,14 @@ The rule applies only to WebSocket connections. #### **`$xmlhttprequest`** {#xmlhttprequest-modifier} +The rule applies only to ajax requests (requests sent via javascript object `XMLHttpRequest`). + :::note -The `$xhr` alias is also used. +You may use a shorter name (alias) instead of using the full modifier name: `$xhr`. ::: -The rule applies only to ajax requests (requests sent via javascript object `XMLHttpRequest`). - :::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). @@ -780,18 +781,18 @@ Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$re #### **`$elemhide`** {#elemhide-modifier} -:::note - -The `$ehide` alias is also used. - -::: - Disables any [cosmetic rules](#cosmetic-rules) on the pages matching the rule. **Examples** - `@@||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. @@ -937,26 +938,20 @@ Disables generic basic rules on pages that correspond to exception rule. #### **`$generichide`** {#generichide-modifier} -:::note - -The `$ghide` alias is also used. - -::: - Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. **Examples** - `@@||example.com^$generichide` disables generic cosmetic rules on any pages at `example.com` and its subdomains. -#### **`specifichide`** {#specifichide-modifier} - :::note -The `$shide` alias is also used. +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). **Examples** @@ -965,6 +960,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). ::: From 7b7e8b022be4c75bdf556c264767289aa4708844 Mon Sep 17 00:00:00 2001 From: SeverAnna Date: Thu, 17 Aug 2023 17:23:58 +0300 Subject: [PATCH 3/3] Update create-own-filters.md descriptions for aliases added #207 --- docs/general/ad-filtering/create-own-filters.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/general/ad-filtering/create-own-filters.md b/docs/general/ad-filtering/create-own-filters.md index 58da33acf10..f045a7dda72 100644 --- a/docs/general/ad-filtering/create-own-filters.md +++ b/docs/general/ad-filtering/create-own-filters.md @@ -675,12 +675,11 @@ The rule corresponds to script requests, e.g. javascript, vbscript. #### **`$stylesheet`** {#stylesheet-modifier} - The rule corresponds to CSS files requests. :::note -You may use a shorter name (alias) instead of using the full modifier name: `css`. +You may use a shorter name (alias) instead of using the full modifier name: `$css`. ::: @@ -695,7 +694,7 @@ The rule corresponds to requests for built-in pages — HTML tags `frame` and `i :::note -You may use a shorter name (alias) instead of using the full modifier name:`$frame`. +You may use a shorter name (alias) instead of using the full modifier name: `$frame`. :::