@duckduckgo/autoconsent 9.7.1 → 10.0.0

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.
@@ -3554,15 +3554,27 @@
3554
3554
  ],
3555
3555
  optOut: [
3556
3556
  {
3557
- click: "#manage_cookie_preferences"
3558
- },
3559
- {
3560
- click: "#cookie_consent_preferences input:checked",
3561
- all: true,
3562
- optional: true
3563
- },
3564
- {
3565
- click: "#consent_save"
3557
+ if: {
3558
+ exists: "#consent_reject"
3559
+ },
3560
+ then: [
3561
+ {
3562
+ click: "#consent_reject"
3563
+ }
3564
+ ],
3565
+ else: [
3566
+ {
3567
+ click: "#manage_cookie_preferences"
3568
+ },
3569
+ {
3570
+ click: "#cookie_consent_preferences input:checked",
3571
+ all: true,
3572
+ optional: true
3573
+ },
3574
+ {
3575
+ click: "#consent_save"
3576
+ }
3577
+ ]
3566
3578
  }
3567
3579
  ],
3568
3580
  test: [
@@ -4616,7 +4628,7 @@
4616
4628
  name: "dndbeyond",
4617
4629
  vendorUrl: "https://www.dndbeyond.com/",
4618
4630
  runContext: {
4619
- urlPattern: "^https://www\\.dndbeyond\\.com/"
4631
+ urlPattern: "^https://(www\\.)?dndbeyond\\.com/"
4620
4632
  },
4621
4633
  prehideSelectors: [
4622
4634
  "[id^=cookie-consent-banner]"
@@ -5660,7 +5672,7 @@
5660
5672
  name: "jdsports",
5661
5673
  vendorUrl: "https://www.jdsports.co.uk/",
5662
5674
  runContext: {
5663
- urlPattern: "^https://www\\.jdsports\\."
5675
+ urlPattern: "^https://(www|m)\\.jdsports\\."
5664
5676
  },
5665
5677
  prehideSelectors: [
5666
5678
  ".miniConsent,#PrivacyPolicyBanner"
@@ -6061,7 +6073,7 @@
6061
6073
  name: "livejasmin",
6062
6074
  vendorUrl: "https://www.livejasmin.com/",
6063
6075
  runContext: {
6064
- urlPattern: "^https://www\\.livejasmin\\.com/"
6076
+ urlPattern: "^https://(m|www)\\.livejasmin\\.com/"
6065
6077
  },
6066
6078
  prehideSelectors: [
6067
6079
  "#consent_modal"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "9.7.1",
3
+ "version": "10.0.0",
4
4
  "description": "",
5
5
  "main": "dist/autoconsent.cjs.js",
6
6
  "module": "dist/autoconsent.esm.js",
@@ -32,12 +32,12 @@
32
32
  "license": "MPL-2.0",
33
33
  "devDependencies": {
34
34
  "@playwright/test": "^1.17.1",
35
- "@puppeteer/replay": "^2.11.0",
35
+ "@puppeteer/replay": "^3.0.0",
36
36
  "@types/chai": "^4.3.1",
37
- "@types/chrome": "^0.0.259",
37
+ "@types/chrome": "^0.0.261",
38
38
  "@types/mocha": "^10.0.1",
39
- "@typescript-eslint/eslint-plugin": "^6.12.0",
40
- "@typescript-eslint/parser": "^6.12.0",
39
+ "@typescript-eslint/eslint-plugin": "^7.0.1",
40
+ "@typescript-eslint/parser": "^7.0.1",
41
41
  "auto": "^11.0.1",
42
42
  "bulma": "^0.9.4",
43
43
  "chai": "^5.0.0",
@@ -5,7 +5,7 @@ import { waitFor } from "../lib/utils";
5
5
  import { ContentScriptMessage } from "../lib/messages";
6
6
  import { AutoAction } from "../lib/types";
7
7
 
8
- const LOG_MESSAGES: ContentScriptMessage['type'][] = [
8
+ const LOG_MESSAGES: ContentScriptMessage['type'][] = process.env.CI ? [] : [
9
9
  'optInResult',
10
10
  'optOutResult',
11
11
  'autoconsentDone',
@@ -25,15 +25,27 @@
25
25
  ],
26
26
  "optOut": [
27
27
  {
28
- "click": "#manage_cookie_preferences"
29
- },
30
- {
31
- "click": "#cookie_consent_preferences input:checked",
32
- "all": true,
33
- "optional": true
34
- },
35
- {
36
- "click": "#consent_save"
28
+ "if": {
29
+ "exists": "#consent_reject"
30
+ },
31
+ "then": [
32
+ {
33
+ "click": "#consent_reject"
34
+ }
35
+ ],
36
+ "else": [
37
+ {
38
+ "click": "#manage_cookie_preferences"
39
+ },
40
+ {
41
+ "click": "#cookie_consent_preferences input:checked",
42
+ "all": true,
43
+ "optional": true
44
+ },
45
+ {
46
+ "click": "#consent_save"
47
+ }
48
+ ]
37
49
  }
38
50
  ],
39
51
  "test": [
@@ -2,7 +2,7 @@
2
2
  "name": "dndbeyond",
3
3
  "vendorUrl": "https://www.dndbeyond.com/",
4
4
  "runContext": {
5
- "urlPattern": "^https://www\\.dndbeyond\\.com/"
5
+ "urlPattern": "^https://(www\\.)?dndbeyond\\.com/"
6
6
  },
7
7
  "prehideSelectors": ["[id^=cookie-consent-banner]"],
8
8
  "detectCmp": [
@@ -2,7 +2,7 @@
2
2
  "name": "jdsports",
3
3
  "vendorUrl": "https://www.jdsports.co.uk/",
4
4
  "runContext": {
5
- "urlPattern": "^https://www\\.jdsports\\."
5
+ "urlPattern": "^https://(www|m)\\.jdsports\\."
6
6
  },
7
7
  "prehideSelectors": [".miniConsent,#PrivacyPolicyBanner"],
8
8
  "detectCmp": [
@@ -2,7 +2,7 @@
2
2
  "name": "livejasmin",
3
3
  "vendorUrl": "https://www.livejasmin.com/",
4
4
  "runContext": {
5
- "urlPattern": "^https://www\\.livejasmin\\.com/"
5
+ "urlPattern": "^https://(m|www)\\.livejasmin\\.com/"
6
6
  },
7
7
  "prehideSelectors": ["#consent_modal"],
8
8
  "detectCmp": [
package/rules/rules.json CHANGED
@@ -1253,15 +1253,27 @@
1253
1253
  ],
1254
1254
  "optOut": [
1255
1255
  {
1256
- "click": "#manage_cookie_preferences"
1257
- },
1258
- {
1259
- "click": "#cookie_consent_preferences input:checked",
1260
- "all": true,
1261
- "optional": true
1262
- },
1263
- {
1264
- "click": "#consent_save"
1256
+ "if": {
1257
+ "exists": "#consent_reject"
1258
+ },
1259
+ "then": [
1260
+ {
1261
+ "click": "#consent_reject"
1262
+ }
1263
+ ],
1264
+ "else": [
1265
+ {
1266
+ "click": "#manage_cookie_preferences"
1267
+ },
1268
+ {
1269
+ "click": "#cookie_consent_preferences input:checked",
1270
+ "all": true,
1271
+ "optional": true
1272
+ },
1273
+ {
1274
+ "click": "#consent_save"
1275
+ }
1276
+ ]
1265
1277
  }
1266
1278
  ],
1267
1279
  "test": [
@@ -2315,7 +2327,7 @@
2315
2327
  "name": "dndbeyond",
2316
2328
  "vendorUrl": "https://www.dndbeyond.com/",
2317
2329
  "runContext": {
2318
- "urlPattern": "^https://www\\.dndbeyond\\.com/"
2330
+ "urlPattern": "^https://(www\\.)?dndbeyond\\.com/"
2319
2331
  },
2320
2332
  "prehideSelectors": [
2321
2333
  "[id^=cookie-consent-banner]"
@@ -3359,7 +3371,7 @@
3359
3371
  "name": "jdsports",
3360
3372
  "vendorUrl": "https://www.jdsports.co.uk/",
3361
3373
  "runContext": {
3362
- "urlPattern": "^https://www\\.jdsports\\."
3374
+ "urlPattern": "^https://(www|m)\\.jdsports\\."
3363
3375
  },
3364
3376
  "prehideSelectors": [
3365
3377
  ".miniConsent,#PrivacyPolicyBanner"
@@ -3760,7 +3772,7 @@
3760
3772
  "name": "livejasmin",
3761
3773
  "vendorUrl": "https://www.livejasmin.com/",
3762
3774
  "runContext": {
3763
- "urlPattern": "^https://www\\.livejasmin\\.com/"
3775
+ "urlPattern": "^https://(m|www)\\.livejasmin\\.com/"
3764
3776
  },
3765
3777
  "prehideSelectors": [
3766
3778
  "#consent_modal"