@duckduckgo/autoconsent 9.4.0 → 9.5.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.
- package/CHANGELOG.md +24 -0
- package/dist/addon-firefox/background.bundle.js +1 -0
- package/dist/addon-firefox/content.bundle.js +6 -2
- package/dist/addon-firefox/rules.json +246 -27
- package/dist/addon-mv3/background.bundle.js +1 -0
- package/dist/addon-mv3/content.bundle.js +6 -2
- package/dist/addon-mv3/rules.json +246 -27
- package/dist/autoconsent.cjs.js +6 -2
- package/dist/autoconsent.esm.js +6 -2
- package/dist/autoconsent.playwright.js +1 -1
- package/dist/autoconsent.unit.js +252 -29
- package/lib/cmps/base.ts +3 -1
- package/lib/cmps/consentmanager.ts +2 -0
- package/lib/cmps/uniconsent.ts +2 -2
- package/lib/eval-snippets.ts +1 -0
- package/package.json +3 -3
- package/rules/autoconsent/cookie-law-info.json +4 -1
- package/rules/autoconsent/ecosia.json +28 -0
- package/rules/autoconsent/eu-cookie-compliance.json +10 -3
- package/rules/autoconsent/europa-eu.json +29 -0
- package/rules/autoconsent/fides.json +25 -0
- package/rules/autoconsent/instagram.json +31 -0
- package/rules/autoconsent/ketch.json +23 -20
- package/rules/autoconsent/paypal-us.json +3 -3
- package/rules/autoconsent/temu.json +28 -0
- package/rules/autoconsent/transcend.json +26 -0
- package/rules/autoconsent/xvideos.json +28 -0
- package/rules/rules.json +246 -27
- package/tests/ecosia.spec.ts +5 -0
- package/tests/eu-cookie-compliance-banner.spec.ts +1 -1
- package/tests/europa-eu.spec.ts +6 -0
- package/tests/fides.spec.ts +5 -0
- package/tests/instagram.spec.ts +5 -0
- package/tests/ketch.spec.ts +1 -1
- package/tests/temu.spec.ts +5 -0
- package/tests/transcend.spec.ts +5 -0
- package/tests/xvideos.spec.ts +5 -0
package/dist/autoconsent.unit.js
CHANGED
|
@@ -500,6 +500,7 @@
|
|
|
500
500
|
EVAL_COMPLIANZ_BANNER_0: () => document.cookie.includes("cmplz_banner-status=dismissed"),
|
|
501
501
|
EVAL_COOKIE_LAW_INFO_0: () => CLI.disableAllCookies() || CLI.reject_close() || true,
|
|
502
502
|
EVAL_COOKIE_LAW_INFO_1: () => document.cookie.indexOf("cookielawinfo-checkbox-non-necessary=yes") === -1,
|
|
503
|
+
EVAL_COOKIE_LAW_INFO_DETECT: () => !!window.CLI,
|
|
503
504
|
EVAL_COOKIE_MANAGER_POPUP_0: () => JSON.parse(document.cookie.split(";").find((c) => c.trim().startsWith("CookieLevel")).split("=")[1]).social === false,
|
|
504
505
|
EVAL_COOKIEALERT_0: () => document.querySelector("body").removeAttribute("style") || true,
|
|
505
506
|
EVAL_COOKIEALERT_1: () => document.querySelector("body").removeAttribute("style") || true,
|
|
@@ -806,6 +807,8 @@
|
|
|
806
807
|
results.push(this._runRulesSequentially(rule.then));
|
|
807
808
|
} else if (rule.else) {
|
|
808
809
|
results.push(this._runRulesSequentially(rule.else));
|
|
810
|
+
} else {
|
|
811
|
+
results.push(true);
|
|
809
812
|
}
|
|
810
813
|
}
|
|
811
814
|
if (rule.any) {
|
|
@@ -1353,6 +1356,7 @@
|
|
|
1353
1356
|
await this.waitForElement(".cmptblbox", 2e3);
|
|
1354
1357
|
this.click(".cmptdchoice > a[aria-checked=true]", true);
|
|
1355
1358
|
this.click(".cmpboxbtnyescustomchoices");
|
|
1359
|
+
this.hide("#cmpwrapper,#cmpbox", "display");
|
|
1356
1360
|
return true;
|
|
1357
1361
|
}
|
|
1358
1362
|
async optIn() {
|
|
@@ -1535,10 +1539,10 @@
|
|
|
1535
1539
|
return false;
|
|
1536
1540
|
}
|
|
1537
1541
|
async detectCmp() {
|
|
1538
|
-
return this.elementExists(".unic .unic-box,.unic .unic-bar");
|
|
1542
|
+
return this.elementExists(".unic .unic-box,.unic .unic-bar,.unic .unic-modal");
|
|
1539
1543
|
}
|
|
1540
1544
|
async detectPopup() {
|
|
1541
|
-
return this.elementVisible(".unic .unic-box,.unic .unic-bar", "any");
|
|
1545
|
+
return this.elementVisible(".unic .unic-box,.unic .unic-bar,.unic .unic-modal", "any");
|
|
1542
1546
|
}
|
|
1543
1547
|
async optOut() {
|
|
1544
1548
|
await this.waitForElement(".unic button", 1e3);
|
|
@@ -3709,6 +3713,9 @@
|
|
|
3709
3713
|
detectCmp: [
|
|
3710
3714
|
{
|
|
3711
3715
|
exists: "#cookie-law-info-bar"
|
|
3716
|
+
},
|
|
3717
|
+
{
|
|
3718
|
+
eval: "EVAL_COOKIE_LAW_INFO_DETECT"
|
|
3712
3719
|
}
|
|
3713
3720
|
],
|
|
3714
3721
|
detectPopup: [
|
|
@@ -4419,6 +4426,36 @@
|
|
|
4419
4426
|
}
|
|
4420
4427
|
]
|
|
4421
4428
|
},
|
|
4429
|
+
{
|
|
4430
|
+
name: "ecosia",
|
|
4431
|
+
vendorUrl: "https://www.ecosia.org/",
|
|
4432
|
+
runContext: {
|
|
4433
|
+
urlPattern: "^https://www\\.ecosia\\.org/"
|
|
4434
|
+
},
|
|
4435
|
+
prehideSelectors: [
|
|
4436
|
+
".cookie-wrapper"
|
|
4437
|
+
],
|
|
4438
|
+
detectCmp: [
|
|
4439
|
+
{
|
|
4440
|
+
exists: ".cookie-wrapper > .cookie-notice"
|
|
4441
|
+
}
|
|
4442
|
+
],
|
|
4443
|
+
detectPopup: [
|
|
4444
|
+
{
|
|
4445
|
+
visible: ".cookie-wrapper > .cookie-notice"
|
|
4446
|
+
}
|
|
4447
|
+
],
|
|
4448
|
+
optIn: [
|
|
4449
|
+
{
|
|
4450
|
+
waitForThenClick: "[data-test-id=cookie-notice-accept]"
|
|
4451
|
+
}
|
|
4452
|
+
],
|
|
4453
|
+
optOut: [
|
|
4454
|
+
{
|
|
4455
|
+
waitForThenClick: "[data-test-id=cookie-notice-reject]"
|
|
4456
|
+
}
|
|
4457
|
+
]
|
|
4458
|
+
},
|
|
4422
4459
|
{
|
|
4423
4460
|
name: "etsy",
|
|
4424
4461
|
prehideSelectors: [
|
|
@@ -4463,12 +4500,12 @@
|
|
|
4463
4500
|
name: "eu-cookie-compliance-banner",
|
|
4464
4501
|
detectCmp: [
|
|
4465
4502
|
{
|
|
4466
|
-
exists: ".eu-cookie-compliance-
|
|
4503
|
+
exists: "body.eu-cookie-compliance-popup-open"
|
|
4467
4504
|
}
|
|
4468
4505
|
],
|
|
4469
4506
|
detectPopup: [
|
|
4470
4507
|
{
|
|
4471
|
-
exists: ".eu-cookie-compliance-popup-open"
|
|
4508
|
+
exists: "body.eu-cookie-compliance-popup-open"
|
|
4472
4509
|
}
|
|
4473
4510
|
],
|
|
4474
4511
|
optIn: [
|
|
@@ -4478,8 +4515,14 @@
|
|
|
4478
4515
|
],
|
|
4479
4516
|
optOut: [
|
|
4480
4517
|
{
|
|
4481
|
-
|
|
4482
|
-
|
|
4518
|
+
if: {
|
|
4519
|
+
visible: ".decline-button,.eu-cookie-compliance-save-preferences-button"
|
|
4520
|
+
},
|
|
4521
|
+
then: [
|
|
4522
|
+
{
|
|
4523
|
+
click: ".decline-button,.eu-cookie-compliance-save-preferences-button"
|
|
4524
|
+
}
|
|
4525
|
+
]
|
|
4483
4526
|
},
|
|
4484
4527
|
{
|
|
4485
4528
|
hide: ".eu-cookie-compliance-banner-info, #sliding-popup"
|
|
@@ -4526,6 +4569,37 @@
|
|
|
4526
4569
|
}
|
|
4527
4570
|
]
|
|
4528
4571
|
},
|
|
4572
|
+
{
|
|
4573
|
+
name: "europa-eu",
|
|
4574
|
+
vendorUrl: "https://ec.europa.eu/",
|
|
4575
|
+
runContext: {
|
|
4576
|
+
urlPattern: "^https://[^/]*europa\\.eu/"
|
|
4577
|
+
},
|
|
4578
|
+
prehideSelectors: [
|
|
4579
|
+
"#cookie-consent-banner"
|
|
4580
|
+
],
|
|
4581
|
+
detectCmp: [
|
|
4582
|
+
{
|
|
4583
|
+
exists: ".cck-container"
|
|
4584
|
+
}
|
|
4585
|
+
],
|
|
4586
|
+
detectPopup: [
|
|
4587
|
+
{
|
|
4588
|
+
visible: ".cck-container"
|
|
4589
|
+
}
|
|
4590
|
+
],
|
|
4591
|
+
optIn: [
|
|
4592
|
+
{
|
|
4593
|
+
waitForThenClick: '.cck-actions-button[href="#accept"]'
|
|
4594
|
+
}
|
|
4595
|
+
],
|
|
4596
|
+
optOut: [
|
|
4597
|
+
{
|
|
4598
|
+
waitForThenClick: '.cck-actions-button[href="#refuse"]',
|
|
4599
|
+
hide: ".cck-container"
|
|
4600
|
+
}
|
|
4601
|
+
]
|
|
4602
|
+
},
|
|
4529
4603
|
{
|
|
4530
4604
|
name: "EZoic",
|
|
4531
4605
|
prehideSelectors: [
|
|
@@ -4612,6 +4686,33 @@
|
|
|
4612
4686
|
}
|
|
4613
4687
|
]
|
|
4614
4688
|
},
|
|
4689
|
+
{
|
|
4690
|
+
name: "fides",
|
|
4691
|
+
vendorUrl: "https://github.com/ethyca/fides",
|
|
4692
|
+
prehideSelectors: [
|
|
4693
|
+
"#fides-overlay"
|
|
4694
|
+
],
|
|
4695
|
+
detectCmp: [
|
|
4696
|
+
{
|
|
4697
|
+
exists: "#fides-overlay #fides-banner"
|
|
4698
|
+
}
|
|
4699
|
+
],
|
|
4700
|
+
detectPopup: [
|
|
4701
|
+
{
|
|
4702
|
+
visible: "#fides-overlay #fides-banner"
|
|
4703
|
+
}
|
|
4704
|
+
],
|
|
4705
|
+
optIn: [
|
|
4706
|
+
{
|
|
4707
|
+
waitForThenClick: '#fides-banner [data-testid="Accept all-btn"]'
|
|
4708
|
+
}
|
|
4709
|
+
],
|
|
4710
|
+
optOut: [
|
|
4711
|
+
{
|
|
4712
|
+
waitForThenClick: '#fides-banner [data-testid="Reject all-btn"]'
|
|
4713
|
+
}
|
|
4714
|
+
]
|
|
4715
|
+
},
|
|
4615
4716
|
{
|
|
4616
4717
|
name: "funding-choices",
|
|
4617
4718
|
prehideSelectors: [
|
|
@@ -5021,6 +5122,39 @@
|
|
|
5021
5122
|
}
|
|
5022
5123
|
]
|
|
5023
5124
|
},
|
|
5125
|
+
{
|
|
5126
|
+
name: "instagram",
|
|
5127
|
+
vendorUrl: "https://instagram.com",
|
|
5128
|
+
runContext: {
|
|
5129
|
+
urlPattern: "^https://www\\.instagram\\.com/"
|
|
5130
|
+
},
|
|
5131
|
+
prehideSelectors: [
|
|
5132
|
+
".x78zum5.xdt5ytf.xg6iff7.x1n2onr6"
|
|
5133
|
+
],
|
|
5134
|
+
detectCmp: [
|
|
5135
|
+
{
|
|
5136
|
+
exists: ".x1qjc9v5.x9f619.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k"
|
|
5137
|
+
}
|
|
5138
|
+
],
|
|
5139
|
+
detectPopup: [
|
|
5140
|
+
{
|
|
5141
|
+
visible: ".x1qjc9v5.x9f619.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k"
|
|
5142
|
+
}
|
|
5143
|
+
],
|
|
5144
|
+
optIn: [
|
|
5145
|
+
{
|
|
5146
|
+
waitForThenClick: "._a9--._a9_0"
|
|
5147
|
+
}
|
|
5148
|
+
],
|
|
5149
|
+
optOut: [
|
|
5150
|
+
{
|
|
5151
|
+
waitForThenClick: "._a9--._a9_1"
|
|
5152
|
+
},
|
|
5153
|
+
{
|
|
5154
|
+
wait: 2e3
|
|
5155
|
+
}
|
|
5156
|
+
]
|
|
5157
|
+
},
|
|
5024
5158
|
{
|
|
5025
5159
|
name: "ionos.de",
|
|
5026
5160
|
prehideSelectors: [
|
|
@@ -5266,6 +5400,7 @@
|
|
|
5266
5400
|
},
|
|
5267
5401
|
{
|
|
5268
5402
|
name: "ketch",
|
|
5403
|
+
vendorUrl: "https://www.ketch.com",
|
|
5269
5404
|
runContext: {
|
|
5270
5405
|
frame: false,
|
|
5271
5406
|
main: true
|
|
@@ -5291,7 +5426,7 @@
|
|
|
5291
5426
|
},
|
|
5292
5427
|
then: [
|
|
5293
5428
|
{
|
|
5294
|
-
waitForThenClick: "#lanyard_root div[class
|
|
5429
|
+
waitForThenClick: "#lanyard_root div[class*=buttons] > :nth-child(2)"
|
|
5295
5430
|
},
|
|
5296
5431
|
{
|
|
5297
5432
|
click: "#lanyard_root button[class='confirmButton']"
|
|
@@ -5299,43 +5434,42 @@
|
|
|
5299
5434
|
],
|
|
5300
5435
|
else: [
|
|
5301
5436
|
{
|
|
5302
|
-
waitForThenClick: "#lanyard_root div[class
|
|
5437
|
+
waitForThenClick: "#lanyard_root div[class*=buttons] > :nth-child(2)"
|
|
5303
5438
|
}
|
|
5304
5439
|
]
|
|
5305
5440
|
}
|
|
5306
5441
|
],
|
|
5307
5442
|
optOut: [
|
|
5308
5443
|
{
|
|
5309
|
-
|
|
5444
|
+
if: {
|
|
5445
|
+
exists: "#lanyard_root [aria-describedby=banner-description]"
|
|
5446
|
+
},
|
|
5447
|
+
then: [
|
|
5448
|
+
{
|
|
5449
|
+
waitForThenClick: "#lanyard_root div[class*=buttons] > button[class*=secondaryButton]",
|
|
5450
|
+
comment: "can be either settings or reject button"
|
|
5451
|
+
}
|
|
5452
|
+
]
|
|
5453
|
+
},
|
|
5454
|
+
{
|
|
5455
|
+
waitFor: "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description]",
|
|
5456
|
+
timeout: 1e3,
|
|
5310
5457
|
optional: true
|
|
5311
5458
|
},
|
|
5312
5459
|
{
|
|
5313
5460
|
if: {
|
|
5314
|
-
exists: "#lanyard_root
|
|
5461
|
+
exists: "#lanyard_root [aria-describedby=preference-description],#lanyard_root [aria-describedby=modal-description]"
|
|
5315
5462
|
},
|
|
5316
5463
|
then: [
|
|
5317
5464
|
{
|
|
5318
|
-
waitForThenClick: "#lanyard_root button[class*=
|
|
5319
|
-
},
|
|
5320
|
-
{
|
|
5321
|
-
click: "#lanyard_root button[class*='confirmButton']"
|
|
5322
|
-
}
|
|
5323
|
-
],
|
|
5324
|
-
else: [
|
|
5325
|
-
{
|
|
5326
|
-
click: "#lanyard_root div[class^='buttons'] > :nth-child(1)",
|
|
5327
|
-
optional: true
|
|
5328
|
-
},
|
|
5329
|
-
{
|
|
5330
|
-
waitForThenClick: "#lanyard_root input:checked"
|
|
5465
|
+
waitForThenClick: "#lanyard_root button[class*=rejectButton]"
|
|
5331
5466
|
},
|
|
5332
5467
|
{
|
|
5333
|
-
click: "#
|
|
5468
|
+
click: "#lanyard_root button[class*=confirmButton],#lanyard_root div[class*=actions_] > button:nth-child(1)"
|
|
5334
5469
|
}
|
|
5335
5470
|
]
|
|
5336
5471
|
}
|
|
5337
|
-
]
|
|
5338
|
-
test: []
|
|
5472
|
+
]
|
|
5339
5473
|
},
|
|
5340
5474
|
{
|
|
5341
5475
|
name: "kleinanzeigen-de",
|
|
@@ -6090,12 +6224,12 @@
|
|
|
6090
6224
|
],
|
|
6091
6225
|
detectCmp: [
|
|
6092
6226
|
{
|
|
6093
|
-
exists: "#ccpaCookieBanner, .privacy-
|
|
6227
|
+
exists: "#ccpaCookieBanner, .privacy-sheet-content"
|
|
6094
6228
|
}
|
|
6095
6229
|
],
|
|
6096
6230
|
detectPopup: [
|
|
6097
6231
|
{
|
|
6098
|
-
exists: "#ccpaCookieBanner, .privacy-
|
|
6232
|
+
exists: "#ccpaCookieBanner, .privacy-sheet-content"
|
|
6099
6233
|
}
|
|
6100
6234
|
],
|
|
6101
6235
|
optIn: [
|
|
@@ -6115,7 +6249,7 @@
|
|
|
6115
6249
|
],
|
|
6116
6250
|
else: [
|
|
6117
6251
|
{
|
|
6118
|
-
waitForVisible: ".privacy-
|
|
6252
|
+
waitForVisible: ".privacy-sheet-content #formContent"
|
|
6119
6253
|
},
|
|
6120
6254
|
{
|
|
6121
6255
|
click: "#formContent .cookiepref-11m2iee-checkbox_base input:checked",
|
|
@@ -6927,6 +7061,36 @@
|
|
|
6927
7061
|
}
|
|
6928
7062
|
]
|
|
6929
7063
|
},
|
|
7064
|
+
{
|
|
7065
|
+
name: "temu",
|
|
7066
|
+
vendorUrl: "https://temu.com",
|
|
7067
|
+
runContext: {
|
|
7068
|
+
urlPattern: "^https://[^/]*temu\\.com/"
|
|
7069
|
+
},
|
|
7070
|
+
prehideSelectors: [
|
|
7071
|
+
"._2d-8vq-W,._1UdBUwni"
|
|
7072
|
+
],
|
|
7073
|
+
detectCmp: [
|
|
7074
|
+
{
|
|
7075
|
+
exists: "._3YCsmIaS"
|
|
7076
|
+
}
|
|
7077
|
+
],
|
|
7078
|
+
detectPopup: [
|
|
7079
|
+
{
|
|
7080
|
+
visible: "._3YCsmIaS"
|
|
7081
|
+
}
|
|
7082
|
+
],
|
|
7083
|
+
optIn: [
|
|
7084
|
+
{
|
|
7085
|
+
waitForThenClick: "._3fKiu5wx._3zN5SumS._3tAK973O.IYOfhWEs.VGNGF1pA"
|
|
7086
|
+
}
|
|
7087
|
+
],
|
|
7088
|
+
optOut: [
|
|
7089
|
+
{
|
|
7090
|
+
waitForThenClick: "._3fKiu5wx._1_XToJBF._3tAK973O.IYOfhWEs.VGNGF1pA"
|
|
7091
|
+
}
|
|
7092
|
+
]
|
|
7093
|
+
},
|
|
6930
7094
|
{
|
|
6931
7095
|
name: "Termly",
|
|
6932
7096
|
prehideSelectors: [
|
|
@@ -7236,6 +7400,37 @@
|
|
|
7236
7400
|
}
|
|
7237
7401
|
]
|
|
7238
7402
|
},
|
|
7403
|
+
{
|
|
7404
|
+
name: "transcend",
|
|
7405
|
+
vendorUrl: "https://unknown",
|
|
7406
|
+
cosmetic: true,
|
|
7407
|
+
prehideSelectors: [
|
|
7408
|
+
"#transcend-consent-manager"
|
|
7409
|
+
],
|
|
7410
|
+
detectCmp: [
|
|
7411
|
+
{
|
|
7412
|
+
exists: "#transcend-consent-manager"
|
|
7413
|
+
}
|
|
7414
|
+
],
|
|
7415
|
+
detectPopup: [
|
|
7416
|
+
{
|
|
7417
|
+
visible: "#transcend-consent-manager"
|
|
7418
|
+
}
|
|
7419
|
+
],
|
|
7420
|
+
optIn: [
|
|
7421
|
+
{
|
|
7422
|
+
waitForThenClick: [
|
|
7423
|
+
"#transcend-consent-manager",
|
|
7424
|
+
"#consentManagerMainDialog .inner-container button"
|
|
7425
|
+
]
|
|
7426
|
+
}
|
|
7427
|
+
],
|
|
7428
|
+
optOut: [
|
|
7429
|
+
{
|
|
7430
|
+
hide: "#transcend-consent-manager"
|
|
7431
|
+
}
|
|
7432
|
+
]
|
|
7433
|
+
},
|
|
7239
7434
|
{
|
|
7240
7435
|
name: "transip-nl",
|
|
7241
7436
|
runContext: {
|
|
@@ -8060,6 +8255,34 @@
|
|
|
8060
8255
|
}
|
|
8061
8256
|
]
|
|
8062
8257
|
},
|
|
8258
|
+
{
|
|
8259
|
+
name: "xvideos",
|
|
8260
|
+
vendorUrl: "https://xvideos.com",
|
|
8261
|
+
runContext: {
|
|
8262
|
+
urlPattern: "^https://[^/]*xvideos\\.com/"
|
|
8263
|
+
},
|
|
8264
|
+
prehideSelectors: [],
|
|
8265
|
+
detectCmp: [
|
|
8266
|
+
{
|
|
8267
|
+
exists: ".disclaimer-opened #disclaimer-cookies"
|
|
8268
|
+
}
|
|
8269
|
+
],
|
|
8270
|
+
detectPopup: [
|
|
8271
|
+
{
|
|
8272
|
+
visible: ".disclaimer-opened #disclaimer-cookies"
|
|
8273
|
+
}
|
|
8274
|
+
],
|
|
8275
|
+
optIn: [
|
|
8276
|
+
{
|
|
8277
|
+
waitForThenClick: "#disclaimer-accept_cookies"
|
|
8278
|
+
}
|
|
8279
|
+
],
|
|
8280
|
+
optOut: [
|
|
8281
|
+
{
|
|
8282
|
+
waitForThenClick: "#disclaimer-reject_cookies"
|
|
8283
|
+
}
|
|
8284
|
+
]
|
|
8285
|
+
},
|
|
8063
8286
|
{
|
|
8064
8287
|
name: "Yahoo",
|
|
8065
8288
|
runContext: {
|
package/lib/cmps/base.ts
CHANGED
|
@@ -241,7 +241,7 @@ export class AutoConsentCMP extends AutoConsentCMPBase {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
async evaluateRuleStep(rule: AutoConsentRuleStep) {
|
|
244
|
-
const results = [];
|
|
244
|
+
const results: Array<Promise<boolean> | boolean> = [];
|
|
245
245
|
const logsConfig = this.autoconsent.config.logs;
|
|
246
246
|
if (rule.exists) {
|
|
247
247
|
results.push(this.elementExists(rule.exists));
|
|
@@ -282,6 +282,8 @@ export class AutoConsentCMP extends AutoConsentCMPBase {
|
|
|
282
282
|
results.push(this._runRulesSequentially(rule.then));
|
|
283
283
|
} else if (rule.else) {
|
|
284
284
|
results.push(this._runRulesSequentially(rule.else));
|
|
285
|
+
} else {
|
|
286
|
+
results.push(true);
|
|
285
287
|
}
|
|
286
288
|
}
|
|
287
289
|
if (rule.any) {
|
|
@@ -59,6 +59,8 @@ export default class ConsentManager extends AutoConsentCMPBase {
|
|
|
59
59
|
await this.waitForElement(".cmptblbox", 2000);
|
|
60
60
|
this.click(".cmptdchoice > a[aria-checked=true]", true);
|
|
61
61
|
this.click(".cmpboxbtnyescustomchoices");
|
|
62
|
+
|
|
63
|
+
this.hide('#cmpwrapper,#cmpbox', 'display');
|
|
62
64
|
return true;
|
|
63
65
|
}
|
|
64
66
|
|
package/lib/cmps/uniconsent.ts
CHANGED
|
@@ -20,11 +20,11 @@ export default class Uniconsent extends AutoConsentCMPBase {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async detectCmp() {
|
|
23
|
-
return this.elementExists(".unic .unic-box,.unic .unic-bar");
|
|
23
|
+
return this.elementExists(".unic .unic-box,.unic .unic-bar,.unic .unic-modal");
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
async detectPopup() {
|
|
27
|
-
return this.elementVisible(".unic .unic-box,.unic .unic-bar", 'any');
|
|
27
|
+
return this.elementVisible(".unic .unic-box,.unic .unic-bar,.unic .unic-modal", 'any');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async optOut() {
|
package/lib/eval-snippets.ts
CHANGED
|
@@ -51,6 +51,7 @@ export const snippets = {
|
|
|
51
51
|
EVAL_COMPLIANZ_BANNER_0: () => document.cookie.includes('cmplz_banner-status=dismissed'),
|
|
52
52
|
EVAL_COOKIE_LAW_INFO_0: () => CLI.disableAllCookies() || CLI.reject_close() || true,
|
|
53
53
|
EVAL_COOKIE_LAW_INFO_1: () => document.cookie.indexOf('cookielawinfo-checkbox-non-necessary=yes') === -1,
|
|
54
|
+
EVAL_COOKIE_LAW_INFO_DETECT: () => !!window.CLI,
|
|
54
55
|
EVAL_COOKIE_MANAGER_POPUP_0: () => JSON.parse(document.cookie.split(';').find(c => c.trim().startsWith('CookieLevel')).split('=')[1]).social === false,
|
|
55
56
|
EVAL_COOKIEALERT_0: () => document.querySelector('body').removeAttribute('style') || true,
|
|
56
57
|
EVAL_COOKIEALERT_1: () => document.querySelector('body').removeAttribute('style') || true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckduckgo/autoconsent",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/autoconsent.cjs.js",
|
|
6
6
|
"module": "dist/autoconsent.esm.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@playwright/test": "^1.17.1",
|
|
35
35
|
"@puppeteer/replay": "^2.11.0",
|
|
36
36
|
"@types/chai": "^4.3.1",
|
|
37
|
-
"@types/chrome": "^0.0.
|
|
37
|
+
"@types/chrome": "^0.0.259",
|
|
38
38
|
"@types/mocha": "^10.0.1",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
40
40
|
"@typescript-eslint/parser": "^6.12.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"bulma": "^0.9.4",
|
|
43
43
|
"chai": "^5.0.0",
|
|
44
44
|
"chokidar-cli": "^3.0.0",
|
|
45
|
-
"esbuild": "^0.
|
|
45
|
+
"esbuild": "^0.20.0",
|
|
46
46
|
"eslint": "^8.27.0",
|
|
47
47
|
"eslint-plugin-json": "^3.1.0",
|
|
48
48
|
"mocha": "^10.0.0",
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cookie-law-info",
|
|
3
3
|
"prehideSelectors": ["#cookie-law-info-bar"],
|
|
4
|
-
"detectCmp": [
|
|
4
|
+
"detectCmp": [
|
|
5
|
+
{ "exists": "#cookie-law-info-bar" },
|
|
6
|
+
{ "eval": "EVAL_COOKIE_LAW_INFO_DETECT" }
|
|
7
|
+
],
|
|
5
8
|
"detectPopup": [{ "visible": "#cookie-law-info-bar" }],
|
|
6
9
|
"optIn": [{ "click": "[data-cli_action=\"accept_all\"]" }],
|
|
7
10
|
"optOut": [
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ecosia",
|
|
3
|
+
"vendorUrl": "https://www.ecosia.org/",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https://www\\.ecosia\\.org/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": [".cookie-wrapper"],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": ".cookie-wrapper > .cookie-notice"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": ".cookie-wrapper > .cookie-notice"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": "[data-test-id=cookie-notice-accept]"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"waitForThenClick": "[data-test-id=cookie-notice-reject]"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eu-cookie-compliance-banner",
|
|
3
|
-
"detectCmp": [{ "exists": ".eu-cookie-compliance-
|
|
4
|
-
"detectPopup": [{ "exists": ".eu-cookie-compliance-popup-open" }],
|
|
3
|
+
"detectCmp": [{ "exists": "body.eu-cookie-compliance-popup-open" }],
|
|
4
|
+
"detectPopup": [{ "exists": "body.eu-cookie-compliance-popup-open" }],
|
|
5
5
|
"optIn": [{ "click": ".agree-button" }],
|
|
6
6
|
"optOut": [
|
|
7
|
-
{
|
|
7
|
+
{
|
|
8
|
+
"if": {
|
|
9
|
+
"visible": ".decline-button,.eu-cookie-compliance-save-preferences-button"
|
|
10
|
+
},
|
|
11
|
+
"then": [{
|
|
12
|
+
"click": ".decline-button,.eu-cookie-compliance-save-preferences-button"
|
|
13
|
+
}]
|
|
14
|
+
},
|
|
8
15
|
{ "hide": ".eu-cookie-compliance-banner-info, #sliding-popup" }
|
|
9
16
|
],
|
|
10
17
|
"test": [
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "europa-eu",
|
|
3
|
+
"vendorUrl": "https://ec.europa.eu/",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https://[^/]*europa\\.eu/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": ["#cookie-consent-banner"],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": ".cck-container"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": ".cck-container"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": ".cck-actions-button[href=\"#accept\"]"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"waitForThenClick": ".cck-actions-button[href=\"#refuse\"]",
|
|
26
|
+
"hide": ".cck-container"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fides",
|
|
3
|
+
"vendorUrl": "https://github.com/ethyca/fides",
|
|
4
|
+
"prehideSelectors": ["#fides-overlay"],
|
|
5
|
+
"detectCmp": [
|
|
6
|
+
{
|
|
7
|
+
"exists": "#fides-overlay #fides-banner"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"detectPopup": [
|
|
11
|
+
{
|
|
12
|
+
"visible": "#fides-overlay #fides-banner"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"optIn": [
|
|
16
|
+
{
|
|
17
|
+
"waitForThenClick": "#fides-banner [data-testid=\"Accept all-btn\"]"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"optOut": [
|
|
21
|
+
{
|
|
22
|
+
"waitForThenClick": "#fides-banner [data-testid=\"Reject all-btn\"]"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "instagram",
|
|
3
|
+
"vendorUrl": "https://instagram.com",
|
|
4
|
+
"runContext": {
|
|
5
|
+
"urlPattern": "^https://www\\.instagram\\.com/"
|
|
6
|
+
},
|
|
7
|
+
"prehideSelectors": [".x78zum5.xdt5ytf.xg6iff7.x1n2onr6"],
|
|
8
|
+
"detectCmp": [
|
|
9
|
+
{
|
|
10
|
+
"exists": ".x1qjc9v5.x9f619.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"detectPopup": [
|
|
14
|
+
{
|
|
15
|
+
"visible": ".x1qjc9v5.x9f619.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"optIn": [
|
|
19
|
+
{
|
|
20
|
+
"waitForThenClick": "._a9--._a9_0"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"optOut": [
|
|
24
|
+
{
|
|
25
|
+
"waitForThenClick": "._a9--._a9_1"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"wait": 2000
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|