@duckduckgo/autoconsent 10.3.1 → 10.4.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 CHANGED
@@ -1,3 +1,29 @@
1
+ # v10.4.0 (Tue Mar 26 2024)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Check runcontext for prehide selectors. [#400](https://github.com/duckduckgo/autoconsent/pull/400) ([@sammacbeth](https://github.com/sammacbeth))
6
+ - Fix rules for tumblr.com, onlyfans, canva.com, cookie-script [#395](https://github.com/duckduckgo/autoconsent/pull/395) ([@muodov](https://github.com/muodov))
7
+
8
+ #### Authors: 2
9
+
10
+ - Maxim Tsoy ([@muodov](https://github.com/muodov))
11
+ - Sam Macbeth ([@sammacbeth](https://github.com/sammacbeth))
12
+
13
+ ---
14
+
15
+ # v10.3.2 (Wed Mar 20 2024)
16
+
17
+ #### 🐛 Bug Fix
18
+
19
+ - fix: outdated strato.de [#399](https://github.com/duckduckgo/autoconsent/pull/399) ([@seia-soto](https://github.com/seia-soto))
20
+
21
+ #### Authors: 1
22
+
23
+ - HoJeong Go ([@seia-soto](https://github.com/seia-soto))
24
+
25
+ ---
26
+
1
27
  # v10.3.1 (Fri Mar 15 2024)
2
28
 
3
29
  #### 🐛 Bug Fix
@@ -1212,7 +1212,7 @@
1212
1212
  this.ccpaNotice = false;
1213
1213
  this.ccpaPopup = false;
1214
1214
  this.runContext = {
1215
- main: false,
1215
+ main: true,
1216
1216
  frame: true
1217
1217
  };
1218
1218
  }
@@ -1752,6 +1752,63 @@
1752
1752
  }
1753
1753
  };
1754
1754
 
1755
+ // lib/cmps/tumblr-com.ts
1756
+ var Tumblr = class extends AutoConsentCMPBase {
1757
+ constructor() {
1758
+ super(...arguments);
1759
+ this.name = "tumblr-com";
1760
+ this.runContext = {
1761
+ "urlPattern": "^https://(www\\.)?tumblr\\.com/"
1762
+ };
1763
+ }
1764
+ get hasSelfTest() {
1765
+ return false;
1766
+ }
1767
+ get isIntermediate() {
1768
+ return false;
1769
+ }
1770
+ get isCosmetic() {
1771
+ return false;
1772
+ }
1773
+ get prehideSelectors() {
1774
+ return ["#cmp-app-container"];
1775
+ }
1776
+ async detectCmp() {
1777
+ return this.elementExists("#cmp-app-container");
1778
+ }
1779
+ async detectPopup() {
1780
+ return this.elementVisible("#cmp-app-container", "any");
1781
+ }
1782
+ async optOut() {
1783
+ let iframe = document.querySelector("#cmp-app-container iframe");
1784
+ let settingsButton = iframe.contentDocument?.querySelector(".cmp-components-button.is-secondary");
1785
+ if (!settingsButton) {
1786
+ return false;
1787
+ }
1788
+ settingsButton.click();
1789
+ await waitFor(() => {
1790
+ const iframe2 = document.querySelector("#cmp-app-container iframe");
1791
+ return !!iframe2.contentDocument?.querySelector(".cmp__dialog input");
1792
+ }, 5, 500);
1793
+ iframe = document.querySelector("#cmp-app-container iframe");
1794
+ settingsButton = iframe.contentDocument?.querySelector(".cmp-components-button.is-secondary");
1795
+ if (!settingsButton) {
1796
+ return false;
1797
+ }
1798
+ settingsButton.click();
1799
+ return true;
1800
+ }
1801
+ async optIn() {
1802
+ const iframe = document.querySelector("#cmp-app-container iframe");
1803
+ const acceptButton = iframe.contentDocument.querySelector(".cmp-components-button.is-primary");
1804
+ if (acceptButton) {
1805
+ acceptButton.click();
1806
+ return true;
1807
+ }
1808
+ return false;
1809
+ }
1810
+ };
1811
+
1755
1812
  // lib/cmps/all.ts
1756
1813
  var dynamicCMPs = [
1757
1814
  TrustArcTop,
@@ -1765,7 +1822,8 @@
1765
1822
  Uniconsent,
1766
1823
  Conversant,
1767
1824
  Tiktok,
1768
- Airbnb
1825
+ Airbnb,
1826
+ Tumblr
1769
1827
  ];
1770
1828
 
1771
1829
  // lib/dom-actions.ts
@@ -2240,12 +2298,7 @@
2240
2298
  const globalHidden = [
2241
2299
  "#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"
2242
2300
  ];
2243
- const selectors = this.rules.reduce((selectorList, rule) => {
2244
- if (rule.prehideSelectors) {
2245
- return [...selectorList, ...rule.prehideSelectors];
2246
- }
2247
- return selectorList;
2248
- }, globalHidden);
2301
+ const selectors = this.rules.filter((rule) => rule.prehideSelectors && rule.checkRunContext()).reduce((selectorList, rule) => [...selectorList, ...rule.prehideSelectors], globalHidden);
2249
2302
  this.updateState({ prehideOn: true });
2250
2303
  setTimeout(() => {
2251
2304
  if (this.config.enablePrehide && this.state.prehideOn && !["runningOptOut", "runningOptIn"].includes(this.state.lifecycle)) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 2,
3
3
  "name": "Autoconsent",
4
- "version": "2024.3.15",
4
+ "version": "2024.3.20",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"
@@ -969,10 +969,13 @@
969
969
  "click": "div[role=\"dialog\"] button:nth-child(2)"
970
970
  },
971
971
  {
972
- "waitFor": "div[role=\"dialog\"] a[data-anchor-id=\"privacy-policy\"]"
972
+ "waitFor": "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]"
973
973
  },
974
974
  {
975
- "click": "div[role=\"dialog\"] button:nth-child(2)"
975
+ "waitFor": "div[role=\"dialog\"] button[role=switch]"
976
+ },
977
+ {
978
+ "click": "div[role=\"dialog\"] button:nth-child(2):not([role])"
976
979
  },
977
980
  {
978
981
  "click": "div[role=\"dialog\"] div:last-child button:only-child"
@@ -1740,7 +1743,28 @@
1740
1743
  ],
1741
1744
  "optOut": [
1742
1745
  {
1743
- "click": "#cookiescript_reject"
1746
+ "if": {
1747
+ "exists": "#cookiescript_reject"
1748
+ },
1749
+ "then": [
1750
+ {
1751
+ "wait": 100
1752
+ },
1753
+ {
1754
+ "click": "#cookiescript_reject"
1755
+ }
1756
+ ],
1757
+ "else": [
1758
+ {
1759
+ "click": "#cookiescript_manage"
1760
+ },
1761
+ {
1762
+ "waitForVisible": ".cookiescript_fsd_main"
1763
+ },
1764
+ {
1765
+ "waitForThenClick": "#cookiescript_reject"
1766
+ }
1767
+ ]
1744
1768
  }
1745
1769
  ],
1746
1770
  "optIn": [
@@ -2110,7 +2134,7 @@
2110
2134
  {
2111
2135
  "name": "csu-landtag-de",
2112
2136
  "runContext": {
2113
- "urlPattern": "^https://(www|)?\\.csu-landtag\\.de"
2137
+ "urlPattern": "^https://(www\\.|)?csu-landtag\\.de"
2114
2138
  },
2115
2139
  "prehideSelectors": [
2116
2140
  "#cookie-disclaimer"
@@ -4337,6 +4361,9 @@
4337
4361
  },
4338
4362
  {
4339
4363
  "name": "onlyFans.com",
4364
+ "runContext": {
4365
+ "urlPattern": "^https://onlyfans\\.com/"
4366
+ },
4340
4367
  "prehideSelectors": [
4341
4368
  "div.b-cookies-informer"
4342
4369
  ],
@@ -4360,10 +4387,18 @@
4360
4387
  "click": "div.b-cookies-informer__nav > button:nth-child(1)"
4361
4388
  },
4362
4389
  {
4363
- "click": "div.b-cookies-informer__switchers > div:nth-child(2) > div[at-attr=\"checkbox\"] > span.b-input-radio__container > input[type=\"checkbox\"]"
4364
- },
4365
- {
4366
- "click": "div.b-cookies-informer__nav > button"
4390
+ "if": {
4391
+ "exists": "div.b-cookies-informer__switchers"
4392
+ },
4393
+ "then": [
4394
+ {
4395
+ "click": "div.b-cookies-informer__switchers input:not([disabled])",
4396
+ "all": true
4397
+ },
4398
+ {
4399
+ "click": "div.b-cookies-informer__nav > button"
4400
+ }
4401
+ ]
4367
4402
  }
4368
4403
  ]
4369
4404
  },
@@ -5297,33 +5332,32 @@
5297
5332
  {
5298
5333
  "name": "strato.de",
5299
5334
  "prehideSelectors": [
5300
- "#cookie_initial_modal",
5301
- ".modal-backdrop"
5335
+ ".consent__wrapper"
5302
5336
  ],
5303
5337
  "runContext": {
5304
5338
  "urlPattern": "^https://www\\.strato\\.de/"
5305
5339
  },
5306
5340
  "detectCmp": [
5307
5341
  {
5308
- "exists": "#cookie_initial_modal"
5342
+ "exists": ".consent"
5309
5343
  }
5310
5344
  ],
5311
5345
  "detectPopup": [
5312
5346
  {
5313
- "visible": "#cookie_initial_modal"
5347
+ "visible": ".consent"
5314
5348
  }
5315
5349
  ],
5316
5350
  "optIn": [
5317
5351
  {
5318
- "click": "button#jss_consent_all_initial_modal"
5352
+ "click": "button.consentAgree"
5319
5353
  }
5320
5354
  ],
5321
5355
  "optOut": [
5322
5356
  {
5323
- "click": "button#jss_open_settings_modal"
5357
+ "click": "button.consentSettings"
5324
5358
  },
5325
5359
  {
5326
- "click": "button#jss_consent_checked"
5360
+ "waitForThenClick": "button#consentSubmit"
5327
5361
  }
5328
5362
  ]
5329
5363
  },
@@ -6107,33 +6141,6 @@
6107
6141
  }
6108
6142
  ]
6109
6143
  },
6110
- {
6111
- "name": "tumblr-com",
6112
- "cosmetic": true,
6113
- "prehideSelectors": [
6114
- "#cmp-app-container"
6115
- ],
6116
- "detectCmp": [
6117
- {
6118
- "exists": "#cmp-app-container"
6119
- }
6120
- ],
6121
- "detectPopup": [
6122
- {
6123
- "visible": "#cmp-app-container"
6124
- }
6125
- ],
6126
- "optIn": [
6127
- {
6128
- "click": "#tumblr #cmp-app-container div.components-modal__frame > iframe > html body > div > div > div.cmp__dialog-footer > div > button.components-button.white-space-normal.is-primary"
6129
- }
6130
- ],
6131
- "optOut": [
6132
- {
6133
- "hide": "#cmp-app-container"
6134
- }
6135
- ]
6136
- },
6137
6144
  {
6138
6145
  "name": "twitch-mobile",
6139
6146
  "vendorUrl": "https://m.twitch.tv/",
@@ -1212,7 +1212,7 @@
1212
1212
  this.ccpaNotice = false;
1213
1213
  this.ccpaPopup = false;
1214
1214
  this.runContext = {
1215
- main: false,
1215
+ main: true,
1216
1216
  frame: true
1217
1217
  };
1218
1218
  }
@@ -1752,6 +1752,63 @@
1752
1752
  }
1753
1753
  };
1754
1754
 
1755
+ // lib/cmps/tumblr-com.ts
1756
+ var Tumblr = class extends AutoConsentCMPBase {
1757
+ constructor() {
1758
+ super(...arguments);
1759
+ this.name = "tumblr-com";
1760
+ this.runContext = {
1761
+ "urlPattern": "^https://(www\\.)?tumblr\\.com/"
1762
+ };
1763
+ }
1764
+ get hasSelfTest() {
1765
+ return false;
1766
+ }
1767
+ get isIntermediate() {
1768
+ return false;
1769
+ }
1770
+ get isCosmetic() {
1771
+ return false;
1772
+ }
1773
+ get prehideSelectors() {
1774
+ return ["#cmp-app-container"];
1775
+ }
1776
+ async detectCmp() {
1777
+ return this.elementExists("#cmp-app-container");
1778
+ }
1779
+ async detectPopup() {
1780
+ return this.elementVisible("#cmp-app-container", "any");
1781
+ }
1782
+ async optOut() {
1783
+ let iframe = document.querySelector("#cmp-app-container iframe");
1784
+ let settingsButton = iframe.contentDocument?.querySelector(".cmp-components-button.is-secondary");
1785
+ if (!settingsButton) {
1786
+ return false;
1787
+ }
1788
+ settingsButton.click();
1789
+ await waitFor(() => {
1790
+ const iframe2 = document.querySelector("#cmp-app-container iframe");
1791
+ return !!iframe2.contentDocument?.querySelector(".cmp__dialog input");
1792
+ }, 5, 500);
1793
+ iframe = document.querySelector("#cmp-app-container iframe");
1794
+ settingsButton = iframe.contentDocument?.querySelector(".cmp-components-button.is-secondary");
1795
+ if (!settingsButton) {
1796
+ return false;
1797
+ }
1798
+ settingsButton.click();
1799
+ return true;
1800
+ }
1801
+ async optIn() {
1802
+ const iframe = document.querySelector("#cmp-app-container iframe");
1803
+ const acceptButton = iframe.contentDocument.querySelector(".cmp-components-button.is-primary");
1804
+ if (acceptButton) {
1805
+ acceptButton.click();
1806
+ return true;
1807
+ }
1808
+ return false;
1809
+ }
1810
+ };
1811
+
1755
1812
  // lib/cmps/all.ts
1756
1813
  var dynamicCMPs = [
1757
1814
  TrustArcTop,
@@ -1765,7 +1822,8 @@
1765
1822
  Uniconsent,
1766
1823
  Conversant,
1767
1824
  Tiktok,
1768
- Airbnb
1825
+ Airbnb,
1826
+ Tumblr
1769
1827
  ];
1770
1828
 
1771
1829
  // lib/dom-actions.ts
@@ -2240,12 +2298,7 @@
2240
2298
  const globalHidden = [
2241
2299
  "#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"
2242
2300
  ];
2243
- const selectors = this.rules.reduce((selectorList, rule) => {
2244
- if (rule.prehideSelectors) {
2245
- return [...selectorList, ...rule.prehideSelectors];
2246
- }
2247
- return selectorList;
2248
- }, globalHidden);
2301
+ const selectors = this.rules.filter((rule) => rule.prehideSelectors && rule.checkRunContext()).reduce((selectorList, rule) => [...selectorList, ...rule.prehideSelectors], globalHidden);
2249
2302
  this.updateState({ prehideOn: true });
2250
2303
  setTimeout(() => {
2251
2304
  if (this.config.enablePrehide && this.state.prehideOn && !["runningOptOut", "runningOptIn"].includes(this.state.lifecycle)) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2024.3.15",
4
+ "version": "2024.3.20",
5
5
  "background": {
6
6
  "service_worker": "background.bundle.js"
7
7
  },
@@ -969,10 +969,13 @@
969
969
  "click": "div[role=\"dialog\"] button:nth-child(2)"
970
970
  },
971
971
  {
972
- "waitFor": "div[role=\"dialog\"] a[data-anchor-id=\"privacy-policy\"]"
972
+ "waitFor": "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]"
973
973
  },
974
974
  {
975
- "click": "div[role=\"dialog\"] button:nth-child(2)"
975
+ "waitFor": "div[role=\"dialog\"] button[role=switch]"
976
+ },
977
+ {
978
+ "click": "div[role=\"dialog\"] button:nth-child(2):not([role])"
976
979
  },
977
980
  {
978
981
  "click": "div[role=\"dialog\"] div:last-child button:only-child"
@@ -1740,7 +1743,28 @@
1740
1743
  ],
1741
1744
  "optOut": [
1742
1745
  {
1743
- "click": "#cookiescript_reject"
1746
+ "if": {
1747
+ "exists": "#cookiescript_reject"
1748
+ },
1749
+ "then": [
1750
+ {
1751
+ "wait": 100
1752
+ },
1753
+ {
1754
+ "click": "#cookiescript_reject"
1755
+ }
1756
+ ],
1757
+ "else": [
1758
+ {
1759
+ "click": "#cookiescript_manage"
1760
+ },
1761
+ {
1762
+ "waitForVisible": ".cookiescript_fsd_main"
1763
+ },
1764
+ {
1765
+ "waitForThenClick": "#cookiescript_reject"
1766
+ }
1767
+ ]
1744
1768
  }
1745
1769
  ],
1746
1770
  "optIn": [
@@ -2110,7 +2134,7 @@
2110
2134
  {
2111
2135
  "name": "csu-landtag-de",
2112
2136
  "runContext": {
2113
- "urlPattern": "^https://(www|)?\\.csu-landtag\\.de"
2137
+ "urlPattern": "^https://(www\\.|)?csu-landtag\\.de"
2114
2138
  },
2115
2139
  "prehideSelectors": [
2116
2140
  "#cookie-disclaimer"
@@ -4337,6 +4361,9 @@
4337
4361
  },
4338
4362
  {
4339
4363
  "name": "onlyFans.com",
4364
+ "runContext": {
4365
+ "urlPattern": "^https://onlyfans\\.com/"
4366
+ },
4340
4367
  "prehideSelectors": [
4341
4368
  "div.b-cookies-informer"
4342
4369
  ],
@@ -4360,10 +4387,18 @@
4360
4387
  "click": "div.b-cookies-informer__nav > button:nth-child(1)"
4361
4388
  },
4362
4389
  {
4363
- "click": "div.b-cookies-informer__switchers > div:nth-child(2) > div[at-attr=\"checkbox\"] > span.b-input-radio__container > input[type=\"checkbox\"]"
4364
- },
4365
- {
4366
- "click": "div.b-cookies-informer__nav > button"
4390
+ "if": {
4391
+ "exists": "div.b-cookies-informer__switchers"
4392
+ },
4393
+ "then": [
4394
+ {
4395
+ "click": "div.b-cookies-informer__switchers input:not([disabled])",
4396
+ "all": true
4397
+ },
4398
+ {
4399
+ "click": "div.b-cookies-informer__nav > button"
4400
+ }
4401
+ ]
4367
4402
  }
4368
4403
  ]
4369
4404
  },
@@ -5297,33 +5332,32 @@
5297
5332
  {
5298
5333
  "name": "strato.de",
5299
5334
  "prehideSelectors": [
5300
- "#cookie_initial_modal",
5301
- ".modal-backdrop"
5335
+ ".consent__wrapper"
5302
5336
  ],
5303
5337
  "runContext": {
5304
5338
  "urlPattern": "^https://www\\.strato\\.de/"
5305
5339
  },
5306
5340
  "detectCmp": [
5307
5341
  {
5308
- "exists": "#cookie_initial_modal"
5342
+ "exists": ".consent"
5309
5343
  }
5310
5344
  ],
5311
5345
  "detectPopup": [
5312
5346
  {
5313
- "visible": "#cookie_initial_modal"
5347
+ "visible": ".consent"
5314
5348
  }
5315
5349
  ],
5316
5350
  "optIn": [
5317
5351
  {
5318
- "click": "button#jss_consent_all_initial_modal"
5352
+ "click": "button.consentAgree"
5319
5353
  }
5320
5354
  ],
5321
5355
  "optOut": [
5322
5356
  {
5323
- "click": "button#jss_open_settings_modal"
5357
+ "click": "button.consentSettings"
5324
5358
  },
5325
5359
  {
5326
- "click": "button#jss_consent_checked"
5360
+ "waitForThenClick": "button#consentSubmit"
5327
5361
  }
5328
5362
  ]
5329
5363
  },
@@ -6107,33 +6141,6 @@
6107
6141
  }
6108
6142
  ]
