@duckduckgo/autoconsent 10.3.2 → 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 +14 -0
- package/dist/addon-firefox/content.bundle.js +61 -8
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +43 -35
- package/dist/addon-mv3/content.bundle.js +61 -8
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +43 -35
- package/dist/autoconsent.cjs.js +61 -8
- package/dist/autoconsent.esm.js +61 -8
- package/dist/autoconsent.playwright.js +1 -1
- package/dist/autoconsent.unit.js +104 -43
- package/lib/cmps/all.ts +2 -1
- package/lib/cmps/sourcepoint-frame.ts +1 -1
- package/lib/cmps/tumblr-com.ts +65 -0
- package/lib/web.ts +4 -6
- package/package.json +1 -1
- package/rules/autoconsent/canva.json +3 -2
- package/rules/autoconsent/cookie-script.json +14 -1
- package/rules/autoconsent/csu-landtag-de.json +1 -1
- package/rules/autoconsent/onlyFans.json +12 -3
- package/rules/rules.json +43 -35
- package/rules/autoconsent/tumblr-com.json +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
1
15
|
# v10.3.2 (Wed Mar 20 2024)
|
|
2
16
|
|
|
3
17
|
#### 🐛 Bug Fix
|
|
@@ -1212,7 +1212,7 @@
|
|
|
1212
1212
|
this.ccpaNotice = false;
|
|
1213
1213
|
this.ccpaPopup = false;
|
|
1214
1214
|
this.runContext = {
|
|
1215
|
-
main:
|
|
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)) {
|
|
@@ -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=\"
|
|
972
|
+
"waitFor": "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]"
|
|
973
973
|
},
|
|
974
974
|
{
|
|
975
|
-
"
|
|
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
|
-
"
|
|
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
|
|
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
|
-
"
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
"
|
|
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
|
},
|
|
@@ -6106,33 +6141,6 @@
|
|
|
6106
6141
|
}
|
|
6107
6142
|
]
|
|
6108
6143
|
},
|
|
6109
|
-
{
|
|
6110
|
-
"name": "tumblr-com",
|
|
6111
|
-
"cosmetic": true,
|
|
6112
|
-
"prehideSelectors": [
|
|
6113
|
-
"#cmp-app-container"
|
|
6114
|
-
],
|
|
6115
|
-
"detectCmp": [
|
|
6116
|
-
{
|
|
6117
|
-
"exists": "#cmp-app-container"
|
|
6118
|
-
}
|
|
6119
|
-
],
|
|
6120
|
-
"detectPopup": [
|
|
6121
|
-
{
|
|
6122
|
-
"visible": "#cmp-app-container"
|
|
6123
|
-
}
|
|
6124
|
-
],
|
|
6125
|
-
"optIn": [
|
|
6126
|
-
{
|
|
6127
|
-
"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"
|
|
6128
|
-
}
|
|
6129
|
-
],
|
|
6130
|
-
"optOut": [
|
|
6131
|
-
{
|
|
6132
|
-
"hide": "#cmp-app-container"
|
|
6133
|
-
}
|
|
6134
|
-
]
|
|
6135
|
-
},
|
|
6136
6144
|
{
|
|
6137
6145
|
"name": "twitch-mobile",
|
|
6138
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:
|
|
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)) {
|
|
@@ -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=\"
|
|
972
|
+
"waitFor": "div[role=\"dialog\"] a[data-anchor-id=\"cookie-policy\"]"
|
|
973
973
|
},
|
|
974
974
|
{
|
|
975
|
-
"
|
|
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
|
-
"
|
|
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
|
|
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
|
-
"
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
"
|
|
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
|
},
|
|
@@ -6106,33 +6141,6 @@
|
|
|
6106
6141
|
}
|
|
6107
6142
|
]
|
|
6108
6143
|
},
|
|
6109
|
-
{
|
|
6110
|
-
"name": "tumblr-com",
|
|
6111
|
-
"cosmetic": true,
|
|
6112
|
-
"prehideSelectors": [
|
|
6113
|
-
"#cmp-app-container"
|
|
6114
|
-
],
|
|
6115
|
-
"detectCmp": [
|
|
6116
|
-
{
|
|
6117
|
-
"exists": "#cmp-app-container"
|
|
6118
|
-
}
|
|
6119
|
-
],
|
|
6120
|
-
"detectPopup": [
|
|
6121
|
-
{
|
|
6122
|
-
"visible": "#cmp-app-container"
|
|
6123
|
-
}
|
|
6124
|
-
],
|
|
6125
|
-
"optIn": [
|
|
6126
|
-
{
|
|
6127
|
-
"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"
|
|
6128
|
-
}
|
|
6129
|
-
],
|
|
6130
|
-
"optOut": [
|
|
6131
|
-
{
|
|
6132
|
-
"hide": "#cmp-app-container"
|
|
6133
|
-
}
|
|
6134
|
-
]
|
|
6135
|
-
},
|
|
6136
6144
|
{
|
|
6137
6145
|
"name": "twitch-mobile",
|
|
6138
6146
|
"vendorUrl": "https://m.twitch.tv/",
|
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -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:
|
|
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)) {
|
package/dist/autoconsent.esm.js
CHANGED
|
@@ -1210,7 +1210,7 @@ var SourcePoint = class extends AutoConsentCMPBase {
|
|
|
1210
1210
|
this.ccpaNotice = false;
|
|
1211
1211
|
this.ccpaPopup = false;
|
|
1212
1212
|
this.runContext = {
|
|
1213
|
-
main:
|
|
1213
|
+
main: true,
|
|
1214
1214
|
frame: true
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
@@ -1750,6 +1750,63 @@ var Airbnb = class extends AutoConsentCMPBase {
|
|
|
1750
1750
|
}
|
|
1751
1751
|
};
|
|
1752
1752
|
|
|
1753
|
+
// lib/cmps/tumblr-com.ts
|
|
1754
|
+
var Tumblr = class extends AutoConsentCMPBase {
|
|
1755
|
+
constructor() {
|
|
1756
|
+
super(...arguments);
|
|
1757
|
+
this.name = "tumblr-com";
|
|
1758
|
+
this.runContext = {
|
|
1759
|
+
"urlPattern": "^https://(www\\.)?tumblr\\.com/"
|
|
1760
|
+
};
|
|
1761
|
+
}
|
|
1762
|
+
get hasSelfTest() {
|
|
1763
|
+
return false;
|
|
1764
|
+
}
|
|
1765
|
+
get isIntermediate() {
|
|
1766
|
+
return false;
|
|
1767
|
+
}
|
|
1768
|
+
get isCosmetic() {
|
|
1769
|
+
return false;
|
|
1770
|
+
}
|
|
1771
|
+
get prehideSelectors() {
|
|
1772
|
+
return ["#cmp-app-container"];
|
|
1773
|
+
}
|
|
1774
|
+
async detectCmp() {
|
|
1775
|
+
return this.elementExists("#cmp-app-container");
|
|
1776
|
+
}
|
|
1777
|
+
async detectPopup() {
|
|
1778
|
+
return this.elementVisible("#cmp-app-container", "any");
|
|
1779
|
+
}
|
|
1780
|
+
async optOut() {
|
|
1781
|
+
let iframe = document.querySelector("#cmp-app-container iframe");
|
|
1782
|
+
let settingsButton = iframe.contentDocument?.querySelector(".cmp-components-button.is-secondary");
|
|
1783
|
+
if (!settingsButton) {
|
|
1784
|
+
return false;
|
|
1785
|
+
}
|
|
1786
|
+
settingsButton.click();
|
|
1787
|
+
await waitFor(() => {
|
|
1788
|
+
const iframe2 = document.querySelector("#cmp-app-container iframe");
|
|
1789
|
+
return !!iframe2.contentDocument?.querySelector(".cmp__dialog input");
|
|
1790
|
+
}, 5, 500);
|
|
1791
|
+
iframe = document.querySelector("#cmp-app-container iframe");
|
|
1792
|
+
settingsButton = iframe.contentDocument?.querySelector(".cmp-components-button.is-secondary");
|
|
1793
|
+
if (!settingsButton) {
|
|
1794
|
+
return false;
|
|
1795
|
+
}
|
|
1796
|
+
settingsButton.click();
|
|
1797
|
+
return true;
|
|
1798
|
+
}
|
|
1799
|
+
async optIn() {
|
|
1800
|
+
const iframe = document.querySelector("#cmp-app-container iframe");
|
|
1801
|
+
const acceptButton = iframe.contentDocument.querySelector(".cmp-components-button.is-primary");
|
|
1802
|
+
if (acceptButton) {
|
|
1803
|
+
acceptButton.click();
|
|
1804
|
+
return true;
|
|
1805
|
+
}
|
|
1806
|
+
return false;
|
|
1807
|
+
}
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1753
1810
|
// lib/cmps/all.ts
|
|
1754
1811
|
var dynamicCMPs = [
|
|
1755
1812
|
TrustArcTop,
|
|
@@ -1763,7 +1820,8 @@ var dynamicCMPs = [
|
|
|
1763
1820
|
Uniconsent,
|
|
1764
1821
|
Conversant,
|
|
1765
1822
|
Tiktok,
|
|
1766
|
-
Airbnb
|
|
1823
|
+
Airbnb,
|
|
1824
|
+
Tumblr
|
|
1767
1825
|
];
|
|
1768
1826
|
|
|
1769
1827
|
// lib/dom-actions.ts
|
|
@@ -2238,12 +2296,7 @@ var AutoConsent = class {
|
|
|
2238
2296
|
const globalHidden = [
|
|
2239
2297
|
"#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"
|
|
2240
2298
|
];
|
|
2241
|
-
const selectors = this.rules.reduce((selectorList, rule) =>
|
|
2242
|
-
if (rule.prehideSelectors) {
|
|
2243
|
-
return [...selectorList, ...rule.prehideSelectors];
|
|
2244
|
-
}
|
|
2245
|
-
return selectorList;
|
|
2246
|
-
}, globalHidden);
|
|
2299
|
+
const selectors = this.rules.filter((rule) => rule.prehideSelectors && rule.checkRunContext()).reduce((selectorList, rule) => [...selectorList, ...rule.prehideSelectors], globalHidden);
|
|
2247
2300
|
this.updateState({ prehideOn: true });
|
|
2248
2301
|
setTimeout(() => {
|
|
2249
2302
|
if (this.config.enablePrehide && this.state.prehideOn && !["runningOptOut", "runningOptIn"].includes(this.state.lifecycle)) {
|