From 93d804166122db833b446825d4c31d0fddd5d9a6 Mon Sep 17 00:00:00 2001 From: gwarser Date: Sat, 1 Aug 2020 20:02:07 +0200 Subject: [PATCH] Update Pre-parsing directives tokens --- Static-filter-syntax.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Static-filter-syntax.md b/Static-filter-syntax.md index 2f35079..c48f76f 100644 --- a/Static-filter-syntax.md +++ b/Static-filter-syntax.md @@ -97,15 +97,21 @@ Support for pre-processor directives are the result of discussion with AdGuard d For the time being, only a single token is supported in a `!#if` directive (can be negated using `!`), and uBO supports only the following tokens, anything else will be ignored: - ext_ublock - env_chromium - env_edge - env_firefox - env_mobile - env_safari - false (1.21.9b7) - cap_html_filtering - cap_user_stylesheet +- `ext_ublock` -> true +- `env_chromium` -> all Chromium based browsers +- `env_edge` -> Edge (legacy, Trident) +- `env_firefox` -> Firefox +- `env_mobile` -> mobile devices +- `env_safari` -> Safari (legacy, up to 12 / macOS Mojave) +- `false` -> always false, added in [1.22.0](https://github.com/gorhill/uBlock/commit/1d805fb9da1aad918d02cc74796d5aa5e974b184) +- `cap_html_filtering` -> supports [HTML filtering](#html-filters) +- `cap_user_stylesheet` -> Firefox, Chromium 66+, supports style injection by [`tabs.insertCSS`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/insertCSS) +- `adguard` -> false, added in [1.28.1b6](https://github.com/gorhill/uBlock/commit/83c01fb3525bbede86c54fe06caa3eb8bc8eb0ef) +- `adguard_app_windows` -> false [1.28.1b7](https://github.com/gorhill/uBlock/commit/e44a568278678e04b508c2bc1b8a94a2c54b848c) +- `adguard_ext_chromium` -> Chromium based browsers, added in [1.28.1b6](https://github.com/gorhill/uBlock/commit/83c01fb3525bbede86c54fe06caa3eb8bc8eb0ef) +- `adguard_ext_edge` -> Edge (legacy, Trident), added in [1.28.1b6](https://github.com/gorhill/uBlock/commit/83c01fb3525bbede86c54fe06caa3eb8bc8eb0ef) +- `adguard_ext_firefox` -> Firefox, added in [1.28.1b6](https://github.com/gorhill/uBlock/commit/83c01fb3525bbede86c54fe06caa3eb8bc8eb0ef) +- `adguard_ext_opera` -> Chromium, added in [1.28.1b6](https://github.com/gorhill/uBlock/commit/83c01fb3525bbede86c54fe06caa3eb8bc8eb0ef) Starting from [1.22.0](https://github.com/gorhill/uBlock/commit/1d805fb9da1aad918d02cc74796d5aa5e974b184) you can use `!#if false` directive to disable a large block of your filters without having to remove them.