6109
6143
  },
6110
- {
6111
- "name": "tumblr-com",
6112
- "cosmetic": true,
6113
- "prehideSelectors": [
6114
- "#cmp-app-container"
6115
- ],
6116
- "detectCmp": [
6117
- {
6118
- "exists": "#cmp-app-container"
6119
- }
6120
- ],
6121
- "detectPopup": [
6122
- {
6123
- "visible": "#cmp-app-container"
6124
- }
6125
- ],
6126
- "optIn": [
6127
- {
6128
- "click": "#tumblr #cmp-app-container div.components-modal__frame > iframe > html body > div > div > div.cmp__dialog-footer > div > button.components-button.white-space-normal.is-primary"
6129
- }
6130
- ],
6131
- "optOut": [
6132
- {
6133
- "hide": "#cmp-app-container"
6134
- }
6135
- ]
6136
- },
6137
6144
  {
6138
6145
  "name": "twitch-mobile",
6139
6146
  "vendorUrl": "https://m.twitch.tv/",
@@ -1235,7 +1235,7 @@ var SourcePoint = class extends AutoConsentCMPBase {
1235
1235
  this.ccpaNotice = false;
1236
1236
  this.ccpaPopup = false;
1237
1237
  this.runContext = {
1238
- main: false,
1238
+ main: true,
1239
1239
  frame: true
1240
1240
  };
1241
1241
  }
@@ -1775,6 +1775,63 @@ var Airbnb = class extends AutoConsentCMPBase {
1775
1775
  }
1776
1776
  };
