From 187460522445019e7a64a6f88a5d4afd8c448264 Mon Sep 17 00:00:00 2001 From: slavaleleka Date: Thu, 17 Aug 2023 15:50:26 +0000 Subject: [PATCH] automatically update translations --- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../ad-filtering/create-own-filters.md | 304 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/guides/adware.md | 4 +- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 320 +++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-android/overview.md | 2 +- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 310 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- .../current/adguard-for-windows/overview.md | 2 +- .../ad-filtering/create-own-filters.md | 302 ++++++++++++----- 61 files changed, 6676 insertions(+), 2476 deletions(-) diff --git a/i18n/be/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/be/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/be/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/be/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/be/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/be/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/be/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/be/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/bn/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/bn/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/bn/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/bn/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/bn/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/bn/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/bn/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/bn/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/cs/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/cs/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 566959577a3..a18a27abcea 100644 --- a/i18n/cs/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/cs/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -107,7 +107,7 @@ AdGuard [rozšiřuje CSS](#extended-css-selectors) a umožňuje tak vývojářů **Oblíbené selektory CSS** -| Název | Selektor CSS | Popis | +| Name | CSS selector | Description | | ---------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ID selector | `#banners` | Matches all elements with `id` attribute equal to `banners`.
![ID selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_id_selector.png) | | Class selector | `.banners` | Matches all elements with `class` attribute containing `banners`.
![Class selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_selector.png) | @@ -247,20 +247,32 @@ Příklad: ### Základní modifikátory {#basic-rules-basic-modifiers} +Následující modifikátory jsou nejjednodušší a nejčastěji používané. V podstatě jen omezují rozsah použití pravidel. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pro iOS][ios-app] | [AdGuard pro Safari][ext-saf] | [Blokátor obsahu AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -Následující modifikátory jsou nejjednodušší a nejčastěji používané. V podstatě jen omezují rozsah použití pravidel. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ V následujících příkladech se předpokládá, že požadavky jsou odesílá - `/banner\d+/$domain=targetdomain.com` nebude přiřazena, protože obsahuje regulární výraz. - `page$domain=targetdomain.com|~example.org` nebude přiřazena, protože doména odkazu je výslovně vyloučena. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Omezení Safari nepodporuje současné použití povolených a zakázaných domén, takže pravidla jako `||baddomain.com^$domain=example.org|~foo.example.org` nebudou v AdGuardu pro iOS a AdGuardu pro Safari fungovat. @@ -483,6 +497,12 @@ Tento modifikátor definuje pravidlo, které se vztahuje pouze na adresy odpoví - `*/BannerAd.gif$match-case` — toto pravidlo zablokuje `http://example.com/BannerAd.gif`, ale ne `http://example.com/bannerad.gif`. +:::info Kompatibilita + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} Tento modifikátor omezuje rozsah pravidla na požadavky, které používají zadanou sadu metod HTTP. Negované metody jsou povoleny. Metody musí být zadány malými písmeny, ale při porovnávání se nerozlišují velká a malá písmena. Chcete-li do jednoho pravidla přidat více domén, použijte jako oddělovací znak `|`. @@ -502,7 +522,7 @@ Pravidla s omezením smíšených hodnot jsou považována za neplatná. Takže :::info Kompatibilita -Pravidla s `$method` jsou podporována AdGuardem pro Windows, Mac, Android, **s CoreLibs v1.12 nebo novějším** a rozšířením prohlížeče AdGuard pro Chrome, Firefox, Edge s **TSUrlFilter v2.1.1 nebo novějším**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard se pokusí zavřít kartu prohlížeče s jakoukoli adresou, která odpo - Modifikátor `$popup` funguje nejlépe v Rozšíření prohlížeče AdGuard. - V AdGuardu pro Safari a iOS, pravidla `$popup` stránku jednoduše a okamžitě zablokují. - V AdGuardu pro Windows, Mac a Android nemusí modifikátor `$popup` v některých případech detekovat vyskakovací okno a nebude zablokováno. Modifikátor `$popup` použije typ obsahu `document` se speciálním příznakem, který je předán blokovací stránce. Samotná blokovací stránka může provést některé kontroly a zavřít okno, pokud se skutečně jedná o vyskakovací okno. V opačném případě by se stránka měla načíst. Lze to kombinovat s dalšími modifikátory typu požadavku, jako je `$third-party` a `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Pravidla s modifikátorem `$to` jsou podporována AdGuardem pro Windows, Mac, An ### Modifikátory typu obsahu {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (odstraněno)](#object-subrequest-modifier) -- [`$webrtc` (odstraněno)](#webrtc-modifier) - Existuje sada modifikátorů, které lze použít k omezení oblasti použití pravidla na určitý typ obsahu. Tyto modifikátory lze také kombinovat, aby zahrnovaly například obrázky i skripty. :::info Kompatibilita -V tom, jak AdGuard určuje typ obsahu na různých platformách, je velký rozdíl. U Rozšíření prohlížeče AdGuard je typ obsahu pro každý požadavek poskytován prohlížečem. AdGuard pro Windows, Mac a Android používají následující metodu: nejprve se pokusíme určit typ požadavku podle záhlaví požadavku `Sec-Fetch-Dest` nebo podle přípony názvu souboru. Pokud není požadavek v této fázi zablokován, určí se typ pomocí záhlaví `Content-Type` na začátku odpovědi serveru. +V tom, jak AdGuard určuje typ obsahu na různých platformách, je velký rozdíl. U Rozšíření prohlížeče AdGuard je typ obsahu pro každý požadavek poskytován prohlížečem. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ V tom, jak AdGuard určuje typ obsahu na různých platformách, je velký rozd - `||example.org^$script,stylesheet` — odpovídá všem skriptům a stylům z `example.org`. - `||example.org^$~image,~script,~stylesheet` — odpovídá všem požadavkům na `example.org` kromě obrázků, skriptů a stylů. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pro iOS][ios-app] | [AdGuard pro Safari][ext-saf] | [Blokátor obsahu AdGuard][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} Pravidlo odpovídá požadavkům na dokument hlavního rámce, tj. dokumenty HTML načtené na kartě prohlížeče. Neodpovídá hodnotám iframe, pro ten existuje modifikátor [`$subdocument`](#subdocument-modifier). @@ -647,6 +679,8 @@ Pravidlo odpovídá požadavkům vyvolaným buď `navigator.sendBeacon()`, nebo AdGuard pro Windows, Mac a Android často nedokáží přesně detekovat `navigator.sendBeacon()`. V seznamech filtrů, které mají používat AdGuard produkty založené na knihovně CoreLibs, se nedoporučuje používat `$ping`. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ Pravidlo odpovídá požadavkům na vestavěné stránky — značky HTML `frame - `||example.com^$subdocument` blokuje integrované požadavky (`frame` a `iframe`) na `example.com` a všechny její subdomény kdekoli. - `||example.com^$subdocument,domain=domain.com` blokuje integrované požadavky (`frame` и `iframe`) na `example.com` (a její subdomény) z `domain.com` a všech jejích subdomén. +:::info Kompatibilita + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} Pravidlo se vztahuje pouze na připojení WebSocket. @@ -711,19 +753,6 @@ Pravidlo se vztahuje pouze na připojení WebRTC. ### Modifikátory pravidel pro výjimky {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generická pravidla](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Pravidla výjimek deaktivují ostatní základní pravidla pro adresy, kterým odpovídají. Začínají značkou `@@`. Lze na ně aplikovat všechny výše uvedené základní modifikátory a mají také několik speciálních modifikátorů. :::note Vizuální znázornění @@ -732,6 +761,28 @@ Doporučujeme také seznámit se s [tímto článkem](https://adblockplus.org/fi ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pro iOS][ios-app] | [AdGuard pro Safari][ext-saf] | [Blokátor obsahu AdGuard][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Zakáže [filtrování HTML](#html-filtering-rules), pravidla [`$hls`](#hls-modifier), [`$replace`](#replace-modifier) a [`$jsonprune`](#jsonprune-modifier) na stránkách, které odpovídají pravidlu. @@ -859,6 +910,14 @@ Zakáže blokování všech požadavků odeslaných ze stránek, které odpovíd - `@@||example.com^$urlblock` — nebudou blokovány žádné požadavky odeslané z `example.com` a ze všech subdomén. +:::info Kompatibilita + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generická pravidla {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. Pravidlo je generické, pokud není omezeno na konkrétní domény. Podporován je také zástupný znak `*`. @@ -890,6 +949,14 @@ Zakáže generická základní pravidla na stránkách, které odpovídají prav - `@@||example.com^$genericblock` zakáže generická základní pravidla na `example.com` a všech subdoménách. +:::info Kompatibilita + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Zakáže všechna generická [kosmetická pravidla](#cosmetic-rules) na stránkách, které odpovídají pravidlu výjimky. @@ -914,35 +981,49 @@ Všechna kosmetická pravidla — nejen ta specifická — lze zakázat pomocí :::info Kompatibilita -Pravidla s modifikátorem `$specifichide` **nejsou podporována** AdGuardem pro iOS a Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Pokročilé schopnosti +### Pokročilé schopnosti {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (zastaralé)](#empty-modifier) -- [`$mp4` (zastaralé)](#mp4-modifier) - -Tyto modifikátory mohou zcela změnit chování základních pravidel. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pro iOS][ios-app] | [AdGuard pro Safari][ext-saf] | [Blokátor obsahu AdGuard][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ Hodnota `$permissions` může být v případě pravidel pro výjimky prázdná - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. Např. výše uvedené pravidlo. - `@@||example.org/page/*$permissions` zakáže všechna pravidla `$permissions` na všech stránkách odpovídajících vzoru pravidla. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` zakáže použití API pro přístup k úložišti pro vyžádání přístupu k nerozděleným souborům cookies a používání vstupních zařízení videa napříč `example.org` a `example.com`. - `@@||example.org^$document` nebo `@@||example.org^$urlblock` zakáží všechna pravidla `$permission` na všech stránkách odpovídajících vzoru pravidla. :::caution Omezení @@ -1861,7 +1942,7 @@ Pravidla `$removeparam` lze také zakázat pravidly výjimek `$document` a `$url :::caution Omezení - Pravidla s modifikátorem `$removeparam` lze použít [**pouze v důvěryhodných filtrech**](#trusted-filters). -- Pravidla `$removeparam` jsou kompatibilní se [základními modifikátory](#basic-rules-common-modifiers), [modifikátory typu obsahu](#content-type-modifiers) a s modifikátory `$important` a `$app`. Pravidla s jinými modifikátory jsou považována za neplatná a budou vyřazena. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Váha pravidla: základní + povolený typ obsahu, [kategorie 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Ostatní pravidla +## Ostatní pravidla {#non-basic-rules} + +However, basic rules may not be enough to block ads. Někdy potřebujete skrýt prvek nebo změnit část kódu HTML webové stránky, aniž byste cokoli porušili. Pravidla popsaná v této části jsou vytvořena speciálně pro tento účel. -Možnosti základních pravidel však nemusí být pro blokování reklam dostatečné. Někdy potřebujete skrýt prvek nebo změnit část kódu HTML webové stránky, aniž byste cokoli porušili. Pravidla popsaná v této části jsou vytvořena speciálně pro tento účel. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pro iOS][ios-app] | [AdGuard pro Safari][ext-saf] | [Blokátor obsahu AdGuard][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [Pravidla CSS](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Kosmetická pravidla {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Přečtěte si další informace o [ladění skripletů](#debug-scriptlets). Další informace o důvěryhodných skriptletech najdete na [GitHubu](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifikátory pro ostatní typ pravidel - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifikátory pro ostatní typ pravidel {#non-basic-rules-modifiers} Každé pravidlo lze upravit pomocí modifikátorů popsaných v následujících odstavcích. @@ -3311,6 +3400,21 @@ Např.: `[$domain=example.com,app=test_app]##selector`. V modifikátorech musí být uvozeny hodnoty následujících znaků: `[`, `]`, `,`a `\` (pokud se pro uvození nepoužívá). K uvození použijte `\`. Např. uvozená závorka vypadá takto: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pro iOS][ios-app] | [AdGuard pro Safari][ext-saf] | [Blokátor obsahu AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} Modifikátor `$app` umožňuje zúžit pokrytí pravidla na konkrétní aplikaci, nebo seznam aplikací. Chování a syntaxe modifikátoru dokonale odpovídají příslušným [základním pravidlům modifikátoru `$app`](#app-modifier). @@ -3382,11 +3486,11 @@ Modifikátor `$path` podporuje regulární výrazy [stejným způsobem](#regexp- :::info Kompatibilita -Pravidla s modifikátorem `$path` podporuje AdGuard pro Windows, Mac, Android a Rozšíření prohlížeče AdGuard pro Chrome, Firefox a Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} Modifikátor `$url` omezuje oblast použití pravidla na adresy URL odpovídající zadané masce. @@ -3783,3 +3887,39 @@ Následující skriptlety lze také použít pro účely ladění: Přejeme vám hodně štěstí při vytváření vlastních filtrů reklam. Pokud potřebujete poradit, jak správně vytvořit vlastní filtry, naše fórum má [sekci](https://forum.adguard.com/index.php?forums/69/) věnovanou psaní vlastních pravidel filtrování. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard pro Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/da/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/da/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/da/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/da/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/da/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/da/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/da/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/da/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/de/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/de/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 777366630d1..ebd260c9138 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/de/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/de/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index a34597c12c8..ea288ffa184 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard für iOS][ios-app] | [AdGuard für Safari][ext-saf] | [AdGuard-Inhaltsblocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:--------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Beschränkungen Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Kompatibilität + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Kompatibilität -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Kompatibilität -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard für iOS][ios-app] | [AdGuard für Safari][ext-saf] | [AdGuard-Inhaltsblocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:--------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Kompatibilität + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visuelle Darstellung @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard für iOS][ios-app] | [AdGuard für Safari][ext-saf] | [AdGuard-Inhaltsblocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:--------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Kompatibilität + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Kompatibilität + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Kompatibilität -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard für iOS][ios-app] | [AdGuard für Safari][ext-saf] | [AdGuard-Inhaltsblocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:--------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Beschränkungen @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Beschränkungen - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard für iOS][ios-app] | [AdGuard für Safari][ext-saf] | [AdGuard-Inhaltsblocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:--------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard für iOS][ios-app] | [AdGuard für Safari][ext-saf] | [AdGuard-Inhaltsblocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:--------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Kompatibilität -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard für Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/de/docusaurus-plugin-content-docs/current/guides/adware.md b/i18n/de/docusaurus-plugin-content-docs/current/guides/adware.md index 242e55a736c..2f41691f17d 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/guides/adware.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/guides/adware.md @@ -49,7 +49,7 @@ If disabling of settings and extensions does not help, try to [recreate shortcut Further on this page we describe the instructions on how to remove some of the most commonly encountered ad extensions. -## Wie man Einstellungen und Erweiterungen im Browser deaktiviert {#instructions} +## So deaktivieren Sie Einstellungen und Erweiterungen im Browser {#instructions} Below are the instructions on how to disable settings and extensions for the most popular browsers: @@ -59,7 +59,7 @@ Below are the instructions on how to disable settings and extensions for the mos - [für Opera](https://help.opera.com/en/latest/customization/#extensions) -## Wie man Verknüpfungen für Ihre Browser neu erstellt {#shortcuts} +## So erstellen Sie neue Verknüpfungen für Ihre Browser {#shortcuts} Very often, malware and adware programs install their homepage in a very simple way — they substitute your browser's desktop shortcut, taskbar and *Start* menu items. diff --git a/i18n/es/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/es/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 171a6fdc895..8afdb256c45 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/es/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/es/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 06140e9634b..b56973bcd14 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de contenido AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:-----------------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de contenido AdGuard][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-----------------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de contenido AdGuard][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-----------------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de contenido AdGuard][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-----------------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de contenido AdGuard][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-----------------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de contenido AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-----------------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard para Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/fa/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/fa/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/fa/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/fa/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/fa/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/fa/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/fa/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/fa/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/fi/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/fi/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/fi/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/fi/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/fi/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/fi/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/fi/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/fi/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/fr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index b9191988493..6315a003540 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/fr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index cb37be8a86c..58841888083 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pour iOS][ios-app] | [AdGuard pour Safari][ext-saf] | [Bloqueur de contenu AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:-------------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pour iOS][ios-app] | [AdGuard pour Safari][ext-saf] | [Bloqueur de contenu AdGuard][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pour iOS][ios-app] | [AdGuard pour Safari][ext-saf] | [Bloqueur de contenu AdGuard][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pour iOS][ios-app] | [AdGuard pour Safari][ext-saf] | [Bloqueur de contenu AdGuard][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pour iOS][ios-app] | [AdGuard pour Safari][ext-saf] | [Bloqueur de contenu AdGuard][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard pour iOS][ios-app] | [AdGuard pour Safari][ext-saf] | [Bloqueur de contenu AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard pour Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/hr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/hr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/hr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/hr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/hr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/hr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/hr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/hr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/hu/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/hu/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/hu/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/hu/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/hu/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/hu/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/hu/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/hu/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/it/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/it/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 3e9b2fe3b14..e653ce3ccd6 100644 --- a/i18n/it/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/it/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/it/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/it/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 40f58e62da8..80e3d445403 100644 --- a/i18n/it/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/it/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard per iOS][ios-app] | [AdGuard per Safari][ext-saf] | [Blocco contenuti AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:----------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard per iOS][ios-app] | [AdGuard per Safari][ext-saf] | [Blocco contenuti AdGuard][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:----------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard per iOS][ios-app] | [AdGuard per Safari][ext-saf] | [Blocco contenuti AdGuard][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:----------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard per iOS][ios-app] | [AdGuard per Safari][ext-saf] | [Blocco contenuti AdGuard][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:----------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard per iOS][ios-app] | [AdGuard per Safari][ext-saf] | [Blocco contenuti AdGuard][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:----------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard per iOS][ios-app] | [AdGuard per Safari][ext-saf] | [Blocco contenuti AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:----------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard per Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/ja/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 03ba630a60a..ab85da95044 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/ja/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 9d97b9662ad..4d9d2beafbf 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuardコンテンツブロッカー][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuardコンテンツブロッカー][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuardコンテンツブロッカー][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuardコンテンツブロッカー][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuardコンテンツブロッカー][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuardコンテンツブロッカー][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/ko/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 8d7b33f18a6..bd75ef209fc 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/ko/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index afae2cb9a70..6053204a313 100644 --- a/i18n/ko/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/ko/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/nl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/nl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/nl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/nl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/nl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/nl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/nl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/nl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/no/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/no/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/no/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/no/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/no/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/no/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/no/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/no/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/pl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/pl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/pl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/pl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/pl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/pl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/pl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/pl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 88d3dcd73af..83e75c9aa3c 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 98006e0a29d..a0abb2833c8 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de conteúdo do AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:-------------------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de conteúdo do AdGuard][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de conteúdo do AdGuard][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de conteúdo do AdGuard][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de conteúdo do AdGuard][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard para iOS][ios-app] | [AdGuard para Safari][ext-saf] | [Bloqueador de conteúdo do AdGuard][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:---------------------------:|:------------------------------:|:-------------------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard para Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/pt/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/pt/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 421e4b15eeb..a49b19a9f51 100644 --- a/i18n/pt/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/pt/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/pt/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/pt/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 1c668ab7be3..ed40982f89f 100644 --- a/i18n/pt/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/pt/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/ro/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/ro/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/ro/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/ro/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/ro/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/ro/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/ro/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/ro/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/ru/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 821576cb994..22db99a252f 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ Web of Trust показывает вам репутацию каждого са **Что делает AdGuard VPN:** - скрывает ваше реальное местоположение и помогает оставаться анонимным -- изменяет ваш IP-адрес, чтобы защитить ваши данные от отслеживания +- changes your IP address to protect your data from tracking - шифрует ваш трафик, делая его недоступным для мошенников - позволяет настроить, где использовать VPN, а где нет (функция исключений) diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/ru/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 7723494b563..8202dcd117f 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/ru/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -107,15 +107,15 @@ AdGuard [расширяет возможности CSS](#extended-css-selectors) **Популярные CSS-селекторы** -| Имя | CSS-селектор | Описание | -| ---------------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ID selector | `#banners` | Соответствует всем элементам с атрибутом i`d`, равным `banners`.
![ID selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_id_selector.png) | -| Class selector | `.banners` | Соответствует всем элементам типа `class`, содержащих `banners`.
![Class selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_selector.png) | -| Attribute selector | `div[class="banners"]` | Соответствует всем `div` элементам с атрибутом `class `, **равным** `banners`.
![Attribute selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr.png) | -| Attribute substring selector | `div[class^="advert1"]` | Соответствует всем `div` элементам, атрибут `class` которых **начинается** с `advert1`.
![Attribute substring selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr_start.png) | -| Attribute substring selector | `div[class$="banners_ads"]` | Соответствует всем `div` элементам, атрибут `class` которых **заканчивается** на `banners_ads`.
![Attribute substring selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr_end.png) | -| Attribute substring selector | `a[href^="http://example.com/"]` | Соответствует всем ссылкам, загруженным с домена `http://example.com/`.
![Attribute substring selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_attr_start.png) | -| Attribute selector | `a[href="http://example.com/"]` | Соответствует всем ссылкам **конкретно** `http://example.com/`.
![Attribute selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_attr_equal.png) | +| Name | CSS selector | Description | +| ---------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ID selector | `#banners` | Matches all elements with `id` attribute equal to `banners`.
![ID selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_id_selector.png) | +| Class selector | `.banners` | Matches all elements with `class` attribute containing `banners`.
![Class selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_selector.png) | +| Attribute selector | `div[class="banners"]` | Matches all `div` elements with `class` attribute **exactly equal** to `banners`.
![Attribute selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr.png) | +| Attribute substring selector | `div[class^="advert1"]` | Matches all `div` elements which `class` attribute **starts with** the `advert1` string.
![Attribute substring selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr_start.png) | +| Attribute substring selector | `div[class$="banners_ads"]` | Matches all `div` elements which `class` attribute **ends with** the `banners_ads` string.
![Attribute substring selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr_end.png) | +| Attribute substring selector | `a[href^="http://example.com/"]` | Matches all links that are loaded from `http://example.com/` domain.
![Attribute substring selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_attr_start.png) | +| Attribute selector | `a[href="http://example.com/"]` | Matches all links to **exactly** the `http://example.com/` address.
![Attribute selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_attr_equal.png) | ## Ограничения и запреты @@ -247,20 +247,32 @@ Wildcard-символы поддерживаются для TLD-доменов ### Базовые модификаторы {#basic-rules-basic-modifiers} +Приведённые ниже модификаторы самые простые и часто применяемые. В основном, они просто ограничивают сферу применения правила. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard для iOS][ios-app] | [AdGuard для Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -Приведённые ниже модификаторы самые простые и часто применяемые. В основном, они просто ограничивают сферу применения правила. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ entry_i = ( regular_domain / any_tld_domain / regexp ) - `/banner\d+/$domain=targetdomain.com` не сработает, поскольку правило содержит регулярное выражение. - `page$domain=targetdomain.com|~example.org` не сработает, так как домен реферера явно исключён. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Ограничения Safari не поддерживает одновременно разрешённые и запрещённые домены, поэтому правила вида `||baddomain.com^$domain=example.org|~foo.example.org` не работают в AdGuard для iOS и AdGuard для Safari. @@ -483,6 +497,12 @@ h_value = string / regexp - `*/BannerAd.gif$match-case `— такое правило будет блокировать `http://example.com/BannerAd.gif`, но не `http://example.com/bannerad.gif`. +:::info Совместимость + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} Этот модификатор ограничивает область действия правила запросами, использующими указанный набор методов HTTP. Допускаются отрицательные методы. Методы должны быть указаны строчными буквами, но сопоставляются они без учёта регистра. Чтобы добавить несколько доменов в одно правило, используйте символ `|` в качестве разделителя. @@ -502,7 +522,7 @@ h_value = string / regexp :::info Совместимость -Правила с `$method` поддерживаются AdGuard для Windows, Mac, Android, **с CoreLibs 1.12 или более поздней версии**, а также Браузерным расширением AdGuard для Chrome, Firefox, Edge, **с TSUrlFilter 2.1.1 или более поздней версии**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard будет пытаться закрыть браузерную вкла - Модификатор `$popup` лучше всего работает в браузерном расширении AdGuard. - В AdGuard для Safari и iOS `$popup-правила` просто заблокируют страницу. - В AdGuard для Windows, Mac и Android модификатор `$popup` в некоторых случаях может не обнаружить всплывающее окно, и оно не будет заблокировано. Модификатор `$popup` применяет тип контента `document` со специальным флагом, который передаётся блокирующей странице. Блокирующая страница сама может провести некоторые проверки и закрыть окно, если это действительно всплывающее окно. В противном случае страница должна быть загружена. Его можно комбинировать с другими модификаторами типа request, такими как `$third-party` и `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ AdGuard будет пытаться закрыть браузерную вкла ### Модификаторы типа контента {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (удалён)](#object-subrequest-modifier) -- [`$webrtc` (удалён)](#webrtc-modifier) - Существует целый набор модификаторов, которые ограничивают область применения правила только определённым типом контента. Эти модификаторы можно комбинировать, чтобы, например, распространить правило одновременно и на картинки, и на скрипты. :::info Совместимость -Существует большая разница в том, как AdGuard определяет тип контента на разных платформах. В случае Браузерного расширения AdGuard, тип контента для каждого запроса предоставляется самим браузером. В случае AdGuard для Windows, Mac и Android для определения используется следующая методика: сначала мы пытаемся определить тип запроса по заголовку запроса `Sec-Fetch-Dest` или по расширению имени файла. Если запрос не заблокирован на этом этапе, то тип запроса уточняется с использованием заголовка `Content-Type` в начале ответа, полученного от сервера. +Существует большая разница в том, как AdGuard определяет тип контента на разных платформах. В случае Браузерного расширения AdGuard, тип контента для каждого запроса предоставляется самим браузером. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ AdGuard будет пытаться закрыть браузерную вкла - `||example.org^$script,stylesheet` — соответствует всем скриптам и стилям с домена `example.org`. - `||example.org^$~image,~script,~stylesheet` — соответствует всем запросам к домену `example.org`, кроме картинок, скриптов и стилей. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard для iOS][ios-app] | [AdGuard для Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} Правило соответствует запросам основного документа страницы, т.е. HTML-документа, который загружается во вкладке браузера. Оно не подходит для iframe, для них существует модификатор [`$subdocument`](#subdocument-modifier). @@ -647,6 +679,8 @@ AdGuard будет пытаться закрыть браузерную вкла AdGuard для Windows, Mac и Android часто не может точно определить `navigator.sendBeacon()`. Не рекомендуется использовать `$ping` в фильтрах, которые должны использоваться продуктами AdGuard на базе CoreLibs. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ AdGuard для Windows, Mac и Android часто не может точно о - `||example.com^$subdocument` блокирует запросы встроенных страниц (`frame` и `iframe`) к `example.com` и всем его поддоменам. - `||example.com^$subdocument,domain=domain.com` блокирует запросы встроенных страниц (`frame` и `iframe`) к `example.com` и его поддоменам с `domain.com` и всех его поддоменов. +:::info Совместимость + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} Правило применяется только к соединениям WebSocket. @@ -711,19 +753,6 @@ AdGuard для Windows, Mac и Android часто не может точно о ### Модификаторы правил-исключений {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic-правила](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Правила-исключения отключают действие других базовых правил для адресов, которым они соответствуют. Они начинаются с маркера `@@`. Для таких правил работают все базовые модификаторы, перечисленные выше. Также добавляется несколько специальных модификаторов, которые будут описаны ниже. :::note Визуальное представление @@ -732,6 +761,28 @@ AdGuard для Windows, Mac и Android часто не может точно о ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard для iOS][ios-app] | [AdGuard для Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Отключает [HTML-фильтрацию](#html-filtering-rules), правила [`$hls`](#hls-modifier), [`$replace`](#replace-modifier)и [`$jsonprune`](#jsonprune-modifier) на страницах, соответствующих правилу. @@ -859,6 +910,14 @@ $stealth [= opt1 [| opt2 [| opt3 [...]]]] - `@@||example.com^$urlblock` — любые запросы, отправленные со страниц сайта `example.com` и всех его поддоменов, не будут блокироваться. +:::info Совместимость + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic-правила {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. Правило относится к generic-правилам, если его действие не ограничено конкретными доменами. Также поддерживается wildcard-символ `*`. @@ -890,6 +949,14 @@ domain.com###banner - `@@||example.com^$genericblock` отключает базовые правила generic на любых страницах `example.com` и всех поддоменах. +:::info Совместимость + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Отключает все [косметические правила](#cosmetic-rules) generic на страницах, соответствующих правилу-исключению. @@ -914,35 +981,49 @@ domain.com###banner :::info Совместимость -Правила с модификатором `$specifichide` **не поддерживаются** в AdGuard для iOS и Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Расширенные возможности +### Расширенные возможности {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (устаревший)](#empty-modifier) -- [`$mp4` (устаревший)](#mp4-modifier) - -Модификаторы, описанные в этом разделе, полностью меняют поведение базовых правил. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard для iOS][ios-app] | [AdGuard для Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ The `$network` modifier can only be used in rules together with the `$app` and ` - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. Например, правило выше. - `@@||example.org/page/*$permissions` отключает все `$permissions`-правила на всех страницах, подходящих под паттерн правила. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` или `@@||example.org^$urlblock` отключает все `$permission`-правила на всех страницах, подходящих под паттерн правила. :::caution Ограничения @@ -1861,7 +1942,7 @@ $removeparam=/^(utm_content|utm_campaign|utm_referrer)=/ :::caution Ограничения - Правила с модификатором `$removeparam` могут быть использованы [**только в доверенных фильтрах**](#trusted-filters). -- Правила с `$removeparam` совместимы с [базовыми модификаторами](#basic-rules-common-modifiers), [модификаторами типа контента](#content-type-modifiers), а также с модификаторами `$important` и `$app`. Правила, содержащие другие модификаторы, считаются некорректными и не будут применены. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ All allowed content types: Вес правила: базовый вес + разрешённые типы контента, [категория 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Другие правила +## Другие правила {#non-basic-rules} + +However, basic rules may not be enough to block ads. Иногда для этого требуется скрыть какой-нибудь элемент или изменить часть HTML-кода страницы, при этом ничего не сломав. Для этого предназначены правила, описанные в данном разделе. -Возможностей базовых правил может оказаться недостаточно для блокировки рекламы. Иногда для этого требуется скрыть какой-нибудь элемент или изменить часть HTML-кода страницы, при этом ничего не сломав. Для этого предназначены правила, описанные в данном разделе. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard для iOS][ios-app] | [AdGuard для Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS-правила](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Косметические правила {#cosmetic-rules} @@ -3286,14 +3382,7 @@ example.org#%#//scriptlet("abort-on-property-read", "alert") Больше информации о доверенных скриптлетах можно найти на [GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Модификаторы для небазовых правил - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Модификаторы для небазовых правил {#non-basic-rules-modifiers} Поведение любого правила можно изменить, используя модификаторы, описанные ниже. @@ -3311,6 +3400,21 @@ modifiers = modifier0[, modifier1[, ...[, modifierN]]] В значениях модификаторов следующие символы должны быть экранированы: `[`, `]`, `,` и `\` (если он не используется для экранирования). Используйте `\`, чтобы экранировать их. Например, экранированная скобка выглядит так: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard для iOS][ios-app] | [AdGuard для Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} Модификатор `$app` ограничивает действие правила до конкретного приложения или списка приложений. Поведение и синтаксис модификатора полностью совпадают с соответствующим [модификатором `$app` для базовых правил](#app-modifier). @@ -3382,11 +3486,11 @@ $path ["=" pattern] :::info Совместимость -Правила с модификатором `$path` поддерживаются в AdGuard для Windows, Mac и Android и Браузерном расширении AdGuard для Chrome, Firefox и Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} Модификатор `$url` ограничивает действие правила запросами, URL которых соответствует указанной маске. @@ -3783,3 +3887,39 @@ ExtendedCss.query(selector); Желаем вам удачи в создании собственных рекламных фильтров. Если вы хотите узнать, как правильно создавать собственные фильтры, ознакомьтесь с разделом на нашем форуме [](https://forum.adguard.com/index.php?forums/69/), посвящёном написанию правил фильтрации. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard для Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/sk/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/sk/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/sk/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/sk/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/sk/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/sk/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/sl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/sl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/sl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/sl/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/sl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/sl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/sl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/sl/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/sv/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/sv/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/sv/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/sv/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/sv/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/sv/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/sv/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/sv/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/ta/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/ta/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/ta/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/ta/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/ta/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/ta/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/ta/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/ta/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/adguard-for-android/overview.md b/i18n/tr/docusaurus-plugin-content-docs/current/adguard-for-android/overview.md index aa78a656dc5..a64a963fce1 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/adguard-for-android/overview.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/adguard-for-android/overview.md @@ -324,7 +324,7 @@ This section contains the list of apps for which AdGuard filters HTTPS traffic. This setting allows you to manage websites for which AdGuard should filter HTTPS traffic. -HTTPS filtering allows AdGuard to filter the content of requests and responses, but we never collect or store this data. However, to increase security, we [exclude websites that contain potentially sensitive information from HTTPS filtering](/general/https-filtering/what-is-https-filtering/#financial-websites-and-websites-with-sensitive-personal-data). +HTTPS filtreleme, AdGuard'ın isteklerin ve yanıtların içeriğini filtrelemesini sağlar, ancak bu verileri asla toplamaz veya saklamayız. However, to increase security, we [exclude websites that contain potentially sensitive information from HTTPS filtering](/general/https-filtering/what-is-https-filtering/#financial-websites-and-websites-with-sensitive-personal-data). You can also add websites that you consider necessary to exclusions by selecting one of the modes: diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/tr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 995a90edbd2..b0d1bbc53de 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- verilerinizi izlemekten korumak için IP adresinizi değiştirir - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/tr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/tr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 8b169c1e7cb..61ba3c0ca51 100644 --- a/i18n/tr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/tr/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -110,7 +110,7 @@ AdGuard [extends CSS](#extended-css-selectors) and lets filters developers handl | Name | CSS selector | Description | | ---------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ID selector | `#banners` | Matches all elements with `id` attribute equal to `banners`.
![ID selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_id_selector.png) | -| Class selector | `.banner` | Matches all elements with `class` attribute containing `banners`.
![Class selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_selector.png) | +| Class selector | `.banners` | Matches all elements with `class` attribute containing `banners`.
![Class selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_selector.png) | | Attribute selector | `div[class="banners"]` | Matches all `div` elements with `class` attribute **exactly equal** to `banners`.
![Attribute selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr.png) | | Attribute substring selector | `div[class^="advert1"]` | Matches all `div` elements which `class` attribute **starts with** the `advert1` string.
![Attribute substring selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr_start.png) | | Attribute substring selector | `div[class$="banners_ads"]` | Matches all `div` elements which `class` attribute **ends with** the `banners_ads` string.
![Attribute substring selector](https://cdn.adtidy.org/public/Adguard/kb/en/rules_syntax/css_class_attr_end.png) | @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Temel olarak, sadece kural uygulamasının kapsamını sınırlarlar. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard İçerik Engelleyici][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:------------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Temel olarak, sadece kural uygulamasının kapsamını sınırlarlar. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. Bir kurala birden fazla alan adı eklemek için ayırıcı olarak `|` karakterini kullanın. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard İçerik Engelleyici][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:------------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard İçerik Engelleyici][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:------------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,7 +910,15 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. -#### Generic rules {#exception-modifiers-generic-rules} +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + +#### Genel kurallar {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard İçerik Engelleyici][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:------------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2158,7 +2239,7 @@ The [`$replace`](#replace-modifier) modifier takes precedence over all blocking `||example.com^` -Weight of the rule without modifiers: `1`. +Değiştiriciler olmadan kuralın ağırlığı: `1`. **Example 2** @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard İçerik Engelleyici][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:------------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS kuralları](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,16 +3382,9 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules +## Temel olmayan kural türleri için değiştiriciler {#non-basic-rules-modifiers} - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) - -Each rule can be modified using the modifiers described in the following paragraphs. +Her kural, aşağıdaki paragraflarda açıklanan değiştiriciler kullanılarak değiştirilebilir. **Söz dizimi** @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard İçerik Engelleyici][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:------------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/uk/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/uk/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/vi/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/vi/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/vi/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/vi/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/vi/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index e8759c3647f..4b95abcd977 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 09be3719dba..f3fbd0547f1 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard iOS版][ios-app] | [AdGuard Safari版][ext-saf] | [AdGuard 内容拦截器][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:-----------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard iOS版][ios-app] | [AdGuard Safari版][ext-saf] | [AdGuard 内容拦截器][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------:|:--------------------------:|:-----------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard iOS版][ios-app] | [AdGuard Safari版][ext-saf] | [AdGuard 内容拦截器][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------:|:--------------------------:|:-----------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard iOS版][ios-app] | [AdGuard Safari版][ext-saf] | [AdGuard 内容拦截器][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------:|:--------------------------:|:-----------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard iOS版][ios-app] | [AdGuard Safari版][ext-saf] | [AdGuard 内容拦截器][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------:|:--------------------------:|:-----------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard iOS版][ios-app] | [AdGuard Safari版][ext-saf] | [AdGuard 内容拦截器][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------:|:--------------------------:|:-----------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard Safari版" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md index 4a6d1555725..696d824ed38 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/adguard-for-windows/overview.md @@ -150,7 +150,7 @@ How does AdGuard VPN work? Without going into technical details, we can say that **What AdGuard VPN does:** - hides your real whereabouts and helps you stay anonymous -- сhanges your IP address to protect your data from tracking +- changes your IP address to protect your data from tracking - encrypts your traffic to make it unreachable to scammers - lets you configure where to use VPN and where not to (exclusions feature) diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md b/i18n/zh-TW/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md index 00432b80f16..fa2794035d0 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/general/ad-filtering/create-own-filters.md @@ -247,20 +247,32 @@ Example: ### Basic modifiers {#basic-rules-basic-modifiers} +The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. + -- [`$app`](#app-modifier) -- [`$denyallow`](#denyallow-modifier) -- [`$domain`](#domain-modifier) -- [`$header`](#header-modifier) -- [`$important`](#important-modifier) -- [`$match-case`](#match-case-modifier) -- [`$method`](#method-modifier) -- [`$popup`](#popup-modifier) -- [`$third-party`](#third-party-modifier) -- [`$to`](#to-modifier) +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:-----------------------------------:|:-----------------------------------:|:---------------------------------:| +| [$app](#app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$denyallow](#denyallow-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$domain](#domain-modifier) | ✅ | ✅ | ✅ | ✅ [*](#domain-modifier-limitations) | ✅ [*](#domain-modifier-limitations) | ✅ | +| [$header](#header-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$important](#important-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$match-case](#match-case-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$method](#method-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$popup](#popup-modifier) | ✅ * | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$third-party](#third-party-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$to](#to-modifier) | ⏳ | ✅ | ✅ | ❌ | ❌ | ❌ | -The following modifiers are the most simple and frequently used. Basically, they just limit the scope of rule application. +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: #### **`$app`** {#app-modifier} @@ -408,6 +420,8 @@ In the following examples it is implied that requests are sent from `http://exam - `/banner\d+/$domain=targetdomain.com` will not be matched as it contains a regular expression. - `page$domain=targetdomain.com|~example.org` will not be matched because the referrer domain is explicitly excluded. +#### `domain` modifier limitations {#domain-modifier-limitations} + :::caution Limitations Safari does not support the simultaneous use of allowed and disallowed domains, so rules like `||baddomain.com^$domain=example.org|~foo.example.org` will not work in AdGuard for iOS and AdGuard for Safari. @@ -483,6 +497,12 @@ This modifier defines a rule which applies only to addresses that match the case - `*/BannerAd.gif$match-case` — this rule will block `http://example.com/BannerAd.gif`, but not `http://example.com/bannerad.gif`. +:::info Compatibility + +Rules with `$match-case` modifier currently are not supported by [AdGuard for iOS and Safari](https://github.com/AdguardTeam/SafariConverterLib/issues/55). + +::: + #### **`$method`** {#method-modifier} This modifier limits the rule scope to requests that use the specified set of HTTP methods. Negated methods are allowed. The methods must be specified in all lowercase characters, but are matched case-insensitively. To add multiple domains to one rule, use the `|` character as a separator. @@ -502,7 +522,7 @@ Rules with mixed value restriction are considered invalid. So, for example, the :::info Compatibility -Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. +Rules with the `$method` are supported by AdGuard for Windows, Mac, Android, **running CoreLibs v1.12 or later**, and AdGuard Browser Extension for Chrome, Firefox, Edge, **running TSUrlFilter v2.1.1 or later**. ::: @@ -519,6 +539,7 @@ AdGuard will try to close the browser tab with any address that matches a blocki - `$popup` modifier works best in AdGuard Browser Extension. - In AdGuard for Safari and iOS, `$popup` rules simply block the page right away. - In AdGuard for Windows, Mac, and Android, `$popup` modifier may not detect a popup in some cases and it won't be blocked. `$popup` modifier applies the `document` content type with a special flag which is passed to a blocking page. Blocking page itself can do some checks and close the window if it is really a popup. Otherwise, page should be loaded. It can be combined with other request type modifiers, such as `$third-party` and `$important`. +- Rules with `$popup` modifier are not supported by AdGuard Content Blocker. ::: @@ -571,28 +592,11 @@ Rules with the `$to` modifier are supported by AdGuard for Windows, Mac, and And ### Content-type modifiers {#content-type-modifiers} - - -- [`$document`](#document-modifier) -- [`$font`](#font-modifier) -- [`$image`](#image-modifier) -- [`$media`](#media-modifier) -- [`$object`](#object-modifier) -- [`$other`](#other-modifier) -- [`$ping`](#ping-modifier) -- [`$script`](#script-modifier) -- [`$stylesheet`](#stylesheet-modifier) -- [`$subdocument`](#subdocument-modifier) -- [`$websocket`](#websocket-modifier) -- [`$xmlhttprequest`](#xmlhttprequest-modifier) -- [`$object-subrequest` (removed)](#object-subrequest-modifier) -- [`$webrtc` (removed)](#webrtc-modifier) - There is a set of modifiers, which can be used to limit the rule's application area to certain type of content. These modifiers can also be combined to cover, for example, both images and scripts. :::info Compatibility -There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, Android use following method: first we try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. +There is a big difference in how AdGuard determines the content type on different platforms. For AdGuard Browser Extension, content type for every request is provided by the browser. AdGuard for Windows, Mac, and Android use the following method: first, the apps try to determine the type of the request by the `Sec-Fetch-Dest` request header or by the filename extension. If the request is not blocked at this stage, the type will be determined using the `Content-Type` header at the beginning of the server response. ::: @@ -602,6 +606,34 @@ There is a big difference in how AdGuard determines the content type on differen - `||example.org^$script,stylesheet` — corresponds to all the scripts and styles from `example.org`. - `||example.org^$~image,~script,~stylesheet` — corresponds to all requests to `example.org` except for the images, scripts and styles. + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$document](#document-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$font](#font-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$image](#image-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$media](#media-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$object](#object-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$other](#other-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$ping](#ping-modifier) | ✅ * | ✅ | ✅ | ❌ | ❌ | ✅ | +| [$script](#script-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$stylesheet](#stylesheet-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$subdocument](#subdocument-modifier) | ✅ * | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$websocket](#websocket-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ✅ | +| [$xmlhttprequest](#xmlhttprequest-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$webrtc 🚫](#webrtc-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$object-subrequest 🚫](#object-subrequest-modifier "removed") | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported +- 🚫 — removed and no longer supported + +::: + #### **`$document`** {#document-modifier} 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. @@ -647,6 +679,8 @@ The rule corresponds to requests caused by either `navigator.sendBeacon()` or th AdGuard for Windows, Mac, and Android often cannot accurately detect `navigator.sendBeacon()`. Using `$ping` is not recommended in the filter lists that are supposed to be used by CoreLibs-based AdGuard products. +Rules with `$ping` modifier are not supported by AdGuard for Safari and iOS. + ::: #### **`$script`** {#script-modifier} @@ -666,6 +700,14 @@ 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. +:::info Compatibility + +In AdGuard for Windows, Mac, and Android subdocuments are being detected by the [Sec-Fetch-Dest header][sec-fetch-dest-header] if it is present. Otherwise, some main pages may be treated as subdocuments. + +Rules with `$subdocument` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$websocket`** {#websocket-modifier} The rule applies only to WebSocket connections. @@ -711,19 +753,6 @@ The rule applies only to WebRTC connections. ### Exception rules modifiers {#exception-modifiers} - - -- [`$content`](#content-modifier) -- [`$elemhide`](#elemhide-modifier) -- [`$extension`](#extension-modifier) -- [`$jsinject`](#jsinject-modifier) -- [`$stealth`](#stealth-modifier) -- [`$urlblock`](#urlblock-modifier) -- [Generic rules](#exception-modifiers-generic-rules) - - [`$genericblock`](#genericblock-modifier) - - [`$generichide`](#generichide-modifier) - - [`$specifichide`](#specifichide-modifier) - Exception rules disable the other basic rules for the addresses to which they correspond. They begin with a `@@` mark. All the basic modifiers listed above can be applied to them and they also have a few special modifiers. :::note Visual representation @@ -732,6 +761,28 @@ We recommend to get acquainted with [this article](https://adblockplus.org/filte ::: + + +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| --------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$content](#content-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [$elemhide](#elemhide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$extension](#extension-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$jsinject](#jsinject-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$stealth](#stealth-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$urlblock](#urlblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$genericblock](#genericblock-modifier) | ✅ | ✅ | ✅ | ✅ * | ✅ * | ❌ | +| [$generichide](#generichide-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [$specifichide](#specifichide-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- ❌ — not supported + +::: + #### **`$content`** {#content-modifier} Disables [HTML filtering](#html-filtering-rules), [`$hls`](#hls-modifier), [`$replace`](#replace-modifier), and [`$jsonprune`](#jsonprune-modifier) rules on the pages that match the rule. @@ -859,6 +910,14 @@ Disables blocking of all requests sent from the pages matching the rule and disa - `@@||example.com^$urlblock` — any requests sent from the pages at `example.com` and all subdomains are not going to be blocked. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$urlblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$urlblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### Generic rules {#exception-modifiers-generic-rules} Before we can proceed to the next modifiers, we have to make a definition of *generic rules*. The rule is generic if it is not limited to specific domains. Wildcard character `*` is supported as well. @@ -890,6 +949,14 @@ Disables generic basic rules on pages that correspond to exception rule. - `@@||example.com^$genericblock` disables generic basic rules on any pages at `example.com` and all subdomains. +:::info Compatibility + +In AdGuard for iOS and Safari rules with `$genericblock` work as [$document exclusion](#document-modifier) — unblock everything. + +Rules with `$genericblock` modifier are not supported by AdGuard Content Blocker. + +::: + #### **`$generichide`** {#generichide-modifier} Disables all generic [cosmetic rules](#cosmetic-rules) on pages that correspond to the exception rule. @@ -914,35 +981,49 @@ All cosmetic rules — not just specific ones — can be disabled by [`$elemhide :::info Compatibility -Rules with `$specifichide` modifier are **not supported** by AdGuard for iOS and Safari. +Rules with `$specifichide` modifier are not supported by AdGuard for iOS and Safari and AdGuard Content Blocker. ::: -### Advanced capabilities +### Advanced capabilities {#advanced-modifiers} + +These modifiers are able to completely change the behavior of basic rules. -- [`$all`](#all-modifier) -- [`$badfilter`](#badfilter-modifier) -- [`$cookie`](#cookie-modifier) -- [`$csp`](#csp-modifier) -- [`$hls`](#hls-modifier) -- [`$inline-font`](#inline-font-modifier) -- [`$inline-script`](#inline-script-modifier) -- [`$jsonprune`](#jsonprune-modifier) -- [`$network`](#network-modifier) -- [`$permissions`](#permissions-modifier) -- [`$redirect`](#redirect-modifier) -- [`$redirect-rule`](#redirect-rule-modifier) -- [`$referrerpolicy`](#referrerpolicy-modifier) -- [`$removeheader`](#removeheader-modifier) -- [`$removeparam`](#removeparam-modifier) -- [`$replace`](#replace-modifier) -- [`noop`](#noop-modifier) -- [`$empty` (deprecated)](#empty-modifier) -- [`$mp4` (deprecated)](#mp4-modifier) - -These modifiers are able to completely change the behaviour of basic rules. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$all](#all-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$badfilter](#badfilter-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$cookie](#cookie-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$csp](#csp-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$hls](#hls-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$inline-font](#inline-font-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$inline-script](#inline-script-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$jsonprune](#jsonprune-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$network](#network-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$permissions](#permissions-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | +| [$redirect](#redirect-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$redirect-rule](#redirect-rule-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$referrerpolicy](#referrerpolicy-modifier) | ⏳ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$removeheader](#removeheader-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$removeparam](#removeparam-modifier) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$replace](#replace-modifier) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [noop](#noop-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$empty 👎](#empty-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | +| [$mp4 👎](#mp4-modifier "deprecated") | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details + + +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future + +::: #### **`$all`** {#all-modifier} @@ -1540,7 +1621,7 @@ In case if multiple `$permissions` rules match a single request, AdGuard will ap - `||example.org^$permissions=autoplay=()` disallows autoplay media requested through the `HTMLMediaElement` interface across `example.org`. - `@@||example.org/page/*$permissions=autoplay=()` disables all rules with the `$permissions` modifier exactly matching `autoplay=()` on all the pages matching the rule pattern. For instance, the rule above. - `@@||example.org/page/*$permissions` disables all the `$permissions` rules on all the pages matching the rule pattern. -- `$domain=example.org|example.com,permissions=storage-access=()\, сamera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. +- `$domain=example.org|example.com,permissions=storage-access=()\, camera=()` disallows using the Storage Access API to request access to unpartitioned cookies and using video input devices across `example.org` and `example.com`. - `@@||example.org^$document` or `@@||example.org^$urlblock` disables all the `$permission` rules on all the pages matching the rule pattern. :::caution Limitations @@ -1861,7 +1942,7 @@ With these rules, specified UTM parameters will be removed from any request save :::caution Restrictions - Rules with `$removeparam` modifier can be used [**only in trusted filters**](#trusted-filters). -- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-common-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. The rules which have any other modifiers are considered invalid and will be discarded. +- `$removeparam` rules are compatible with [basic modifiers](#basic-rules-basic-modifiers), [content-type modifiers](#content-type-modifiers), and with `$important` and `$app` modifiers. Rules with any other modifiers are considered invalid and will be discarded. ::: @@ -2208,10 +2289,25 @@ Rule weight: base weight + allowed content type, [category 2](#priority-category Rule weight: base weight + allowed content types, [category 2](#priority-category-2): `1 + (50 + 50/12) = 55`. - -# Non-basic rules +## Non-basic rules {#non-basic-rules} + +However, basic rules may not be enough to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. -However, the capabilities of the basic rules may not be sufficient to block ads. Sometimes you need to hide an element or change part of the HTML code of a web page without breaking anything. The rules described in this section are created specifically for this purpose. +| Categories \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------------ |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [Element hiding](#cosmetic-elemhide-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| [CSS rules](#cosmetic-css-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Extended CSS](#extended-css-selectors) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [HTML filtering](#html-filtering-rules) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | +| [JavaScript](#javascript-rules) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [Scriptlets](#scriptlets) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + +:::note + +- ✅ — fully supported +- ❌ — not supported + +::: ## Cosmetic rules {#cosmetic-rules} @@ -3286,14 +3382,7 @@ Learn more about [how to debug scriptlets](#debug-scriptlets). More information about trusted scriptlets can be found [on GitHub](https://github.com/AdguardTeam/Scriptlets#trusted-scriptlets). -## Modifiers for non-basic type of rules - - - -- [`$app`](#non-basic-app-modifier) -- [`$domain`](#non-basic-domain-modifier) -- [`$path`](#non-basic-path-modifier) -- [`$url`](#non-basic-url-modifier) +## Modifiers for non-basic type of rules {#non-basic-rules-modifiers} Each rule can be modified using the modifiers described in the following paragraphs. @@ -3311,6 +3400,21 @@ For example, `[$domain=example.com,app=test_app]##selector`. In the modifiers values of the following characters must be escaped: `[`, `]`, `,`, and `\` (unless it is used for the escaping). Use `\` to escape them. For example, an escaped bracket looks like this: `\]`. +| Modifier \ Products | [CoreLibs apps][cl-apps] | [AdGuard for Chromium][ext-chr] | [AdGuard for Firefox][ext-ff] | [AdGuard for iOS][ios-app] | [AdGuard for Safari][ext-saf] | [AdGuard Content Blocker][and-cb] | +| ------------------------------------- |:------------------------:|:-------------------------------:|:-----------------------------:|:--------------------------:|:-----------------------------:|:---------------------------------:| +| [$app](#non-basic-app-modifier) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [$domain](#non-basic-domain-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$path](#non-basic-path-modifier) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| [$url](#non-basic-url-modifier) | ✅ | ⏳ | ⏳ | ❌ | ❌ | ❌ | + +:::note + +- ✅ — fully supported +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported + +::: + ### **`$app`** {#non-basic-app-modifier} `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications. The modifier's behavior and syntax perfectly match the corresponding [basic rules `$app` modifier](#app-modifier). @@ -3382,11 +3486,11 @@ If `pattern` is not set for `$path`, rule will apply only on the main page of we :::info Compatibility -Rules with `$path` modifier are supported by AdGuard for Windows, Mac, and Android, and AdGuard Browser Extension for Chrome, Firefox, and Edge. +Rules with `$path` modifier are not supported by AdGuard Content Blocker. ::: -### **`url`** {#non-basic-url-modifier} +### **`$url`** {#non-basic-url-modifier} `$url` modifier limits the rule application area to URLs matching the specified mask. @@ -3783,3 +3887,39 @@ The following scriptlets also may be used for debug purposes: We wish you luck with creating you own ad filters. If you need an advice on how to create your own filters properly, our forum has a [special section](https://forum.adguard.com/index.php?forums/69/) dedicated to writing your own filtering rules. + +* * * + +## Compatibility tables legend {#compatibility-tables-legend} + +### Product shortcuts {#what-product} + +1. `CoreLibs apps` — AdGuard for Windows, Mac, Android +1. `AdGuard for Chromium` — AdGuard Browser Extension for Chrome and other Chromium-based browsers, e.g. new Microsoft Edge, Opera +1. `AdGuard for Firefox` — AdGuard Browser Extension for Firefox +1. `AdGuard for iOS` — AdGuard for iOS and AdGuard for iOS Pro (for mobile Safari browser) +1. `AdGuard for Safari` — AdGuard for desktop Safari browser +1. `AdGuard Content Blocker` — Content Blocker for Android mobile browsers: Samsung Internet and Yandex Browser + +### Compatibility shortcuts {#what-compatibility} + +:::note + +- ✅ — fully supported +- ✅ * — supported, but reliability may vary or limitations may occur; check the modifier description for more details +- 🧩 — may already be implemented in nightly or beta versions but is not yet supported in release versions +- ⏳ — feature that has been implemented or is planned to be implemented but is not yet available in any product +- ❌ — not supported +- 👎 — deprecated; still supported but will be removed in the future +- 🚫 — removed and no longer supported + +::: + +[cl-apps]: #what-product "AdGuard for Windows, Mac, Android" +[ext-chr]: #what-product "AdGuard Browser Extension for Chrome and other Chromium-based browsers" +[ext-ff]: #what-product "AdGuard Browser Extension for Firefox" +[ios-app]: #what-product "AdGuard for iOS and AdGuard for iOS Pro" +[ext-saf]: #what-product "AdGuard for Safari" +[and-cb]: #what-product "AdGuard Content Blocker for Samsung Internet and Yandex Browser on Android" + +[sec-fetch-dest-header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest