From d673ea05fce69ac27bff1c113e67394d607076ec Mon Sep 17 00:00:00 2001 From: Slava Leleka Date: Wed, 6 Dec 2023 18:47:55 +0200 Subject: [PATCH 1/3] fix comment --- custom_platforms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_platforms.js b/custom_platforms.js index d00742f99a6b7..dbf4a8a1365ba 100644 --- a/custom_platforms.js +++ b/custom_platforms.js @@ -1,6 +1,6 @@ /** * @file Overwrite default FilterCompiler's platforms configuration. - * @see {@link https://github.com/AdguardTeam/FiltersCompiler/blob/master/platforms.json} + * @see {@link https://github.com/AdguardTeam/FiltersCompiler/blob/master/src/main/platforms-config.js} * * IMPORTANT: During making any changes in this file, * the default configuration should also be updated through PR on BitBucket. From 2ff1a014ee01fef718a081a107e83f274676dd45 Mon Sep 17 00:00:00 2001 From: Slava Leleka Date: Wed, 6 Dec 2023 18:49:13 +0200 Subject: [PATCH 2/3] update compiler to v1.1.119 --- package.json | 2 +- yarn.lock | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 0f08e3b41a93f..f414d4954a596 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "node": ">=18" }, "dependencies": { - "adguard-filters-compiler": "git+https://github.com/AdguardTeam/FiltersCompiler.git#v1.1.115" + "adguard-filters-compiler": "git+https://github.com/AdguardTeam/FiltersCompiler.git#v1.1.119" }, "devDependencies": { "eslint": "^8.54.0", diff --git a/yarn.lock b/yarn.lock index 7741bb027ffe7..9fd33a09c1d06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,10 +7,10 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@adguard/extended-css@^2.0.52": - version "2.0.52" - resolved "https://registry.yarnpkg.com/@adguard/extended-css/-/extended-css-2.0.52.tgz#f5e7c3df1796deb96404a1b6441e7a4c729f09ac" - integrity sha512-T77MnFD/+A3q93MNEq13qPUXPQRBeOUO9LRyqslcaz7jD5qMcikX1nx436u3PXdZXZpa6R0nnwXQ7wwScDmVgw== +"@adguard/extended-css@^2.0.56": + version "2.0.56" + resolved "https://registry.yarnpkg.com/@adguard/extended-css/-/extended-css-2.0.56.tgz#4205287fc3e0b4dbf9f64ccad55c56a73e04cef1" + integrity sha512-RMPRGZ80kM6KiKRR0K2DUOD0+2CiadBk+G6zYBrRmzk4lD71Cipv2b9/rRy9Fdh41ipoApZsQdbJZozXFsM8RA== "@adguard/filters-downloader@^1.1.23": version "1.1.23" @@ -19,20 +19,20 @@ dependencies: axios "^0.21.1" -"@adguard/scriptlets@^1.9.91": - version "1.9.91" - resolved "https://registry.yarnpkg.com/@adguard/scriptlets/-/scriptlets-1.9.91.tgz#6f416b749e9528ceb6ecc4d408b82f914f7b4a6e" - integrity sha512-oJDDZgdtnFbVTtQm1ag9MUoiqggp4BvykCyufhdlq72hyDjX7NrBEQ9sU1qQPaxDPQ/VD8Uur45rFFxAPf2WNA== +"@adguard/scriptlets@^1.9.101": + version "1.9.101" + resolved "https://registry.yarnpkg.com/@adguard/scriptlets/-/scriptlets-1.9.101.tgz#f18ba3b16b673790e92a6ec66977590cc619ae05" + integrity sha512-mqqQ57v/BRVVEYXXmWUPI2S6Fgxj1lj5pC1rA7Sde3QiLyS9CqL29yu9EydXY2QJw9eN9Xw/NsdoXaOEfSd9bA== dependencies: "@babel/runtime" "^7.20.13" js-yaml "^3.13.1" -"@adguard/tsurlfilter@2.2.5": - version "2.2.5" - resolved "https://registry.yarnpkg.com/@adguard/tsurlfilter/-/tsurlfilter-2.2.5.tgz#fda46d4b08361942cb58b1d7a35921cbd34b5442" - integrity sha512-r44FxLH7TcB2GF8kiBTXaoQKSkYYC8udfcV7sLY41kgJYjM05g0TxhGO3UhkrUZ8ps2ctNMKFbghpbrwlJIvmA== +"@adguard/tsurlfilter@2.2.7": + version "2.2.7" + resolved "https://registry.yarnpkg.com/@adguard/tsurlfilter/-/tsurlfilter-2.2.7.tgz#283e42fc0e13b84234a606f76ae9eab8ccbbe230" + integrity sha512-DgNx6yG2fkcvAMSz6CuB1dQfUiB7mrJytA3fQWYkm335V7m89RMdsORwjL/TA2cBYtNDgV3DDDvwJsy/B+/kAQ== dependencies: - "@adguard/scriptlets" "^1.9.91" + "@adguard/scriptlets" "^1.9.101" cidr-tools "^6.4.1" commander "9.4.1" is-cidr "4.0.2" @@ -174,14 +174,14 @@ acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== -"adguard-filters-compiler@git+https://github.com/AdguardTeam/FiltersCompiler.git#v1.1.115": - version "1.1.115" - resolved "git+https://github.com/AdguardTeam/FiltersCompiler.git#444ef115aebedd9299a867cefe85fe4c1f1eca0d" +"adguard-filters-compiler@git+https://github.com/AdguardTeam/FiltersCompiler.git#v1.1.119": + version "1.1.119" + resolved "git+https://github.com/AdguardTeam/FiltersCompiler.git#a1e1911f74fa06c1da5a1a72329c1b9a2366ee7d" dependencies: - "@adguard/extended-css" "^2.0.52" + "@adguard/extended-css" "^2.0.56" "@adguard/filters-downloader" "^1.1.23" - "@adguard/scriptlets" "^1.9.91" - "@adguard/tsurlfilter" "2.2.5" + "@adguard/scriptlets" "^1.9.101" + "@adguard/tsurlfilter" "2.2.7" ajv "^8.11.0" child_process ">=1.0.2" jsdom "^21.1.1" From 31122af8f43c8ee39c1207b661ee9eb7542d07bb Mon Sep 17 00:00:00 2001 From: Slava Leleka Date: Wed, 6 Dec 2023 18:50:20 +0200 Subject: [PATCH 3/3] skip unblocking important rules for ubo as unsupported https://github.com/AdguardTeam/FiltersCompiler/issues/200 --- custom_platforms.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/custom_platforms.js b/custom_platforms.js index dbf4a8a1365ba..3ca8647f4fe41 100644 --- a/custom_platforms.js +++ b/custom_platforms.js @@ -431,6 +431,16 @@ const CSS_MEDIA_RULES_PATTERNS = [ '#\\$#@media ', ]; +/** + * Patterns to match unblocking basic rules with `$important` modifier + * which is not supported by uBlock Origin. + * + * @see {@link https://github.com/AdguardTeam/FiltersCompiler/issues/200} + */ +const UNBLOCKING_IMPORTANT_RULES_PATTERNS = [ + '@@.*?(\\$|,)important', +]; + /** * Pattern to detect Extended CSS rules * @@ -709,6 +719,7 @@ module.exports = { ...HLS_MODIFIER_PATTERNS, ...REFERRERPOLICY_MODIFIER_PATTERNS, ...JSONPRUNE_MODIFIER_PATTERNS, + ...UNBLOCKING_IMPORTANT_RULES_PATTERNS, ], 'ignoreRuleHints': false, 'adbHeader': '![Adblock Plus 2.0]',