1777
1777
 
1778
+ // lib/cmps/tumblr-com.ts
1779
+ var Tumblr = class extends AutoConsentCMPBase {
1780
+ constructor() {
1781
+ super(...arguments);
1782
+ this.name = "tumblr-com";
1783
+ this.runContext = {
1784
+ "urlPattern": "^https://(www\\.)?tumblr\\.com/"
1785
+ };
1786
+ }
1787
+ get hasSelfTest() {
1788
+ return false;
1789
+ }
1790
+ get isIntermediate() {
1791
+ return false;
1792
+ }
1793
+ get isCosmetic() {
1794
+ return false;
1795
+ }
1796
+ get prehideSelectors() {
1797
+ return ["#cmp-app-container"];
1798
+ }
1799
+ async detectCmp() {
1800
+ return this.elementExists("#cmp-app-container");
1801
+ }
1802
+ async detectPopup() {
1803
+ return this.elementVisible("#cmp-app-container", "any");
1804
+ }
1805
+ async optOut() {
1806
+ let iframe = document.querySelector("#cmp-app-container iframe");
1807
+ let settingsButton = iframe.contentDocument?.querySelector(".cmp-components-button.is-secondary");
1808
+ if (!settingsButton) {
1809
+ return false;
1810
+ }
1811
+ settingsButton.click();
1812
+ await waitFor(() => {
1813
+ const iframe2 = document.querySelector("#cmp-app-container iframe");
1814
+ return !!iframe2.contentDocument?.querySelector(".cmp__dialog input");
1815
+ }, 5, 500);
1816
+ iframe = document.querySelector("#cmp-app-container iframe");
1817
+ settingsButton = iframe.contentDocument?.querySelector(".cmp-components-button.is-secondary");
1818
+ if (!settingsButton) {
1819
+ return false;
1820
+ }
1821
+ settingsButton.click();
1822
+ return true;
1823
+ }
1824
+ async optIn() {
1825
+ const iframe = document.querySelector("#cmp-app-container iframe");
1826
+ const acceptButton = iframe.contentDocument.querySelector(".cmp-components-button.is-primary");
1827
+ if (acceptButton) {
1828
+ acceptButton.click();
1829
+ return true;
1830
+ }
1831
+ return false;
1832
+ }
1833
+ };
1834
+
1778
1835
  // lib/cmps/all.ts
