@adguard/agtree 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/agtree.cjs +133 -83
- package/dist/agtree.d.ts +1 -1
- package/dist/agtree.esm.js +133 -83
- package/dist/agtree.iife.min.js +4 -4
- package/dist/agtree.umd.min.js +4 -4
- package/dist/build.txt +1 -1
- package/package.json +1 -1
package/dist/agtree.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* AGTree v1.1.
|
|
2
|
+
* AGTree v1.1.7 (build date: Tue, 07 Nov 2023 14:17:46 GMT)
|
|
3
3
|
* (c) 2023 AdGuard Software Ltd.
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
|
|
@@ -6262,7 +6262,7 @@ class RuleConversionError extends Error {
|
|
|
6262
6262
|
}
|
|
6263
6263
|
}
|
|
6264
6264
|
|
|
6265
|
-
var data$
|
|
6265
|
+
var data$U = { adg_os_any:{ name:"all",
|
|
6266
6266
|
description:"$all modifier is made of $document, $popup, and all content-type modifiers combined.",
|
|
6267
6267
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#all-modifier",
|
|
6268
6268
|
negatable:false,
|
|
@@ -6288,14 +6288,14 @@ var data$T = { adg_os_any:{ name:"all",
|
|
|
6288
6288
|
negatable:false,
|
|
6289
6289
|
block_only:false } };
|
|
6290
6290
|
|
|
6291
|
-
var data$
|
|
6291
|
+
var data$T = { adg_os_any:{ name:"app",
|
|
6292
6292
|
description:"The `$app` modifier lets you narrow the rule coverage down to a specific application or a list of applications.\nThe modifier's behavior and syntax perfectly match the corresponding basic rules `$app` modifier.",
|
|
6293
6293
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#app-modifier",
|
|
6294
6294
|
assignable:true,
|
|
6295
6295
|
negatable:false,
|
|
6296
6296
|
value_format:"pipe_separated_apps" } };
|
|
6297
6297
|
|
|
6298
|
-
var data$
|
|
6298
|
+
var data$S = { adg_os_any:{ name:"badfilter",
|
|
6299
6299
|
description:"The rules with the `$badfilter` modifier disable other basic rules to which they refer. It means that\nthe text of the disabled rule should match the text of the `$badfilter` rule (without the `$badfilter` modifier).",
|
|
6300
6300
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#badfilter-modifier",
|
|
6301
6301
|
negatable:false },
|
|
@@ -6316,19 +6316,19 @@ var data$R = { adg_os_any:{ name:"badfilter",
|
|
|
6316
6316
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#badfilter",
|
|
6317
6317
|
negatable:false } };
|
|
6318
6318
|
|
|
6319
|
-
var data$
|
|
6319
|
+
var data$R = { ubo_ext_any:{ name:"cname",
|
|
6320
6320
|
description:"When used in an exception filter,\nit will bypass blocking CNAME uncloaked requests for the current (specified) document.",
|
|
6321
6321
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#cname",
|
|
6322
6322
|
negatable:false,
|
|
6323
6323
|
exception_only:true } };
|
|
6324
6324
|
|
|
6325
|
-
var data$
|
|
6325
|
+
var data$Q = { adg_os_any:{ name:"content",
|
|
6326
6326
|
description:"Disables HTML filtering and `$replace` rules on the pages that match the rule.",
|
|
6327
6327
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#content-modifier",
|
|
6328
6328
|
negatable:false,
|
|
6329
6329
|
exception_only:true } };
|
|
6330
6330
|
|
|
6331
|
-
var data$
|
|
6331
|
+
var data$P = { adg_os_any:{ name:"cookie",
|
|
6332
6332
|
description:"The `$cookie` modifier completely changes rule behavior.\nInstead of blocking a request, this modifier makes us suppress or modify the Cookie and Set-Cookie headers.",
|
|
6333
6333
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#cookie-modifier",
|
|
6334
6334
|
assignable:true,
|
|
@@ -6343,7 +6343,7 @@ var data$O = { adg_os_any:{ name:"cookie",
|
|
|
6343
6343
|
value_optional:true,
|
|
6344
6344
|
value_format:"^([^;=\\s]*?)((?:;(maxAge=\\d+;?)?|(sameSite=(lax|none|strict);?)?){1,3})(?<!;)$" } };
|
|
6345
6345
|
|
|
6346
|
-
var data$
|
|
6346
|
+
var data$O = { adg_os_any:{ name:"csp",
|
|
6347
6347
|
description:"This modifier completely changes the rule behavior.\nIf it is applied to a rule, it will not block the matching request.\nThe response headers are going to be modified instead.",
|
|
6348
6348
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#csp-modifier",
|
|
6349
6349
|
conflicts:[ "domain",
|
|
@@ -6390,7 +6390,7 @@ var data$N = { adg_os_any:{ name:"csp",
|
|
|
6390
6390
|
value_optional:true,
|
|
6391
6391
|
value_format:"csp_value" } };
|
|
6392
6392
|
|
|
6393
|
-
var data$
|
|
6393
|
+
var data$N = { adg_os_any:{ name:"denyallow",
|
|
6394
6394
|
description:"The `$denyallow` modifier allows to avoid creating additional rules\nwhen it is needed to disable a certain rule for specific domains.\n`$denyallow` matches only target domains and not referrer domains.",
|
|
6395
6395
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#denyallow-modifier",
|
|
6396
6396
|
conflicts:[ "to" ],
|
|
@@ -6426,7 +6426,7 @@ var data$M = { adg_os_any:{ name:"denyallow",
|
|
|
6426
6426
|
negatable:false,
|
|
6427
6427
|
value_format:"pipe_separated_denyallow_domains" } };
|
|
6428
6428
|
|
|
6429
|
-
var data$
|
|
6429
|
+
var data$M = { adg_os_any:{ name:"document",
|
|
6430
6430
|
description:"The rule corresponds to the main frame document requests,\ni.e. HTML documents that are loaded in the browser tab.",
|
|
6431
6431
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#document-modifier",
|
|
6432
6432
|
negatable:false },
|
|
@@ -6452,7 +6452,7 @@ var data$L = { adg_os_any:{ name:"document",
|
|
|
6452
6452
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#document",
|
|
6453
6453
|
negatable:false } };
|
|
6454
6454
|
|
|
6455
|
-
var data$
|
|
6455
|
+
var data$L = { adg_any:{ name:"domain",
|
|
6456
6456
|
aliases:[ "from" ],
|
|
6457
6457
|
description:"The `$domain` modifier limits the rule application area to a list of domains and their subdomains.",
|
|
6458
6458
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#domain-modifier",
|
|
@@ -6473,7 +6473,7 @@ var data$K = { adg_any:{ name:"domain",
|
|
|
6473
6473
|
negatable:false,
|
|
6474
6474
|
value_format:"pipe_separated_domains" } };
|
|
6475
6475
|
|
|
6476
|
-
var data$
|
|
6476
|
+
var data$K = { adg_any:{ name:"elemhide",
|
|
6477
6477
|
aliases:[ "ehide" ],
|
|
6478
6478
|
description:"Disables any cosmetic rules on the pages matching the rule.",
|
|
6479
6479
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#elemhide-modifier",
|
|
@@ -6492,7 +6492,7 @@ var data$J = { adg_any:{ name:"elemhide",
|
|
|
6492
6492
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#elemhide-1",
|
|
6493
6493
|
description:"Disables any cosmetic rules on the pages matching the rule." } };
|
|
6494
6494
|
|
|
6495
|
-
var data$
|
|
6495
|
+
var data$J = { adg_os_any:{ name:"empty",
|
|
6496
6496
|
description:"This modifier is deprecated in favor of the $redirect modifier.\nRules with `$empty` are still supported and being converted into `$redirect=nooptext` now\nbut the support shall be removed in the future.",
|
|
6497
6497
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#empty-modifier",
|
|
6498
6498
|
deprecated:true,
|
|
@@ -6509,7 +6509,7 @@ var data$I = { adg_os_any:{ name:"empty",
|
|
|
6509
6509
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#empty",
|
|
6510
6510
|
negatable:false } };
|
|
6511
6511
|
|
|
6512
|
-
var data$
|
|
6512
|
+
var data$I = { adg_any:{ name:"first-party",
|
|
6513
6513
|
aliases:[ "1p",
|
|
6514
6514
|
"~third-party" ],
|
|
6515
6515
|
description:"A restriction of first-party requests. Equal to `~third-party`.",
|
|
@@ -6522,7 +6522,7 @@ var data$H = { adg_any:{ name:"first-party",
|
|
|
6522
6522
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#1p",
|
|
6523
6523
|
negatable:false } };
|
|
6524
6524
|
|
|
6525
|
-
var data$
|
|
6525
|
+
var data$H = { adg_os_any:{ name:"extension",
|
|
6526
6526
|
description:"Disables all userscripts on the pages matching this rule.",
|
|
6527
6527
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#extension-modifier",
|
|
6528
6528
|
conflicts:[ "domain",
|
|
@@ -6538,7 +6538,7 @@ var data$G = { adg_os_any:{ name:"extension",
|
|
|
6538
6538
|
inverse_conflicts:true,
|
|
6539
6539
|
exception_only:true } };
|
|
6540
6540
|
|
|
6541
|
-
var data$
|
|
6541
|
+
var data$G = { adg_any:{ name:"font",
|
|
6542
6542
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#font-modifier",
|
|
6543
6543
|
description:"The rule corresponds to requests for fonts, e.g. `.woff` filename extension." },
|
|
6544
6544
|
abp_any:{ name:"font",
|
|
@@ -6548,7 +6548,7 @@ var data$F = { adg_any:{ name:"font",
|
|
|
6548
6548
|
docs:"https://help.adblockplus.org/hc/en-us/articles/360062733293#options",
|
|
6549
6549
|
description:"The rule corresponds to requests for fonts, e.g. `.woff` filename extension." } };
|
|
6550
6550
|
|
|
6551
|
-
var data$
|
|
6551
|
+
var data$F = { adg_os_any:{ name:"genericblock",
|
|
6552
6552
|
description:"Disables generic basic rules on pages that correspond to exception rule.",
|
|
6553
6553
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#genericblock-modifier",
|
|
6554
6554
|
conflicts:[ "domain",
|
|
@@ -6604,7 +6604,7 @@ var data$E = { adg_os_any:{ name:"genericblock",
|
|
|
6604
6604
|
negatable:false,
|
|
6605
6605
|
exception_only:true } };
|
|
6606
6606
|
|
|
6607
|
-
var data$
|
|
6607
|
+
var data$E = { adg_any:{ name:"generichide",
|
|
6608
6608
|
aliases:[ "ghide" ],
|
|
6609
6609
|
description:"Disables all generic cosmetic rules.",
|
|
6610
6610
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#generichide-modifier",
|
|
@@ -6636,7 +6636,7 @@ var data$D = { adg_any:{ name:"generichide",
|
|
|
6636
6636
|
negatable:false,
|
|
6637
6637
|
exception_only:true } };
|
|
6638
6638
|
|
|
6639
|
-
var data$
|
|
6639
|
+
var data$D = { adg_os_any:{ name:"header",
|
|
6640
6640
|
description:"The `$header` modifier allows matching the HTTP response\nhaving a specific header with (optionally) a specific value.",
|
|
6641
6641
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#header-modifier",
|
|
6642
6642
|
assignable:true,
|
|
@@ -6652,7 +6652,7 @@ var data$C = { adg_os_any:{ name:"header",
|
|
|
6652
6652
|
assignable:true,
|
|
6653
6653
|
value_format:"(?xi)\n ^\n # header name\n [\\w-]+\n (\n :\n # header value: string or regexp\n (\\w+|\\/.+\\/)\n )?" } };
|
|
6654
6654
|
|
|
6655
|
-
var data$
|
|
6655
|
+
var data$C = { adg_os_any:{ name:"hls",
|
|
6656
6656
|
description:"The `$hls` rules modify the response of a matching request.\nThey are intended as a convenient way to remove segments from HLS playlists (RFC 8216).",
|
|
6657
6657
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#hls-modifier",
|
|
6658
6658
|
version_added:"CoreLibs 1.10",
|
|
@@ -6668,7 +6668,7 @@ var data$B = { adg_os_any:{ name:"hls",
|
|
|
6668
6668
|
value_optional:true,
|
|
6669
6669
|
value_format:"(?xi)\n (\n # string pattern\n \\w+\n # or regexp pattern\n |\n # TODO: improve regexp pattern to invalidate unescaped `/`, `$`, and `,`\n \\/.+\\/\n # options\n ([ti]*)?\n )" } };
|
|
6670
6670
|
|
|
6671
|
-
var data$
|
|
6671
|
+
var data$B = { adg_any:{ name:"image",
|
|
6672
6672
|
description:"The rule corresponds to images requests.",
|
|
6673
6673
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#image-modifier" },
|
|
6674
6674
|
abp_any:{ name:"image",
|
|
@@ -6678,7 +6678,7 @@ var data$A = { adg_any:{ name:"image",
|
|
|
6678
6678
|
description:"The rule corresponds to images requests.",
|
|
6679
6679
|
docs:"https://help.adblockplus.org/hc/en-us/articles/360062733293#options" } };
|
|
6680
6680
|
|
|
6681
|
-
var data$
|
|
6681
|
+
var data$A = { adg_any:{ name:"important",
|
|
6682
6682
|
description:"The `$important` modifier applied to a rule increases its priority\nover any other rule without `$important` modifier. Even over basic exception rules.",
|
|
6683
6683
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#important-modifier",
|
|
6684
6684
|
negatable:false },
|
|
@@ -6687,7 +6687,7 @@ var data$z = { adg_any:{ name:"important",
|
|
|
6687
6687
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#important",
|
|
6688
6688
|
negatable:false } };
|
|
6689
6689
|
|
|
6690
|
-
var data$
|
|
6690
|
+
var data$z = { adg_os_any:{ name:"inline-font",
|
|
6691
6691
|
description:"The `$inline-font` modifier is a sort of a shortcut for $csp modifier with specific value.\nE.g. `||example.org^$inline-font` is converting into:\n```adblock\n||example.org^$csp=font-src 'self' 'unsafe-eval' http: https: data: blob: mediastream: filesystem:\n```",
|
|
6692
6692
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#inline-font-modifier" },
|
|
6693
6693
|
adg_ext_any:{ name:"inline-font",
|
|
@@ -6697,7 +6697,7 @@ var data$y = { adg_os_any:{ name:"inline-font",
|
|
|
6697
6697
|
description:"The `$inline-font` modifier is a sort of a shortcut for $csp modifier with specific value.\nE.g. `||example.org^$inline-font` is converting into:\n```adblock\n||example.org^$csp=font-src 'self' 'unsafe-eval' http: https: data: blob: mediastream: filesystem:\n```",
|
|
6698
6698
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#inline-font" } };
|
|
6699
6699
|
|
|
6700
|
-
var data$
|
|
6700
|
+
var data$y = { adg_os_any:{ name:"inline-script",
|
|
6701
6701
|
description:"The `$inline-script` modifier is a sort of a shortcut for $csp modifier with specific value.\nE.g. `||example.org^$inline-script` is converting into:\n```adblock\n||example.org^$csp=script-src 'self' 'unsafe-eval' http: https: data: blob: mediastream: filesystem:\n```",
|
|
6702
6702
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#inline-script-modifier" },
|
|
6703
6703
|
adg_ext_any:{ name:"inline-script",
|
|
@@ -6707,7 +6707,7 @@ var data$x = { adg_os_any:{ name:"inline-script",
|
|
|
6707
6707
|
description:"The `$inline-script` modifier is a sort of a shortcut for $csp modifier with specific value.\nE.g. `||example.org^$inline-script` is converting into:\n```adblock\n||example.org^$csp=script-src 'self' 'unsafe-eval' http: https: data: blob: mediastream: filesystem:\n```",
|
|
6708
6708
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#inline-script" } };
|
|
6709
6709
|
|
|
6710
|
-
var data$
|
|
6710
|
+
var data$x = { adg_os_any:{ name:"jsinject",
|
|
6711
6711
|
description:"Forbids adding of javascript code to the page.",
|
|
6712
6712
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#jsinject-modifier",
|
|
6713
6713
|
conflicts:[ "domain",
|
|
@@ -6766,7 +6766,7 @@ var data$w = { adg_os_any:{ name:"jsinject",
|
|
|
6766
6766
|
negatable:false,
|
|
6767
6767
|
exception_only:true } };
|
|
6768
6768
|
|
|
6769
|
-
var data$
|
|
6769
|
+
var data$w = { adg_os_any:{ name:"jsonprune",
|
|
6770
6770
|
description:"The `$jsonprune` rules modify the response to a matching request\nby removing JSON items that match a modified JSONPath expression.\nThey do not modify responses which are not valid JSON documents.",
|
|
6771
6771
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#jsonprune-modifier",
|
|
6772
6772
|
assignable:true,
|
|
@@ -6774,7 +6774,7 @@ var data$v = { adg_os_any:{ name:"jsonprune",
|
|
|
6774
6774
|
value_optional:true,
|
|
6775
6775
|
value_format:"(?xi)\n ^\n # the expression always starts with a dollar sign (for root)\n # which should be escaped\n \\\\\n \\$\n \\.?\n # TODO: improve the expression to invalidate unescaped `$` and `,`\n .+\n $" } };
|
|
6776
6776
|
|
|
6777
|
-
var data$
|
|
6777
|
+
var data$v = { adg_any:{ name:"match-case",
|
|
6778
6778
|
description:"This modifier defines a rule which applies only to addresses that match the case.\nDefault rules are case-insensitive.",
|
|
6779
6779
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#match-case-modifier" },
|
|
6780
6780
|
abp_any:{ name:"match-case",
|
|
@@ -6784,7 +6784,7 @@ var data$u = { adg_any:{ name:"match-case",
|
|
|
6784
6784
|
description:"This modifier defines a rule which applies only to addresses that match the case.\nDefault rules are case-insensitive.",
|
|
6785
6785
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#match-case" } };
|
|
6786
6786
|
|
|
6787
|
-
var data$
|
|
6787
|
+
var data$u = { adg_any:{ name:"media",
|
|
6788
6788
|
description:"A restriction of third-party and own requests.\nA third-party request is a request from a different domain.\nFor example, a request to `example.org` from `domain.com` is a third-party request.",
|
|
6789
6789
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#media-modifier" },
|
|
6790
6790
|
abp_any:{ name:"media",
|
|
@@ -6794,7 +6794,7 @@ var data$t = { adg_any:{ name:"media",
|
|
|
6794
6794
|
description:"A restriction of third-party and own requests.\nA third-party request is a request from a different domain.\nFor example, a request to `example.org` from `domain.com` is a third-party request.",
|
|
6795
6795
|
docs:"https://help.adblockplus.org/hc/en-us/articles/360062733293#options" } };
|
|
6796
6796
|
|
|
6797
|
-
var data$
|
|
6797
|
+
var data$t = { adg_os_any:{ name:"method",
|
|
6798
6798
|
description:"This modifier limits the rule scope to requests that use the specified set of HTTP methods.\nNegated methods are allowed.",
|
|
6799
6799
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#method-modifier",
|
|
6800
6800
|
negatable:false,
|
|
@@ -6813,7 +6813,7 @@ var data$s = { adg_os_any:{ name:"method",
|
|
|
6813
6813
|
assignable:true,
|
|
6814
6814
|
value_format:"pipe_separated_methods" } };
|
|
6815
6815
|
|
|
6816
|
-
var data$
|
|
6816
|
+
var data$s = { adg_os_any:{ name:"mp4",
|
|
6817
6817
|
description:"As a response to blocked request AdGuard returns a short video placeholder.\nRules with `$mp4` are still supported and being converted into `$redirect=noopmp4-1s` now\nbut the support shall be removed in the future.",
|
|
6818
6818
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#mp4-modifier",
|
|
6819
6819
|
deprecated:true,
|
|
@@ -6830,7 +6830,7 @@ var data$r = { adg_os_any:{ name:"mp4",
|
|
|
6830
6830
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#mp4",
|
|
6831
6831
|
negatable:false } };
|
|
6832
6832
|
|
|
6833
|
-
var data$
|
|
6833
|
+
var data$r = { adg_os_any:{ name:"network",
|
|
6834
6834
|
description:"This is basically a Firewall-kind of rules allowing to fully block\nor unblock access to a specified remote address.",
|
|
6835
6835
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#network-modifier",
|
|
6836
6836
|
conflicts:[ "app",
|
|
@@ -6838,7 +6838,7 @@ var data$q = { adg_os_any:{ name:"network",
|
|
|
6838
6838
|
inverse_conflicts:true,
|
|
6839
6839
|
negatable:false } };
|
|
6840
6840
|
|
|
6841
|
-
var data$
|
|
6841
|
+
var data$q = { adg_os_any:{ name:"_",
|
|
6842
6842
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#noop-modifier",
|
|
6843
6843
|
description:"The noop modifier does nothing and can be used solely to increase rules' readability.\nIt consists of a sequence of underscore characters (_) of any length\nand can appear in a rule as many times as needed.",
|
|
6844
6844
|
negatable:false },
|
|
@@ -6859,13 +6859,13 @@ var data$p = { adg_os_any:{ name:"_",
|
|
|
6859
6859
|
description:"The noop modifier does nothing and can be used solely to increase rules' readability.\nIt consists of a sequence of underscore characters (_) of any length\nand can appear in a rule as many times as needed.",
|
|
6860
6860
|
negatable:false } };
|
|
6861
6861
|
|
|
6862
|
-
var data$
|
|
6862
|
+
var data$p = { adg_any:{ name:"object-subrequest",
|
|
6863
6863
|
description:"The `$object-subrequest` modifier is removed and is no longer supported.\nRules with it are considered as invalid.\nThe rule corresponds to requests by browser plugins (it is usually Flash).",
|
|
6864
6864
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#object-subrequest-modifier",
|
|
6865
6865
|
removed:true,
|
|
6866
6866
|
removal_message:"The `$object-subrequest` modifier is removed and is no longer supported.\nRules with it are considered as invalid." } };
|
|
6867
6867
|
|
|
6868
|
-
var data$
|
|
6868
|
+
var data$o = { adg_any:{ name:"object",
|
|
6869
6869
|
description:"The rule corresponds to browser plugins resources, e.g. Java or Flash",
|
|
6870
6870
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#object-modifier" },
|
|
6871
6871
|
abp_any:{ name:"object",
|
|
@@ -6875,7 +6875,7 @@ var data$n = { adg_any:{ name:"object",
|
|
|
6875
6875
|
description:"The rule corresponds to browser plugins resources, e.g. Java or Flash.",
|
|
6876
6876
|
docs:"https://help.adblockplus.org/hc/en-us/articles/360062733293-How-to-write-filters#type-options" } };
|
|
6877
6877
|
|
|
6878
|
-
var data$
|
|
6878
|
+
var data$n = { adg_any:{ name:"other",
|
|
6879
6879
|
description:"The rule applies to requests for which the type has not been determined\nor does not match the types listed above.",
|
|
6880
6880
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#other-modifier" },
|
|
6881
6881
|
abp_any:{ name:"other",
|
|
@@ -6885,7 +6885,7 @@ var data$m = { adg_any:{ name:"other",
|
|
|
6885
6885
|
description:"The rule applies to requests for which the type has not been determined\nor does not match the types listed above.",
|
|
6886
6886
|
docs:"https://help.adblockplus.org/hc/en-us/articles/360062733293-How-to-write-filters#type-options" } };
|
|
6887
6887
|
|
|
6888
|
-
var data$
|
|
6888
|
+
var data$m = { adg_os_any:{ name:"permissions",
|
|
6889
6889
|
description:"For the requests matching a `$permissions` rule, ad blocker strengthens response's feature policy\nby adding additional feature policy equal to the `$permissions` modifier contents.\n`$permissions` rules are applied independently from any other rule type.",
|
|
6890
6890
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#permissions-modifier",
|
|
6891
6891
|
version_added:"CoreLibs 1.11",
|
|
@@ -6898,7 +6898,7 @@ var data$l = { adg_os_any:{ name:"permissions",
|
|
|
6898
6898
|
value_optional:true,
|
|
6899
6899
|
value_format:"permissions_value" } };
|
|
6900
6900
|
|
|
6901
|
-
var data$
|
|
6901
|
+
var data$l = { adg_any:{ name:"ping",
|
|
6902
6902
|
description:"The rule corresponds to requests caused by either navigator.sendBeacon() or the ping attribute on links.",
|
|
6903
6903
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#ping-modifier" },
|
|
6904
6904
|
abp_any:{ name:"ping",
|
|
@@ -6908,13 +6908,13 @@ var data$k = { adg_any:{ name:"ping",
|
|
|
6908
6908
|
description:"The rule corresponds to requests caused by either navigator.sendBeacon() or the ping attribute on links.",
|
|
6909
6909
|
docs:"https://help.adblockplus.org/hc/en-us/articles/360062733293-How-to-write-filters#type-options" } };
|
|
6910
6910
|
|
|
6911
|
-
var data$
|
|
6911
|
+
var data$k = { ubo_ext_any:{ name:"popunder",
|
|
6912
6912
|
description:"To block \"popunders\" windows/tabs where the original page redirects to an advertisement\nand the desired content loads in the newly created one.\nTo be used in the same manner as the popup filter option, except that it will block popunders.",
|
|
6913
6913
|
docs:"https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#popunder",
|
|
6914
6914
|
negatable:false,
|
|
6915
6915
|
block_only:true } };
|
|
6916
6916
|
|
|
6917
|
-
var data$
|
|
6917
|
+
var data$j = { adg_any:{ name:"popup",
|
|
6918
6918
|
description:"Pages opened in a new tab or window.\nNote: Filters will not block pop-ups by default, only if the `$popup` type option is specified.",
|
|
6919
6919
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#popup-modifier",
|
|
6920
6920
|
negatable:false },
|
|
@@ -6927,7 +6927,7 @@ var data$i = { adg_any:{ name:"popup",
|
|
|
6927
6927
|
docs:"https://help.adblockplus.org/hc/en-us/articles/360062733293-How-to-write-filters#type-options",
|
|
6928
6928
|
negatable:false } };
|
|
6929
6929
|
|
|
6930
|
-
var data$
|
|
6930
|
+
var data$i = { adg_os_any:{ name:"redirect-rule",
|
|
6931
6931
|
description:"This is basically an alias to `$redirect`\nsince it has the same \"redirection\" values and the logic is almost similar.\nThe difference is that `$redirect-rule` is applied only in the case\nwhen the target request is blocked by a different basic rule.",
|
|
6932
6932
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#redirect-rule-modifier",
|
|
6933
6933
|
conflicts:[ "domain",
|
|
@@ -7018,7 +7018,7 @@ var data$h = { adg_os_any:{ name:"redirect-rule",
|
|
|
7018
7018
|
negatable:false,
|
|
7019
7019
|
value_format:"(?x)\n ^(\n 1x1\\.gif|\n 2x2\\.png|\n 3x2\\.png|\n 32x32\\.png|\n noop\\.css|\n noop\\.html|\n noopframe|\n noop\\.js|\n noop\\.txt|\n noop-0\\.1s\\.mp3|\n noop-0\\.5s\\.mp3|\n noop-1s\\.mp4|\n none|\n click2load\\.html|\n addthis_widget\\.js|\n amazon_ads\\.js|\n amazon_apstag\\.js|\n monkeybroker\\.js|\n doubleclick_instream_ad_status|\n google-analytics_ga\\.js|\n google-analytics_analytics\\.js|\n google-analytics_inpage_linkid\\.js|\n google-analytics_cx_api\\.js|\n google-ima\\.js|\n googletagservices_gpt\\.js|\n googletagmanager_gtm\\.js|\n googlesyndication_adsbygoogle\\.js|\n scorecardresearch_beacon\\.js|\n outbrain-widget\\.js|\n hd-main\\.js\n )\n (:[0-9]+)?$" } };
|
|
7020
7020
|
|
|
7021
|
-
var data$
|
|
7021
|
+
var data$h = { adg_os_any:{ name:"redirect",
|
|
7022
7022
|
description:"Used to redirect web requests to a local \"resource\".",
|
|
7023
7023
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#redirect-modifier",
|
|
7024
7024
|
assignable:true,
|
|
@@ -7046,6 +7046,17 @@ var data$g = { adg_os_any:{ name:"redirect",
|
|
|
7046
7046
|
negatable:false,
|
|
7047
7047
|
value_format:"(?x)\n # ABP resources always starts with the `abp-resource:` prefix\n ^abp-resource:\n # Possible resource names\n (\n blank-text|\n blank-css|\n blank-js|\n blank-html|\n blank-mp3|\n 1x1-transparent-gif|\n 2x2-transparent-png|\n 3x2-transparent-png|\n 32x32-transparent-png\n )$" } };
|
|
7048
7048
|
|
|
7049
|
+
var data$g = { adg_os_any:{ name:"referrerpolicy",
|
|
7050
|
+
description:"This modifier allows overriding of a page's referrer policy.",
|
|
7051
|
+
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#referrerpolicy-modifier",
|
|
7052
|
+
conflicts:[ "document",
|
|
7053
|
+
"subdocument" ],
|
|
7054
|
+
inverse_conflicts:true,
|
|
7055
|
+
assignable:true,
|
|
7056
|
+
negatable:false,
|
|
7057
|
+
value_optional:true,
|
|
7058
|
+
value_format:"referrerpolicy_value" } };
|
|
7059
|
+
|
|
7049
7060
|
var data$f = { adg_os_any:{ name:"removeheader",
|
|
7050
7061
|
description:"Rules with the `$removeheader` modifier are intended to remove headers from HTTP requests and responses.",
|
|
7051
7062
|
docs:"https://adguard.app/kb/general/ad-filtering/create-own-filters/#removeheader-modifier",
|
|
@@ -7355,46 +7366,47 @@ var data = { adg_any:{ name:"xmlhttprequest",
|
|
|
7355
7366
|
// @ts-nocheck
|
|
7356
7367
|
// Please keep imports and exports in alphabetical order
|
|
7357
7368
|
const rawModifiersData = {
|
|
7358
|
-
all: data$
|
|
7359
|
-
app: data$
|
|
7360
|
-
badfilter: data$
|
|
7361
|
-
cname: data$
|
|
7362
|
-
content: data$
|
|
7363
|
-
cookie: data$
|
|
7364
|
-
csp: data$
|
|
7365
|
-
denyallow: data$
|
|
7366
|
-
document: data$
|
|
7367
|
-
domain: data$
|
|
7368
|
-
elemhide: data$
|
|
7369
|
-
empty: data$
|
|
7370
|
-
firstParty: data$
|
|
7371
|
-
extension: data$
|
|
7372
|
-
font: data$
|
|
7373
|
-
genericblock: data$
|
|
7374
|
-
generichide: data$
|
|
7375
|
-
header: data$
|
|
7376
|
-
hls: data$
|
|
7377
|
-
image: data$
|
|
7378
|
-
important: data$
|
|
7379
|
-
inlineFont: data$
|
|
7380
|
-
inlineScript: data$
|
|
7381
|
-
jsinject: data$
|
|
7382
|
-
jsonprune: data$
|
|
7383
|
-
matchCase: data$
|
|
7384
|
-
media: data$
|
|
7385
|
-
method: data$
|
|
7386
|
-
mp4: data$
|
|
7387
|
-
network: data$
|
|
7388
|
-
noop: data$
|
|
7389
|
-
objectSubrequest: data$
|
|
7390
|
-
object: data$
|
|
7391
|
-
other: data$
|
|
7392
|
-
permissions: data$
|
|
7393
|
-
ping: data$
|
|
7394
|
-
popunder: data$
|
|
7395
|
-
popup: data$
|
|
7396
|
-
redirectRule: data$
|
|
7397
|
-
redirect: data$
|
|
7369
|
+
all: data$U,
|
|
7370
|
+
app: data$T,
|
|
7371
|
+
badfilter: data$S,
|
|
7372
|
+
cname: data$R,
|
|
7373
|
+
content: data$Q,
|
|
7374
|
+
cookie: data$P,
|
|
7375
|
+
csp: data$O,
|
|
7376
|
+
denyallow: data$N,
|
|
7377
|
+
document: data$M,
|
|
7378
|
+
domain: data$L,
|
|
7379
|
+
elemhide: data$K,
|
|
7380
|
+
empty: data$J,
|
|
7381
|
+
firstParty: data$I,
|
|
7382
|
+
extension: data$H,
|
|
7383
|
+
font: data$G,
|
|
7384
|
+
genericblock: data$F,
|
|
7385
|
+
generichide: data$E,
|
|
7386
|
+
header: data$D,
|
|
7387
|
+
hls: data$C,
|
|
7388
|
+
image: data$B,
|
|
7389
|
+
important: data$A,
|
|
7390
|
+
inlineFont: data$z,
|
|
7391
|
+
inlineScript: data$y,
|
|
7392
|
+
jsinject: data$x,
|
|
7393
|
+
jsonprune: data$w,
|
|
7394
|
+
matchCase: data$v,
|
|
7395
|
+
media: data$u,
|
|
7396
|
+
method: data$t,
|
|
7397
|
+
mp4: data$s,
|
|
7398
|
+
network: data$r,
|
|
7399
|
+
noop: data$q,
|
|
7400
|
+
objectSubrequest: data$p,
|
|
7401
|
+
object: data$o,
|
|
7402
|
+
other: data$n,
|
|
7403
|
+
permissions: data$m,
|
|
7404
|
+
ping: data$l,
|
|
7405
|
+
popunder: data$k,
|
|
7406
|
+
popup: data$j,
|
|
7407
|
+
redirectRule: data$i,
|
|
7408
|
+
redirect: data$h,
|
|
7409
|
+
referrerpolicy: data$g,
|
|
7398
7410
|
removeheader: data$f,
|
|
7399
7411
|
removeparam: data$e,
|
|
7400
7412
|
replace: data$d,
|
|
@@ -7587,7 +7599,7 @@ const ALLOWED_CSP_DIRECTIVES = new Set([
|
|
|
7587
7599
|
'worker-src',
|
|
7588
7600
|
]);
|
|
7589
7601
|
/**
|
|
7590
|
-
* Allowed
|
|
7602
|
+
* Allowed directives for $permissions modifier.
|
|
7591
7603
|
*
|
|
7592
7604
|
* @see {@link https://adguard.app/kb/general/ad-filtering/create-own-filters/#permissions-modifier}
|
|
7593
7605
|
*/
|
|
@@ -7637,6 +7649,21 @@ const PERMISSIONS_TOKEN_SELF = 'self';
|
|
|
7637
7649
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy#allowlists}
|
|
7638
7650
|
*/
|
|
7639
7651
|
const EMPTY_PERMISSIONS_ALLOWLIST = `${OPEN_PARENTHESIS}${CLOSE_PARENTHESIS}`;
|
|
7652
|
+
/**
|
|
7653
|
+
* Allowed directives for $referrerpolicy modifier.
|
|
7654
|
+
*
|
|
7655
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy}
|
|
7656
|
+
*/
|
|
7657
|
+
const REFERRER_POLICY_DIRECTIVES = new Set([
|
|
7658
|
+
'no-referrer',
|
|
7659
|
+
'no-referrer-when-downgrade',
|
|
7660
|
+
'origin',
|
|
7661
|
+
'origin-when-cross-origin',
|
|
7662
|
+
'same-origin',
|
|
7663
|
+
'strict-origin',
|
|
7664
|
+
'strict-origin-when-cross-origin',
|
|
7665
|
+
'unsafe-url',
|
|
7666
|
+
]);
|
|
7640
7667
|
/**
|
|
7641
7668
|
* Prefixes for error messages used in modifier validation.
|
|
7642
7669
|
*/
|
|
@@ -7649,6 +7676,7 @@ const VALIDATION_ERROR_PREFIX = {
|
|
|
7649
7676
|
INVALID_PERMISSION_DIRECTIVE: 'Invalid Permissions-Policy directive for the modifier',
|
|
7650
7677
|
INVALID_PERMISSION_ORIGINS: 'Origins in the value is invalid for the modifier and the directive',
|
|
7651
7678
|
INVALID_PERMISSION_ORIGIN_QUOTES: 'Double quotes should be used for origins in the value of the modifier',
|
|
7679
|
+
INVALID_REFERRER_POLICY_DIRECTIVE: 'Invalid Referrer-Policy directive for the modifier',
|
|
7652
7680
|
MIXED_NEGATIONS: 'Simultaneous usage of negated and not negated values is forbidden for the modifier',
|
|
7653
7681
|
NO_CSP_VALUE: 'No CSP value for the modifier and the directive',
|
|
7654
7682
|
NO_CSP_DIRECTIVE_QUOTE: 'CSP directives should no be quoted for the modifier',
|
|
@@ -7972,6 +8000,7 @@ var CustomValueFormatValidatorName;
|
|
|
7972
8000
|
CustomValueFormatValidatorName["Domain"] = "pipe_separated_domains";
|
|
7973
8001
|
CustomValueFormatValidatorName["Method"] = "pipe_separated_methods";
|
|
7974
8002
|
CustomValueFormatValidatorName["Permissions"] = "permissions_value";
|
|
8003
|
+
CustomValueFormatValidatorName["ReferrerPolicy"] = "referrerpolicy_value";
|
|
7975
8004
|
CustomValueFormatValidatorName["StealthOption"] = "pipe_separated_stealth_options";
|
|
7976
8005
|
})(CustomValueFormatValidatorName || (CustomValueFormatValidatorName = {}));
|
|
7977
8006
|
/**
|
|
@@ -8428,6 +8457,26 @@ const validatePermissions = (modifier) => {
|
|
|
8428
8457
|
}
|
|
8429
8458
|
return { valid: true };
|
|
8430
8459
|
};
|
|
8460
|
+
/**
|
|
8461
|
+
* Validates `referrerpolicy_value` custom value format.
|
|
8462
|
+
* Used for $referrerpolicy modifier.
|
|
8463
|
+
*
|
|
8464
|
+
* @param modifier Modifier AST node.
|
|
8465
|
+
*
|
|
8466
|
+
* @returns Validation result.
|
|
8467
|
+
*/
|
|
8468
|
+
const validateReferrerPolicy = (modifier) => {
|
|
8469
|
+
if (!modifier.value?.value) {
|
|
8470
|
+
return getValueRequiredValidationResult(modifier.modifier.value);
|
|
8471
|
+
}
|
|
8472
|
+
const modifierName = modifier.modifier.value;
|
|
8473
|
+
const modifierValue = modifier.value.value;
|
|
8474
|
+
if (!REFERRER_POLICY_DIRECTIVES.has(modifierValue)) {
|
|
8475
|
+
// eslint-disable-next-line max-len
|
|
8476
|
+
return getInvalidValidationResult(`${VALIDATION_ERROR_PREFIX.INVALID_REFERRER_POLICY_DIRECTIVE}: '${modifierName}': '${modifierValue}'`);
|
|
8477
|
+
}
|
|
8478
|
+
return { valid: true };
|
|
8479
|
+
};
|
|
8431
8480
|
/**
|
|
8432
8481
|
* Map of all available pre-defined validators for modifiers with custom `value_format`.
|
|
8433
8482
|
*/
|
|
@@ -8438,6 +8487,7 @@ const CUSTOM_VALUE_FORMAT_MAP = {
|
|
|
8438
8487
|
[CustomValueFormatValidatorName.Domain]: validatePipeSeparatedDomains,
|
|
8439
8488
|
[CustomValueFormatValidatorName.Method]: validatePipeSeparatedMethods,
|
|
8440
8489
|
[CustomValueFormatValidatorName.Permissions]: validatePermissions,
|
|
8490
|
+
[CustomValueFormatValidatorName.ReferrerPolicy]: validateReferrerPolicy,
|
|
8441
8491
|
[CustomValueFormatValidatorName.StealthOption]: validatePipeSeparatedStealthOptions,
|
|
8442
8492
|
};
|
|
8443
8493
|
/**
|
|
@@ -10516,7 +10566,7 @@ class LogicalExpressionUtils {
|
|
|
10516
10566
|
}
|
|
10517
10567
|
}
|
|
10518
10568
|
|
|
10519
|
-
const version$1 = "1.1.
|
|
10569
|
+
const version$1 = "1.1.7";
|
|
10520
10570
|
|
|
10521
10571
|
/**
|
|
10522
10572
|
* @file AGTree version
|