@duckduckgo/autoconsent 4.1.0 → 4.1.2

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 CHANGED
@@ -1,3 +1,36 @@
1
+ # v4.1.2 (Thu Feb 09 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - New rules [#95](https://github.com/duckduckgo/autoconsent/pull/95) ([@sammacbeth](https://github.com/sammacbeth))
6
+
7
+ #### 🔩 Dependency Updates
8
+
9
+ - Bump mocha from 10.1.0 to 10.2.0 [#64](https://github.com/duckduckgo/autoconsent/pull/64) ([@dependabot[bot]](https://github.com/dependabot[bot]))
10
+ - Bump @playwright/test from 1.24.2 to 1.30.0 [#92](https://github.com/duckduckgo/autoconsent/pull/92) ([@dependabot[bot]](https://github.com/dependabot[bot]))
11
+ - Bump typescript from 4.8.4 to 4.9.5 [#93](https://github.com/duckduckgo/autoconsent/pull/93) ([@dependabot[bot]](https://github.com/dependabot[bot]))
12
+ - Bump @rollup/plugin-typescript from 10.0.1 to 11.0.0 [#89](https://github.com/duckduckgo/autoconsent/pull/89) ([@dependabot[bot]](https://github.com/dependabot[bot]))
13
+ - Bump @typescript-eslint/parser from 5.46.1 to 5.51.0 [#94](https://github.com/duckduckgo/autoconsent/pull/94) ([@dependabot[bot]](https://github.com/dependabot[bot]))
14
+
15
+ #### Authors: 2
16
+
17
+ - [@dependabot[bot]](https://github.com/dependabot[bot])
18
+ - Sam Macbeth ([@sammacbeth](https://github.com/sammacbeth))
19
+
20
+ ---
21
+
22
+ # v4.1.1 (Tue Jan 24 2023)
23
+
24
+ #### 🐛 Bug Fix
25
+
26
+ - Add a test cosmetic rule [#91](https://github.com/duckduckgo/autoconsent/pull/91) ([@muodov](https://github.com/muodov))
27
+
28
+ #### Authors: 1
29
+
30
+ - Maxim Tsoy ([@muodov](https://github.com/muodov))
31
+
32
+ ---
33
+
1
34
  # v4.1.0 (Tue Jan 17 2023)
2
35
 
3
36
  #### 🚀 Enhancement
@@ -718,11 +718,6 @@
718
718
  // Note: JS API is also available:
719
719
  // https://help.consentmanager.net/books/cmp/page/javascript-api
720
720
  class ConsentManager extends AutoConsentCMPBase {
721
- constructor() {
722
- super("consentmanager.net");
723
- this.prehideSelectors = ["#cmpbox,#cmpbox2"];
724
- this.apiAvailable = false;
725
- }
726
721
  get hasSelfTest() {
727
722
  return this.apiAvailable;
728
723
  }
@@ -732,6 +727,11 @@
732
727
  get isCosmetic() {
733
728
  return false;
734
729
  }
730
+ constructor() {
731
+ super("consentmanager.net");
732
+ this.prehideSelectors = ["#cmpbox,#cmpbox2"];
733
+ this.apiAvailable = false;
734
+ }
735
735
  async detectCmp() {
736
736
  this.apiAvailable = await doEval('window.__cmp && typeof __cmp("getCMPData") === "object"');
737
737
  if (!this.apiAvailable) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 2,
3
3
  "name": "Autoconsent",
4
- "version": "2022.12.14",
4
+ "version": "2023.1.24",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"
@@ -29,4 +29,4 @@
29
29
  "browser_style": true,
30
30
  "default_title": "Autoconsent"
31
31
  }
32
- }
32
+ }
@@ -493,6 +493,92 @@
493
493
  }
494
494
  ]
495
495
  },
496
+ {
497
+ "name": "clinch",
498
+ "intermediate": false,
499
+ "runContext": {
500
+ "frame": false,
501
+ "main": true
502
+ },
503
+ "prehideSelectors": [
504
+ ".consent-modal[role=dialog]"
505
+ ],
506
+ "detectCmp": [
507
+ {
508
+ "exists": ".consent-modal[role=dialog]"
509
+ }
510
+ ],
511
+ "detectPopup": [
512
+ {
513
+ "visible": ".consent-modal[role=dialog]"
514
+ }
515
+ ],
516
+ "optIn": [
517
+ {
518
+ "click": "#consent_agree"
519
+ }
520
+ ],
521
+ "optOut": [
522
+ {
523
+ "click": "#manage_cookie_preferences"
524
+ },
525
+ {
526
+ "click": "#cookie_consent_preferences input:checked",
527
+ "all": true,
528
+ "optional": true
529
+ },
530
+ {
531
+ "click": "#consent_save"
532
+ }
533
+ ],
534
+ "test": [
535
+ {
536
+ "eval": "document.cookie.includes('ctc_rejected=1')"
537
+ }
538
+ ]
539
+ },
540
+ {
541
+ "name": "coinbase",
542
+ "intermediate": false,
543
+ "runContext": {
544
+ "frame": true,
545
+ "main": true
546
+ },
547
+ "prehideSelectors": [],
548
+ "detectCmp": [
549
+ {
550
+ "exists": "div[class^=CookieBannerContent__Container]"
551
+ }
552
+ ],
553
+ "detectPopup": [
554
+ {
555
+ "visible": "div[class^=CookieBannerContent__Container]"
556
+ }
557
+ ],
558
+ "optIn": [
559
+ {
560
+ "click": "div[class^=CookieBannerContent__CTA] :nth-last-child(1)"
561
+ }
562
+ ],
563
+ "optOut": [
564
+ {
565
+ "click": "button[class^=CookieBannerContent__Settings]"
566
+ },
567
+ {
568
+ "click": "div[class^=CookiePreferencesModal__CategoryContainer] input:checked",
569
+ "all": true,
570
+ "optional": true
571
+ },
572
+ {
573
+ "click": "div[class^=CookiePreferencesModal__ButtonContainer] > button"
574
+ }
575
+ ],
576
+ "test": [
577
+ {
578
+ "eval": "JSON.parse(decodeURIComponent(document.cookie.match(/cm_eu_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[1])).consent.length <= 1"
579
+ }
580
+ ]
581
+ },
496
582
  {
497
583
  "name": "Complianz banner",
498
584
  "prehideSelectors": [
@@ -1612,6 +1698,55 @@
1612
1698
  }
1613
1699
  ]
1614
1700
  },
1701
+ {
1702
+ "name": "ketch",
1703
+ "runContext": {
1704
+ "frame": false,
1705
+ "main": true
1706
+ },
1707
+ "intermediate": false,
1708
+ "prehideSelectors": [
1709
+ "#lanyard_root div[role='dialog']"
1710
+ ],
1711
+ "detectCmp": [
1712
+ {
1713
+ "exists": "#lanyard_root div[role='dialog']"
1714
+ }
1715
+ ],
1716
+ "detectPopup": [
1717
+ {
1718
+ "visible": "#lanyard_root div[role='dialog']"
1719
+ }
1720
+ ],
1721
+ "optIn": [
1722
+ {
1723
+ "click": "#lanyard_root button[class^='link']",
1724
+ "optional": true
1725
+ },
1726
+ {
1727
+ "wait": 500
1728
+ },
1729
+ {
1730
+ "waitForThenClick": "div[class^='buttons'] > :nth-child(2)"
1731
+ },
1732
+ {
1733
+ "click": "#lanyard_root button[class*='confirmButton']"
1734
+ }
1735
+ ],
1736
+ "optOut": [
1737
+ {
1738
+ "click": "#lanyard_root button[class^='link']",
1739
+ "optional": true
1740
+ },
1741
+ {
1742
+ "waitForThenClick": "#lanyard_root button[class*='rejectButton']"
1743
+ },
1744
+ {
1745
+ "click": "#lanyard_root button[class*='confirmButton']"
1746
+ }
1747
+ ],
1748
+ "test": []
1749
+ },
1615
1750
  {
1616
1751
  "name": "linkedin.com",
1617
1752
  "prehideSelectors": [
@@ -2687,6 +2822,46 @@
2687
2822
  }
2688
2823
  ]
2689
2824
  },
2825
+ {
2826
+ "name": "Test page cosmetic CMP",
2827
+ "cosmetic": true,
2828
+ "prehideSelectors": [
2829
+ "#privacy-test-page-cmp-test-prehide"
2830
+ ],
2831
+ "detectCmp": [
2832
+ {
2833
+ "exists": "#privacy-test-page-cmp-test-banner"
2834
+ }
2835
+ ],
2836
+ "detectPopup": [
2837
+ {
2838
+ "visible": "#privacy-test-page-cmp-test-banner"
2839
+ }
2840
+ ],
2841
+ "optIn": [
2842
+ {
2843
+ "waitFor": "#accept-all"
2844
+ },
2845
+ {
2846
+ "click": "#accept-all"
2847
+ }
2848
+ ],
2849
+ "optOut": [
2850
+ {
2851
+ "hide": [
2852
+ "#privacy-test-page-cmp-test-banner"
2853
+ ]
2854
+ }
2855
+ ],
2856
+ "test": [
2857
+ {
2858
+ "wait": 500
2859
+ },
2860
+ {
2861
+ "eval": "window.results.results[0] === 'banner_hidden'"
2862
+ }
2863
+ ]
2864
+ },
2690
2865
  {
2691
2866
  "name": "Test page CMP",
2692
2867
  "prehideSelectors": [
@@ -2776,6 +2951,43 @@
2776
2951
  }
2777
2952
  ]
2778
2953
  },
2954
+ {
2955
+ "name": "theverge",
2956
+ "runContext": {
2957
+ "frame": false,
2958
+ "main": true
2959
+ },
2960
+ "intermediate": false,
2961
+ "prehideSelectors": [
2962
+ ".duet--cta--cookie-banner"
2963
+ ],
2964
+ "detectCmp": [
2965
+ {
2966
+ "exists": ".duet--cta--cookie-banner"
2967
+ }
2968
+ ],
2969
+ "detectPopup": [
2970
+ {
2971
+ "visible": ".duet--cta--cookie-banner"
2972
+ }
2973
+ ],
2974
+ "optIn": [
2975
+ {
2976
+ "click": ".duet--cta--cookie-banner button.tracking-12",
2977
+ "all": false
2978
+ }
2979
+ ],
2980
+ "optOut": [
2981
+ {
2982
+ "click": ".duet--cta--cookie-banner button.tracking-12 > span"
2983
+ }
2984
+ ],
2985
+ "test": [
2986
+ {
2987
+ "eval": "document.cookie.includes('_duet_gdpr_acknowledged=1')"
2988
+ }
2989
+ ]
2990
+ },
2779
2991
  {
2780
2992
  "name": "twitter",
2781
2993
  "runContext": {
@@ -718,11 +718,6 @@
718
718
  // Note: JS API is also available:
719
719
  // https://help.consentmanager.net/books/cmp/page/javascript-api
720
720
  class ConsentManager extends AutoConsentCMPBase {
721
- constructor() {
722
- super("consentmanager.net");
723
- this.prehideSelectors = ["#cmpbox,#cmpbox2"];
724
- this.apiAvailable = false;
725
- }
726
721
  get hasSelfTest() {
727
722
  return this.apiAvailable;
728
723
  }
@@ -732,6 +727,11 @@
732
727
  get isCosmetic() {
733
728
  return false;
734
729
  }
730
+ constructor() {
731
+ super("consentmanager.net");
732
+ this.prehideSelectors = ["#cmpbox,#cmpbox2"];
733
+ this.apiAvailable = false;
734
+ }
735
735
  async detectCmp() {
736
736
  this.apiAvailable = await doEval('window.__cmp && typeof __cmp("getCMPData") === "object"');
737
737
  if (!this.apiAvailable) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2022.12.14",
4
+ "version": "2023.1.24",
5
5
  "background": {
6
6
  "service_worker": "background.bundle.js"
7
7
  },
@@ -493,6 +493,92 @@
493
493
  }
494
494
  ]
495
495
  },
496
+ {
497
+ "name": "clinch",
498
+ "intermediate": false,
499
+ "runContext": {
500
+ "frame": false,
501
+ "main": true
502
+ },
503
+ "prehideSelectors": [
504
+ ".consent-modal[role=dialog]"
505
+ ],
506
+ "detectCmp": [
507
+ {
508
+ "exists": ".consent-modal[role=dialog]"
509
+ }
510
+ ],
511
+ "detectPopup": [
512
+ {
513
+ "visible": ".consent-modal[role=dialog]"
514
+ }
515
+ ],
516
+ "optIn": [
517
+ {
518
+ "click": "#consent_agree"
519
+ }
520
+ ],
521
+ "optOut": [
522
+ {
523
+ "click": "#manage_cookie_preferences"
524
+ },
525
+ {
526
+ "click": "#cookie_consent_preferences input:checked",
527
+ "all": true,
528
+ "optional": true
529
+ },
530
+ {
531
+ "click": "#consent_save"
532
+ }
533
+ ],
534
+ "test": [
535
+ {
536
+ "eval": "document.cookie.includes('ctc_rejected=1')"
537
+ }
538
+ ]
539
+ },
540
+ {
541
+ "name": "coinbase",
542
+ "intermediate": false,
543
+ "runContext": {
544
+ "frame": true,
545
+ "main": true
546
+ },
547
+ "prehideSelectors": [],
548
+ "detectCmp": [
549
+ {
550
+ "exists": "div[class^=CookieBannerContent__Container]"
551
+ }
552
+ ],
553
+ "detectPopup": [
554
+ {
555
+ "visible": "div[class^=CookieBannerContent__Container]"
556
+ }
557
+ ],
558
+ "optIn": [
559
+ {
560
+ "click": "div[class^=CookieBannerContent__CTA] :nth-last-child(1)"
561
+ }
562
+ ],
563
+ "optOut": [
564
+ {
565
+ "click": "button[class^=CookieBannerContent__Settings]"
566
+ },
567
+ {
568
+ "click": "div[class^=CookiePreferencesModal__CategoryContainer] input:checked",
569
+ "all": true,
570
+ "optional": true
571
+ },
572
+ {
573
+ "click": "div[class^=CookiePreferencesModal__ButtonContainer] > button"
574
+ }
575
+ ],
576
+ "test": [
577
+ {
578
+ "eval": "JSON.parse(decodeURIComponent(document.cookie.match(/cm_eu_preferences=([0-9a-zA-Z\\{\\}\\[\\]%:]*);?/)[1])).consent.length <= 1"
579
+ }
580
+ ]
581
+ },
496
582
  {
497
583
  "name": "Complianz banner",
498
584
  "prehideSelectors": [
@@ -1612,6 +1698,55 @@
1612
1698
  }
1613
1699
  ]
1614
1700
  },
1701
+ {
1702
+ "name": "ketch",
1703
+ "runContext": {
1704
+ "frame": false,
1705
+ "main": true
1706
+ },
1707
+ "intermediate": false,
1708
+ "prehideSelectors": [
1709
+ "#lanyard_root div[role='dialog']"
1710
+ ],
1711
+ "detectCmp": [
1712
+ {
1713
+ "exists": "#lanyard_root div[role='dialog']"
1714
+ }
1715
+ ],
1716
+ "detectPopup": [
1717
+ {
1718
+ "visible": "#lanyard_root div[role='dialog']"
1719
+ }
1720
+ ],
1721
+ "optIn": [
1722
+ {
1723
+ "click": "#lanyard_root button[class^='link']",
1724
+ "optional": true
1725
+ },
1726
+ {
1727
+ "wait": 500
1728
+ },
1729
+ {
1730
+ "waitForThenClick": "div[class^='buttons'] > :nth-child(2)"
1731
+ },
1732
+ {
1733
+ "click": "#lanyard_root button[class*='confirmButton']"
1734
+ }
1735
+ ],
1736
+ "optOut": [
1737
+ {
1738
+ "click": "#lanyard_root button[class^='link']",
1739
+ "optional": true
1740
+ },
1741
+ {
1742
+ "waitForThenClick": "#lanyard_root button[class*='rejectButton']"
1743
+ },
1744
+ {
1745
+ "click": "#lanyard_root button[class*='confirmButton']"
1746
+ }
1747
+ ],
1748
+ "test": []
1749
+ },
1615
1750
  {
1616
1751
  "name": "linkedin.com",
1617
1752
  "prehideSelectors": [
@@ -2687,6 +2822,46 @@
2687
2822
  }
2688
2823
  ]
2689
2824
  },
2825
+ {
2826
+ "name": "Test page cosmetic CMP",
2827
+ "cosmetic": true,
2828
+ "prehideSelectors": [
2829
+ "#privacy-test-page-cmp-test-prehide"
2830
+ ],
2831
+ "detectCmp": [
2832
+ {
2833
+ "exists": "#privacy-test-page-cmp-test-banner"
2834
+ }
2835
+ ],
2836
+ "detectPopup": [
2837
+ {
2838
+ "visible": "#privacy-test-page-cmp-test-banner"
2839
+ }
2840
+ ],
2841
+ "optIn": [
2842
+ {
2843
+ "waitFor": "#accept-all"
2844
+ },
2845
+ {
2846
+ "click": "#accept-all"
2847
+ }
2848
+ ],
2849
+ "optOut": [
2850
+ {
2851
+ "hide": [
2852
+ "#privacy-test-page-cmp-test-banner"
2853
+ ]
2854
+ }
2855
+ ],
2856
+ "test": [
2857
+ {
2858
+ "wait": 500
2859
+ },
2860
+ {
2861
+ "eval": "window.results.results[0] === 'banner_hidden'"
2862
+ }
2863
+ ]
2864
+ },
2690
2865
  {
2691
2866
  "name": "Test page CMP",
2692
2867
  "prehideSelectors": [
@@ -2776,6 +2951,43 @@
2776
2951
  }
2777
2952
  ]
2778
2953
  },
2954
+ {
2955
+ "name": "theverge",
2956
+ "runContext": {
2957
+ "frame": false,
2958
+ "main": true
2959
+ },
2960
+ "intermediate": false,
2961
+ "prehideSelectors": [
2962
+ ".duet--cta--cookie-banner"
2963
+ ],
2964
+ "detectCmp": [
2965
+ {
2966
+ "exists": ".duet--cta--cookie-banner"
2967
+ }
2968
+ ],
2969
+ "detectPopup": [
2970
+ {
2971
+ "visible": ".duet--cta--cookie-banner"
2972
+ }
2973
+ ],
2974
+ "optIn": [
2975
+ {
2976
+ "click": ".duet--cta--cookie-banner button.tracking-12",
2977
+ "all": false
2978
+ }
2979
+ ],
2980
+ "optOut": [
2981
+ {
2982
+ "click": ".duet--cta--cookie-banner button.tracking-12 > span"
2983
+ }
2984
+ ],
2985
+ "test": [
2986
+ {
2987
+ "eval": "document.cookie.includes('_duet_gdpr_acknowledged=1')"
2988
+ }
2989
+ ]
2990
+ },
2779
2991
  {
2780
2992
  "name": "twitter",
2781
2993
  "runContext": {