1779
1836
  var dynamicCMPs = [
1780
1837
  TrustArcTop,
@@ -1788,7 +1845,8 @@ var dynamicCMPs = [
1788
1845
  Uniconsent,
1789
1846
  Conversant,
1790
1847
  Tiktok,
1791
- Airbnb
1848
+ Airbnb,
1849
+ Tumblr
1792
1850
  ];
1793
1851
 
1794
1852
  // lib/dom-actions.ts
@@ -2263,12 +2321,7 @@ var AutoConsent = class {
2263
2321
  const globalHidden = [
2264
2322
  "#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"
2265
2323
  ];
2266
- const selectors = this.rules.reduce((selectorList, rule) => {
2267
- if (rule.prehideSelectors) {
2268
- return [...selectorList, ...rule.prehideSelectors];
2269
- }
2270
- return selectorList;
2271
- }, globalHidden);
2324
+ const selectors = this.rules.filter((rule) => rule.prehideSelectors && rule.checkRunContext()).reduce((selectorList, rule) => [...selectorList, ...rule.prehideSelectors], globalHidden);
2272
2325
  this.updateState({ prehideOn: true });
2273
2326
  setTimeout(() => {
2274
2327
  if (this.config.enablePrehide && this.state.prehideOn && !["runningOptOut", "runningOptIn"].includes(this.state.lifecycle)) {