@duckduckgo/autoconsent 3.0.0 → 3.0.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/.github/workflows/release.yml +29 -0
- package/CHANGELOG.md +287 -0
- package/dist/addon-firefox/background.bundle.js +1 -1
- package/dist/addon-firefox/content.bundle.js +1 -1
- package/dist/addon-firefox/manifest.json +2 -2
- package/dist/addon-firefox/rules.json +0 -26
- package/dist/addon-mv3/background.bundle.js +1 -1
- package/dist/addon-mv3/content.bundle.js +1 -1
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +0 -26
- package/dist/autoconsent.cjs.js +1 -1
- package/dist/autoconsent.esm.js +1 -1
- package/dist/autoconsent.playwright.js +1 -1
- package/lib/cmps/consentmanager.ts +3 -0
- package/lib/cmps/sourcepoint-frame.ts +4 -2
- package/package.json +14 -3
- package/playwright/runner.ts +22 -15
- package/rules/rules.json +0 -26
- package/tests/sourcepoint.spec.ts +13 -2
- package/rules/autoconsent/asus.json +0 -7
- package/tests/asus.spec.ts +0 -5
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v3
|
|
14
|
+
|
|
15
|
+
- name: Prepare repository
|
|
16
|
+
run: git fetch --unshallow --tags
|
|
17
|
+
|
|
18
|
+
- name: Use Node.js 16.x
|
|
19
|
+
uses: actions/setup-node@v3
|
|
20
|
+
with:
|
|
21
|
+
node-version: 16.x
|
|
22
|
+
|
|
23
|
+
- name: Create Release
|
|
24
|
+
env:
|
|
25
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
27
|
+
run: |
|
|
28
|
+
npm ci
|
|
29
|
+
npm run release
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# v3.0.2 (Fri Nov 04 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Ignore Sourcepoint cookie paywall [#40](https://github.com/duckduckgo/autoconsent/pull/40) ([@sammacbeth](https://github.com/sammacbeth))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Sam Macbeth ([@sammacbeth](https://github.com/sammacbeth))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v3.0.1 (Thu Nov 03 2022)
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug Fix
|
|
16
|
+
|
|
17
|
+
- Use auto to automate releases on PR merge. [#37](https://github.com/duckduckgo/autoconsent/pull/37) ([@sammacbeth](https://github.com/sammacbeth))
|
|
18
|
+
- Remove asus rule [#38](https://github.com/duckduckgo/autoconsent/pull/38) ([@sammacbeth](https://github.com/sammacbeth))
|
|
19
|
+
- Slow down consentmanager popup check to prevent false positive. [#36](https://github.com/duckduckgo/autoconsent/pull/36) ([@sammacbeth](https://github.com/sammacbeth))
|
|
20
|
+
- Fix unwrapping of eval result array. [#33](https://github.com/duckduckgo/autoconsent/pull/33) ([@sammacbeth](https://github.com/sammacbeth))
|
|
21
|
+
- A bunch of site-specific rules + extension improvements [#30](https://github.com/duckduckgo/autoconsent/pull/30) ([@muodov](https://github.com/muodov) [@adewes](https://github.com/adewes))
|
|
22
|
+
- Optin hotfix [#31](https://github.com/duckduckgo/autoconsent/pull/31) ([@muodov](https://github.com/muodov))
|
|
23
|
+
- privacymanager.io + onetrust fix [#28](https://github.com/duckduckgo/autoconsent/pull/28) ([@muodov](https://github.com/muodov))
|
|
24
|
+
- Add rules for Sibbo (CMP) [#24](https://github.com/duckduckgo/autoconsent/pull/24) (arasolofotsara@duckduckgo.com [@icodebyamanda](https://github.com/icodebyamanda))
|
|
25
|
+
- Add rules for Pubtech (CMP) [#25](https://github.com/duckduckgo/autoconsent/pull/25) (arasolofotsara@duckduckgo.com [@icodebyamanda](https://github.com/icodebyamanda))
|
|
26
|
+
- Add more rules for IAB-supporting CMPs [#27](https://github.com/duckduckgo/autoconsent/pull/27) ([@muodov](https://github.com/muodov))
|
|
27
|
+
- Add rules for Axeptio (CMP) [#23](https://github.com/duckduckgo/autoconsent/pull/23) (arasolofotsara@duckduckgo.com [@icodebyamanda](https://github.com/icodebyamanda))
|
|
28
|
+
- New rules [#26](https://github.com/duckduckgo/autoconsent/pull/26) ([@muodov](https://github.com/muodov))
|
|
29
|
+
- Added rules to monzo.com (US coverage) [#22](https://github.com/duckduckgo/autoconsent/pull/22) (arasolofotsara@duckduckgo.com [@icodebyamanda](https://github.com/icodebyamanda))
|
|
30
|
+
- Add rule for affinity.serif.com [#21](https://github.com/duckduckgo/autoconsent/pull/21) ([@muodov](https://github.com/muodov))
|
|
31
|
+
- Use new jenkins node [#20](https://github.com/duckduckgo/autoconsent/pull/20) ([@sammacbeth](https://github.com/sammacbeth))
|
|
32
|
+
- Fix manifest copy paths [#19](https://github.com/duckduckgo/autoconsent/pull/19) ([@muodov](https://github.com/muodov))
|
|
33
|
+
- 2.1.0 [#18](https://github.com/duckduckgo/autoconsent/pull/18) ([@muodov](https://github.com/muodov))
|
|
34
|
+
- Support for MV2 on Firefox. [#16](https://github.com/duckduckgo/autoconsent/pull/16) ([@sammacbeth](https://github.com/sammacbeth))
|
|
35
|
+
- Opt in improvements [#17](https://github.com/duckduckgo/autoconsent/pull/17) ([@muodov](https://github.com/muodov))
|
|
36
|
+
- 2.0.0 [#15](https://github.com/duckduckgo/autoconsent/pull/15) ([@muodov](https://github.com/muodov))
|
|
37
|
+
- Fat content script architecture [#14](https://github.com/duckduckgo/autoconsent/pull/14) ([@muodov](https://github.com/muodov))
|
|
38
|
+
- Setup Jenkins multibranch testing [#13](https://github.com/duckduckgo/autoconsent/pull/13) ([@sammacbeth](https://github.com/sammacbeth))
|
|
39
|
+
- More UK coverage [#12](https://github.com/duckduckgo/autoconsent/pull/12) ([@jdorweiler](https://github.com/jdorweiler))
|
|
40
|
+
- v1.0.7 [#11](https://github.com/duckduckgo/autoconsent/pull/11) ([@muodov](https://github.com/muodov))
|
|
41
|
+
- Some cosmetic fixes [#10](https://github.com/duckduckgo/autoconsent/pull/10) ([@muodov](https://github.com/muodov))
|
|
42
|
+
- Convert OneTrust rule to JS [#9](https://github.com/duckduckgo/autoconsent/pull/9) ([@muodov](https://github.com/muodov))
|
|
43
|
+
- Fix popup detection [#4](https://github.com/duckduckgo/autoconsent/pull/4) ([@muodov](https://github.com/muodov))
|
|
44
|
+
- revert visible change [#8](https://github.com/duckduckgo/autoconsent/pull/8) ([@jdorweiler](https://github.com/jdorweiler))
|
|
45
|
+
- Add more tests [#6](https://github.com/duckduckgo/autoconsent/pull/6) ([@jdorweiler](https://github.com/jdorweiler) [@sammacbeth](https://github.com/sammacbeth))
|
|
46
|
+
- v1.0.4 [#5](https://github.com/duckduckgo/autoconsent/pull/5) ([@jdorweiler](https://github.com/jdorweiler))
|
|
47
|
+
- More rules for DE sites [#3](https://github.com/duckduckgo/autoconsent/pull/3) ([@jdorweiler](https://github.com/jdorweiler))
|
|
48
|
+
- more CMP rules [#1](https://github.com/duckduckgo/autoconsent/pull/1) ([@jdorweiler](https://github.com/jdorweiler))
|
|
49
|
+
|
|
50
|
+
#### ⚠️ Pushed to `main`
|
|
51
|
+
|
|
52
|
+
- 3.0.0 ([@adewes](https://github.com/adewes))
|
|
53
|
+
- 2.2.1 ([@muodov](https://github.com/muodov))
|
|
54
|
+
- Minor flicker fix for uniconsent ([@muodov](https://github.com/muodov))
|
|
55
|
+
- 2.2.0 ([@muodov](https://github.com/muodov))
|
|
56
|
+
- 2.1.2 ([@sammacbeth](https://github.com/sammacbeth))
|
|
57
|
+
- 2.1.1 ([@muodov](https://github.com/muodov))
|
|
58
|
+
- 1.0.8 ([@jdorweiler](https://github.com/jdorweiler))
|
|
59
|
+
- 1.0.6 ([@muodov](https://github.com/muodov))
|
|
60
|
+
- 1.0.5 ([@jdorweiler](https://github.com/jdorweiler))
|
|
61
|
+
- v1.0.3 ([@jdorweiler](https://github.com/jdorweiler))
|
|
62
|
+
- Publish to duckduckgo's npm. ([@sammacbeth](https://github.com/sammacbeth))
|
|
63
|
+
- 1.0.2 ([@sammacbeth](https://github.com/sammacbeth))
|
|
64
|
+
- Onetrust fixes. ([@sammacbeth](https://github.com/sammacbeth))
|
|
65
|
+
- 1.0.1 ([@sammacbeth](https://github.com/sammacbeth))
|
|
66
|
+
- Wait longer before unhiding on Consent-o-matic CMPs ([@sammacbeth](https://github.com/sammacbeth))
|
|
67
|
+
- 1.0.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
68
|
+
- cancer.org -> Onetrust ([@sammacbeth](https://github.com/sammacbeth))
|
|
69
|
+
- forums.cpanel.net -> cookiebot ([@sammacbeth](https://github.com/sammacbeth))
|
|
70
|
+
- Add prehide selectors to rules ([@sammacbeth](https://github.com/sammacbeth))
|
|
71
|
+
- Support for prehide rules ([@sammacbeth](https://github.com/sammacbeth))
|
|
72
|
+
- Support auto-optout in test addon. ([@sammacbeth](https://github.com/sammacbeth))
|
|
73
|
+
- Add klaro ([@sammacbeth](https://github.com/sammacbeth))
|
|
74
|
+
- Prepare to support prehiding. ([@sammacbeth](https://github.com/sammacbeth))
|
|
75
|
+
- 0.10.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
76
|
+
- Revert "expatica.com changed CMP." ([@sammacbeth](https://github.com/sammacbeth))
|
|
77
|
+
- Sourcepoint: unhide elements after rule completes ([@sammacbeth](https://github.com/sammacbeth))
|
|
78
|
+
- Add undohide rule for removing CSS hiding rules ([@sammacbeth](https://github.com/sammacbeth))
|
|
79
|
+
- expatica.com changed CMP. ([@sammacbeth](https://github.com/sammacbeth))
|
|
80
|
+
- 0.9.4 ([@sammacbeth](https://github.com/sammacbeth))
|
|
81
|
+
- Cookiebot fixes ([@sammacbeth](https://github.com/sammacbeth))
|
|
82
|
+
- Remove uniconsent ([@sammacbeth](https://github.com/sammacbeth))
|
|
83
|
+
- Cookie law info fix ([@sammacbeth](https://github.com/sammacbeth))
|
|
84
|
+
- 0.9.3 ([@sammacbeth](https://github.com/sammacbeth))
|
|
85
|
+
- More region skipping ([@sammacbeth](https://github.com/sammacbeth))
|
|
86
|
+
- Fix rule builder ([@sammacbeth](https://github.com/sammacbeth))
|
|
87
|
+
- Break out of detection when an exception occurs. ([@sammacbeth](https://github.com/sammacbeth))
|
|
88
|
+
- Wait for popups too ([@sammacbeth](https://github.com/sammacbeth))
|
|
89
|
+
- 0.9.2 ([@sammacbeth](https://github.com/sammacbeth))
|
|
90
|
+
- Test stability improvements ([@sammacbeth](https://github.com/sammacbeth))
|
|
91
|
+
- Use built-in screenshotting ([@sammacbeth](https://github.com/sammacbeth))
|
|
92
|
+
- Remove unused CMPs ([@sammacbeth](https://github.com/sammacbeth))
|
|
93
|
+
- 0.9.1 ([@sammacbeth](https://github.com/sammacbeth))
|
|
94
|
+
- More test coverage ([@sammacbeth](https://github.com/sammacbeth))
|
|
95
|
+
- Sourcepoint DNS fix. ([@sammacbeth](https://github.com/sammacbeth))
|
|
96
|
+
- Account for regional differences in tests ([@sammacbeth](https://github.com/sammacbeth))
|
|
97
|
+
- Test spec tweaks ([@sammacbeth](https://github.com/sammacbeth))
|
|
98
|
+
- Skip some tests based on region. ([@sammacbeth](https://github.com/sammacbeth))
|
|
99
|
+
- Update test runner to use describe ([@sammacbeth](https://github.com/sammacbeth))
|
|
100
|
+
- Add region to test names ([@sammacbeth](https://github.com/sammacbeth))
|
|
101
|
+
- Puppeteer frame detection fixes ([@sammacbeth](https://github.com/sammacbeth))
|
|
102
|
+
- 0.9.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
103
|
+
- Playwright tests ([@sammacbeth](https://github.com/sammacbeth))
|
|
104
|
+
- 0.8.1 ([@sammacbeth](https://github.com/sammacbeth))
|
|
105
|
+
- Fix for Onetrust on stack exchange sites. ([@sammacbeth](https://github.com/sammacbeth))
|
|
106
|
+
- Sourcepoint fix ([@sammacbeth](https://github.com/sammacbeth))
|
|
107
|
+
- 0.8.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
108
|
+
- Batch of CMP additions and fixes for US sites. ([@sammacbeth](https://github.com/sammacbeth))
|
|
109
|
+
- 0.7.5 ([@sammacbeth](https://github.com/sammacbeth))
|
|
110
|
+
- Stricter TS config. ([@sammacbeth](https://github.com/sammacbeth))
|
|
111
|
+
- Drop onetrust-stackoverflow CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
112
|
+
- Add npm clean script ([@sammacbeth](https://github.com/sammacbeth))
|
|
113
|
+
- Test CMP update ([@sammacbeth](https://github.com/sammacbeth))
|
|
114
|
+
- 0.7.4 ([@sammacbeth](https://github.com/sammacbeth))
|
|
115
|
+
- Make parallel rules an AND ([@sammacbeth](https://github.com/sammacbeth))
|
|
116
|
+
- Onetrust fixes ([@sammacbeth](https://github.com/sammacbeth))
|
|
117
|
+
- 0.7.3 ([@sammacbeth](https://github.com/sammacbeth))
|
|
118
|
+
- Remove broken CMPs ([@sammacbeth](https://github.com/sammacbeth))
|
|
119
|
+
- Implement Evidon. ([@sammacbeth](https://github.com/sammacbeth))
|
|
120
|
+
- Consentmanager.net implementation. ([@sammacbeth](https://github.com/sammacbeth))
|
|
121
|
+
- Cybotcookiebot fixes and improvements. ([@sammacbeth](https://github.com/sammacbeth))
|
|
122
|
+
- Implement tealium CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
123
|
+
- TrustArc fixes and hiding. ([@sammacbeth](https://github.com/sammacbeth))
|
|
124
|
+
- Disable ez-cookie (broken) ([@sammacbeth](https://github.com/sammacbeth))
|
|
125
|
+
- Remove Sirdata (broken) ([@sammacbeth](https://github.com/sammacbeth))
|
|
126
|
+
- 0.7.2 ([@sammacbeth](https://github.com/sammacbeth))
|
|
127
|
+
- Make hideElements a noop on puppeteer. ([@sammacbeth](https://github.com/sammacbeth))
|
|
128
|
+
- Fix puppeteer visibility detection ([@sammacbeth](https://github.com/sammacbeth))
|
|
129
|
+
- 0.7.1 ([@sammacbeth](https://github.com/sammacbeth))
|
|
130
|
+
- Ensure everything gets built before publish ([@sammacbeth](https://github.com/sammacbeth))
|
|
131
|
+
- Create autoconsent rule for onetrust ([@sammacbeth](https://github.com/sammacbeth))
|
|
132
|
+
- 0.7.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
133
|
+
- More specific detection for cookiebot ([@sammacbeth](https://github.com/sammacbeth))
|
|
134
|
+
- Add API for disabling CMPs ([@sammacbeth](https://github.com/sammacbeth))
|
|
135
|
+
- 0.6.3 ([@sammacbeth](https://github.com/sammacbeth))
|
|
136
|
+
- Make consent-o-matic action method a string ([@sammacbeth](https://github.com/sammacbeth))
|
|
137
|
+
- More test cases ([@sammacbeth](https://github.com/sammacbeth))
|
|
138
|
+
- Fixes for the puppeteer tab implementation. ([@sammacbeth](https://github.com/sammacbeth))
|
|
139
|
+
- Minor CMP fixes ([@sammacbeth](https://github.com/sammacbeth))
|
|
140
|
+
- 0.6.2 ([@sammacbeth](https://github.com/sammacbeth))
|
|
141
|
+
- Addon version as a date ([@sammacbeth](https://github.com/sammacbeth))
|
|
142
|
+
- Clear frames on main frame change. ([@sammacbeth](https://github.com/sammacbeth))
|
|
143
|
+
- Hide popup while clicking it. ([@sammacbeth](https://github.com/sammacbeth))
|
|
144
|
+
- 0.6.1 ([@sammacbeth](https://github.com/sammacbeth))
|
|
145
|
+
- Fix rule builder when there are no consent-o-matic overrides ([@sammacbeth](https://github.com/sammacbeth))
|
|
146
|
+
- Fix publishing of .js files ([@sammacbeth](https://github.com/sammacbeth))
|
|
147
|
+
- 0.6.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
148
|
+
- Preparing for cross-platform support ([@sammacbeth](https://github.com/sammacbeth))
|
|
149
|
+
- Bump version ([@sammacbeth](https://github.com/sammacbeth))
|
|
150
|
+
- Add Google funding choices CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
151
|
+
- Cleanup broken CMPs ([@sammacbeth](https://github.com/sammacbeth))
|
|
152
|
+
- Add watch build script ([@sammacbeth](https://github.com/sammacbeth))
|
|
153
|
+
- Add update url ([@sammacbeth](https://github.com/sammacbeth))
|
|
154
|
+
- Fix sourcepoint implementation. ([@sammacbeth](https://github.com/sammacbeth))
|
|
155
|
+
- Bump consent-o-matic rules ([@sammacbeth](https://github.com/sammacbeth))
|
|
156
|
+
- Change extension ID and bump version ([@sammacbeth](https://github.com/sammacbeth))
|
|
157
|
+
- Add page action icons ([@sammacbeth](https://github.com/sammacbeth))
|
|
158
|
+
- Return early on detection if one returns true ([@sammacbeth](https://github.com/sammacbeth))
|
|
159
|
+
- Control running of opt out from a page action ([@sammacbeth](https://github.com/sammacbeth))
|
|
160
|
+
- 0.5.4 ([@sammacbeth](https://github.com/sammacbeth))
|
|
161
|
+
- Disable debugging messages in content-script. Fixes #18 ([@sammacbeth](https://github.com/sammacbeth))
|
|
162
|
+
- 0.5.3 ([@sammacbeth](https://github.com/sammacbeth))
|
|
163
|
+
- Use TCFv2 as the default test. ([@sammacbeth](https://github.com/sammacbeth))
|
|
164
|
+
- Updated version of quantcast ([@sammacbeth](https://github.com/sammacbeth))
|
|
165
|
+
- Update consent-o-matic rules ([@sammacbeth](https://github.com/sammacbeth))
|
|
166
|
+
- Google opt-out rule ([@sammacbeth](https://github.com/sammacbeth))
|
|
167
|
+
- Add privacy-mgmt CMP - new on theguardian.com ([@sammacbeth](https://github.com/sammacbeth))
|
|
168
|
+
- 0.5.2 ([@sammacbeth](https://github.com/sammacbeth))
|
|
169
|
+
- 0.5.1 ([@sammacbeth](https://github.com/sammacbeth))
|
|
170
|
+
- Update web-ext ([@sammacbeth](https://github.com/sammacbeth))
|
|
171
|
+
- Remove cosmetic rule breaking condor.de ([@sammacbeth](https://github.com/sammacbeth))
|
|
172
|
+
- Remove #cookiebanner - breaking on bamf.de ([@sammacbeth](https://github.com/sammacbeth))
|
|
173
|
+
- 0.5.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
174
|
+
- Extra bracket ([@sammacbeth](https://github.com/sammacbeth))
|
|
175
|
+
- Remove rule that breaks www.nomanssky.com ([@sammacbeth](https://github.com/sammacbeth))
|
|
176
|
+
- Remove rule that breaks www.huk.de ([@sammacbeth](https://github.com/sammacbeth))
|
|
177
|
+
- Remove rule breaking congstar.de ([@sammacbeth](https://github.com/sammacbeth))
|
|
178
|
+
- Remove problematic cosmetic rule ([@sammacbeth](https://github.com/sammacbeth))
|
|
179
|
+
- 0.4.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
180
|
+
- Export web module as cjs ([@sammacbeth](https://github.com/sammacbeth))
|
|
181
|
+
- Add rule exception for tommy.de ([@sammacbeth](https://github.com/sammacbeth))
|
|
182
|
+
- 0.3.3 ([@sammacbeth](https://github.com/sammacbeth))
|
|
183
|
+
- Fix rule is undefined error. ([@sammacbeth](https://github.com/sammacbeth))
|
|
184
|
+
- 0.3.2 ([@sammacbeth](https://github.com/sammacbeth))
|
|
185
|
+
- More new cosmetics ([@sammacbeth](https://github.com/sammacbeth))
|
|
186
|
+
- Add another future site. ([@sammacbeth](https://github.com/sammacbeth))
|
|
187
|
+
- New cosmetics rules for sites in issue #6 ([@sammacbeth](https://github.com/sammacbeth))
|
|
188
|
+
- Add Drupal CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
189
|
+
- Add InternetBrands CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
190
|
+
- Add Cevent ([@sammacbeth](https://github.com/sammacbeth))
|
|
191
|
+
- Improve Sourcepoint reliability. ([@sammacbeth](https://github.com/sammacbeth))
|
|
192
|
+
- Add Clarip CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
193
|
+
- Fix case where non-Cookiebot providers use the CookieConsent global ([@sammacbeth](https://github.com/sammacbeth))
|
|
194
|
+
- Add Sourcepoint CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
195
|
+
- Add .gdprPopup cosmetic rule. Fixes #3. ([@sammacbeth](https://github.com/sammacbeth))
|
|
196
|
+
- Add cookies-overlay rule. Fixes #4 ([@sammacbeth](https://github.com/sammacbeth))
|
|
197
|
+
- Hotfix medium scroll-lock ([@sammacbeth](https://github.com/sammacbeth))
|
|
198
|
+
- Remove chip and focus specific cosmetics ([@sammacbeth](https://github.com/sammacbeth))
|
|
199
|
+
- Disable cmsCookieNotification ([@sammacbeth](https://github.com/sammacbeth))
|
|
200
|
+
- 0.3.1 ([@sammacbeth](https://github.com/sammacbeth))
|
|
201
|
+
- Fix tagcommander CMP not detecting frame. ([@sammacbeth](https://github.com/sammacbeth))
|
|
202
|
+
- Update readme.md ([@sammacbeth](https://github.com/sammacbeth))
|
|
203
|
+
- Fix the test extension. ([@sammacbeth](https://github.com/sammacbeth))
|
|
204
|
+
- Updated cosmetics. ([@sammacbeth](https://github.com/sammacbeth))
|
|
205
|
+
- Add Civic CMP. ([@sammacbeth](https://github.com/sammacbeth))
|
|
206
|
+
- Implement termly consent banner. ([@sammacbeth](https://github.com/sammacbeth))
|
|
207
|
+
- More cosmetic improvements. ([@sammacbeth](https://github.com/sammacbeth))
|
|
208
|
+
- Cosmetic fix for bussgeldkatalog.de ([@sammacbeth](https://github.com/sammacbeth))
|
|
209
|
+
- 0.3.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
210
|
+
- Defer rule resolution on checkTab function. Use `checked` method to wait ([@sammacbeth](https://github.com/sammacbeth))
|
|
211
|
+
- Additional cookie banner cosmetics. ([@sammacbeth](https://github.com/sammacbeth))
|
|
212
|
+
- Don't auto-reload test extension ([@sammacbeth](https://github.com/sammacbeth))
|
|
213
|
+
- Fix admiral consent. ([@sammacbeth](https://github.com/sammacbeth))
|
|
214
|
+
- Testing sidebar improvements. ([@sammacbeth](https://github.com/sammacbeth))
|
|
215
|
+
- Fix catch eval errors. ([@sammacbeth](https://github.com/sammacbeth))
|
|
216
|
+
- Fix screenshot paths ([@sammacbeth](https://github.com/sammacbeth))
|
|
217
|
+
- Catch eval errors. ([@sammacbeth](https://github.com/sammacbeth))
|
|
218
|
+
- Remove protocol from screenshot path. ([@sammacbeth](https://github.com/sammacbeth))
|
|
219
|
+
- Add job summary output. ([@sammacbeth](https://github.com/sammacbeth))
|
|
220
|
+
- Add admiral CMP. ([@sammacbeth](https://github.com/sammacbeth))
|
|
221
|
+
- More cosmetics. ([@sammacbeth](https://github.com/sammacbeth))
|
|
222
|
+
- Add CMP for entrepreneur.com ([@sammacbeth](https://github.com/sammacbeth))
|
|
223
|
+
- Add w18lara cmp ([@sammacbeth](https://github.com/sammacbeth))
|
|
224
|
+
- Future cmp. ([@sammacbeth](https://github.com/sammacbeth))
|
|
225
|
+
- Add Sirdata CMP. ([@sammacbeth](https://github.com/sammacbeth))
|
|
226
|
+
- Tagcommander fixes ([@sammacbeth](https://github.com/sammacbeth))
|
|
227
|
+
- Add faktor.io CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
228
|
+
- Improve testing extension with cosmetics. ([@sammacbeth](https://github.com/sammacbeth))
|
|
229
|
+
- Add new cosmetic rules ([@sammacbeth](https://github.com/sammacbeth))
|
|
230
|
+
- 0.2.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
231
|
+
- npm audit fix ([@sammacbeth](https://github.com/sammacbeth))
|
|
232
|
+
- Make content script messaging pluggable ([@sammacbeth](https://github.com/sammacbeth))
|
|
233
|
+
- Remove 'frame' message and use webNavigation API instead. ([@sammacbeth](https://github.com/sammacbeth))
|
|
234
|
+
- 0.1.0 ([@sammacbeth](https://github.com/sammacbeth))
|
|
235
|
+
- Fix the crawler. ([@sammacbeth](https://github.com/sammacbeth))
|
|
236
|
+
- Add cosmetic rules in JSON form. ([@sammacbeth](https://github.com/sammacbeth))
|
|
237
|
+
- Fix asus opt-out. ([@sammacbeth](https://github.com/sammacbeth))
|
|
238
|
+
- 0.0.7 ([@sammacbeth](https://github.com/sammacbeth))
|
|
239
|
+
- Remove cosmetics from project ([@sammacbeth](https://github.com/sammacbeth))
|
|
240
|
+
- Add Wikia CMP ([@sammacbeth](https://github.com/sammacbeth))
|
|
241
|
+
- Fix some issues on tagcommander ([@sammacbeth](https://github.com/sammacbeth))
|
|
242
|
+
- Add sidebar to test extension ([@sammacbeth](https://github.com/sammacbeth))
|
|
243
|
+
- 0.0.6 ([@sammacbeth](https://github.com/sammacbeth))
|
|
244
|
+
- Make webextension listener sync ([@sammacbeth](https://github.com/sammacbeth))
|
|
245
|
+
- 0.0.5 ([@sammacbeth](https://github.com/sammacbeth))
|
|
246
|
+
- Cleaning. ([@sammacbeth](https://github.com/sammacbeth))
|
|
247
|
+
- Revert to cosmetic opt-out for trustarc. ([@sammacbeth](https://github.com/sammacbeth))
|
|
248
|
+
- 0.0.4 ([@sammacbeth](https://github.com/sammacbeth))
|
|
249
|
+
- Avoid preinstall hook ([@sammacbeth](https://github.com/sammacbeth))
|
|
250
|
+
- Bump version. ([@sammacbeth](https://github.com/sammacbeth))
|
|
251
|
+
- Test extension for testing and debugging autoconsent rules. ([@sammacbeth](https://github.com/sammacbeth))
|
|
252
|
+
- 0.0.2 ([@sammacbeth](https://github.com/sammacbeth))
|
|
253
|
+
- Add license and readme. ([@sammacbeth](https://github.com/sammacbeth))
|
|
254
|
+
- Mark sites where popup was not detected. ([@sammacbeth](https://github.com/sammacbeth))
|
|
255
|
+
- Make app gdpr popup detection less aggressive. ([@sammacbeth](https://github.com/sammacbeth))
|
|
256
|
+
- Also check if popup is detected during crawl. ([@sammacbeth](https://github.com/sammacbeth))
|
|
257
|
+
- Further coverage improvements. ([@sammacbeth](https://github.com/sammacbeth))
|
|
258
|
+
- Fix techradar opt-out. ([@sammacbeth](https://github.com/sammacbeth))
|
|
259
|
+
- Split dynamic and static cosmetics. ([@sammacbeth](https://github.com/sammacbeth))
|
|
260
|
+
- Move tabs implementations into module. ([@sammacbeth](https://github.com/sammacbeth))
|
|
261
|
+
- Add recommended rules to report. ([@sammacbeth](https://github.com/sammacbeth))
|
|
262
|
+
- Make sandboxing toggleable. ([@sammacbeth](https://github.com/sammacbeth))
|
|
263
|
+
- WIP dockerized puppeteer. ([@sammacbeth](https://github.com/sammacbeth))
|
|
264
|
+
- Add auto crawl deployment ([@sammacbeth](https://github.com/sammacbeth))
|
|
265
|
+
- Fix errors with missing elements. ([@sammacbeth](https://github.com/sammacbeth))
|
|
266
|
+
- Support frame creation after first load. ([@sammacbeth](https://github.com/sammacbeth))
|
|
267
|
+
- Crawler html report. ([@sammacbeth](https://github.com/sammacbeth))
|
|
268
|
+
- Implement tab.goto ([@sammacbeth](https://github.com/sammacbeth))
|
|
269
|
+
- More fixes. ([@sammacbeth](https://github.com/sammacbeth))
|
|
270
|
+
- Didomi fix. ([@sammacbeth](https://github.com/sammacbeth))
|
|
271
|
+
- app_gdpr fixes and new entries. ([@sammacbeth](https://github.com/sammacbeth))
|
|
272
|
+
- Crawling with opt-out test. ([@sammacbeth](https://github.com/sammacbeth))
|
|
273
|
+
- Initial commit: autoconsent rules from re:consent plus crawler implementation. ([@sammacbeth](https://github.com/sammacbeth))
|
|
274
|
+
|
|
275
|
+
#### 🔩 Dependency Updates
|
|
276
|
+
|
|
277
|
+
- Bump terser from 5.13.1 to 5.15.1 [#34](https://github.com/duckduckgo/autoconsent/pull/34) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
278
|
+
|
|
279
|
+
#### Authors: 7
|
|
280
|
+
|
|
281
|
+
- [@dependabot[bot]](https://github.com/dependabot[bot])
|
|
282
|
+
- Amanda RASOLOFOTSARA ([@icodebyamanda](https://github.com/icodebyamanda))
|
|
283
|
+
- Andreas Dewes ([@adewes](https://github.com/adewes))
|
|
284
|
+
- euw-arasolofotsara1 (arasolofotsara@duckduckgo.com)
|
|
285
|
+
- Jason ([@jdorweiler](https://github.com/jdorweiler))
|
|
286
|
+
- Maxim Tsoy ([@muodov](https://github.com/muodov))
|
|
287
|
+
- Sam Macbeth ([@sammacbeth](https://github.com/sammacbeth))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";const e=chrome.runtime.getManifest().manifest_version,t={};async function o(o){if(2!==e)return chrome.storage.local.set(o);Object.assign(t,o)}async function a(o){return null===o?2===e?t:await chrome.storage.local.get(null):2===e?t[o]:(await chrome.storage.local.get(o))?.[o]}async function s(o){if(2!==e)return chrome.storage.local.remove(o);delete t[o]}async function n(e,t,o=""){let a="",s="icons/cookie-idle.png";"success"===t?(a=`Opt out successful! (${o})`,s="icons/party.png"):"complete"===t?(a=`Opt out complete! (${o})`,s="icons/tick.png"):"working"===t?(a=`Processing... (${o})`,s="icons/cog.png"):"verified"===t?(a=`Verified (${o})`,s="icons/verified.png"):"idle"===t?(a="Idle",s="icons/cookie-idle.png"):"available"===t&&(a=`Click to opt out (${o})`,s="icons/cookie.png");const n=chrome.action||chrome.pageAction;chrome.pageAction&&chrome.pageAction.show(e),await n.setTitle({tabId:e,title:a}),await n.setIcon({tabId:e,path:s})}async function c(){const e=await fetch("./rules.json");o({rules:await e.json()})}async function i(){console.log("init sw");const e=await a("config");if(console.log("storedConfig",e),!e){console.log("init config");const e={enabled:!0,autoAction:"optOut",disabledCmps:[],enablePrehide:!0,detectRetries:20};await o({config:e})}}chrome.runtime.onInstalled.addListener((()=>{c(),i()})),2===e&&(c(),i()),chrome.tabs.onRemoved.addListener((e=>{s(`detected${e}`)})),chrome.runtime.onMessage.addListener((async(t,c)=>{const i=c.tab.id,r=c.frameId,l=await a("rules"),d=await a("config");switch(t.type){case"init":0===r&&await n(i,"idle"),chrome.tabs.sendMessage(i,{type:"initResp",rules:l,config:d},{frameId:r});break;case"eval":(async function(t,o,a){return 2===e?new Promise((e=>{chrome.tabs.executeScript(t,{frameId:o,code:`!!window.eval(decodeURIComponent("${encodeURIComponent(a)}"))`},(t=>{e([{result:t,frameId:o}])}))})):chrome.scripting.executeScript({target:{tabId:t,frameIds:[o]},world:"MAIN",args:[a],func:e=>{try{return window.eval(e)}catch(t){return void console.warn("eval error",e,t)}}})})(i,r,t.code).then((([e])=>{chrome.tabs.sendMessage(i,{id:t.id,type:"evalResp",result:e.result},{frameId:r})}));break;case"popupFound":await n(i,"available",t.cmp),o({[`detected${i}`]:r});break;case"optOutResult":case"optInResult":t.result&&(await n(i,"working",t.cmp),t.scheduleSelfTest&&await o({[`selfTest${i}`]:r}));break;case"selfTestResult":t.result&&await n(i,"verified",t.cmp);break;case"autoconsentDone":{await n(i,"success",t.cmp);const e=`selfTest${i}`,o=(await chrome.storage.local.get(e))?.[e];"number"==typeof o&&(s(e),chrome.tabs.sendMessage(i,{type:"selfTest"},{frameId:o}));break}case"autoconsentError":console.error("Error:",t.details)}})),2===e&&chrome.pageAction.onClicked.addListener((async e=>{const t=e.id,o=`detected${t}`,c=await a(o);"number"==typeof c&&(s(o),await n(t,"working"),chrome.tabs.sendMessage(t,{type:"optOut"},{frameId:c}))}))}();
|
|
1
|
+
!function(){"use strict";const e=chrome.runtime.getManifest().manifest_version,t={};async function o(o){if(2!==e)return chrome.storage.local.set(o);Object.assign(t,o)}async function a(o){return null===o?2===e?t:await chrome.storage.local.get(null):2===e?t[o]:(await chrome.storage.local.get(o))?.[o]}async function s(o){if(2!==e)return chrome.storage.local.remove(o);delete t[o]}async function n(e,t,o=""){let a="",s="icons/cookie-idle.png";"success"===t?(a=`Opt out successful! (${o})`,s="icons/party.png"):"complete"===t?(a=`Opt out complete! (${o})`,s="icons/tick.png"):"working"===t?(a=`Processing... (${o})`,s="icons/cog.png"):"verified"===t?(a=`Verified (${o})`,s="icons/verified.png"):"idle"===t?(a="Idle",s="icons/cookie-idle.png"):"available"===t&&(a=`Click to opt out (${o})`,s="icons/cookie.png");const n=chrome.action||chrome.pageAction;chrome.pageAction&&chrome.pageAction.show(e),await n.setTitle({tabId:e,title:a}),await n.setIcon({tabId:e,path:s})}async function c(){const e=await fetch("./rules.json");o({rules:await e.json()})}async function i(){console.log("init sw");const e=await a("config");if(console.log("storedConfig",e),!e){console.log("init config");const e={enabled:!0,autoAction:"optOut",disabledCmps:[],enablePrehide:!0,detectRetries:20};await o({config:e})}}chrome.runtime.onInstalled.addListener((()=>{c(),i()})),2===e&&(c(),i()),chrome.tabs.onRemoved.addListener((e=>{s(`detected${e}`)})),chrome.runtime.onMessage.addListener((async(t,c)=>{const i=c.tab.id,r=c.frameId,l=await a("rules"),d=await a("config");switch(t.type){case"init":0===r&&await n(i,"idle"),chrome.tabs.sendMessage(i,{type:"initResp",rules:l,config:d},{frameId:r});break;case"eval":(async function(t,o,a){return 2===e?new Promise((e=>{chrome.tabs.executeScript(t,{frameId:o,code:`!!window.eval(decodeURIComponent("${encodeURIComponent(a)}"))`},(t=>{e([{result:t[0],frameId:o}])}))})):chrome.scripting.executeScript({target:{tabId:t,frameIds:[o]},world:"MAIN",args:[a],func:e=>{try{return window.eval(e)}catch(t){return void console.warn("eval error",e,t)}}})})(i,r,t.code).then((([e])=>{chrome.tabs.sendMessage(i,{id:t.id,type:"evalResp",result:e.result},{frameId:r})}));break;case"popupFound":await n(i,"available",t.cmp),o({[`detected${i}`]:r});break;case"optOutResult":case"optInResult":t.result&&(await n(i,"working",t.cmp),t.scheduleSelfTest&&await o({[`selfTest${i}`]:r}));break;case"selfTestResult":t.result&&await n(i,"verified",t.cmp);break;case"autoconsentDone":{await n(i,"success",t.cmp);const e=`selfTest${i}`,o=(await chrome.storage.local.get(e))?.[e];"number"==typeof o&&(s(e),chrome.tabs.sendMessage(i,{type:"selfTest"},{frameId:o}));break}case"autoconsentError":console.error("Error:",t.details)}})),2===e&&chrome.pageAction.onClicked.addListener((async e=>{const t=e.id,o=`detected${t}`,c=await a(o);"number"==typeof c&&(s(o),await n(t,"working"),chrome.tabs.sendMessage(t,{type:"optOut"},{frameId:c}))}))}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";class e{constructor(e,t=1e3){this.id=e,this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),this.timer=window.setTimeout((()=>{this.reject(new Error("timeout"))}),t)}}const t={pending:new Map,sendContentMessage:null};function n(e="autoconsent-css-rules"){const t=`style#${e}`,n=document.querySelector(t);if(n&&n instanceof HTMLStyleElement)return n;{const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("style");return n.id=e,t.appendChild(n),n}}function o(e,t,n="display"){const o="opacity"===n?"opacity: 0":"display: none",i=`${t.join(",")} { ${o} !important; z-index: -1 !important; pointer-events: none !important; } `;return e instanceof HTMLStyleElement&&(e.innerText+=i,t.length>0)}async function i(e,t,n){const o=await e();return!o&&t>0?new Promise((o=>{setTimeout((async()=>{o(i(e,t-1,n))}),n)})):Promise.resolve(o)}function s(e){if(!e)return!1;if(null!==e.offsetParent)return!0;{const t=window.getComputedStyle(e);if("fixed"===t.position&&"none"!==t.display)return!0}return!1}function r(n){return function(n){let o;o=crypto&&void 0!==crypto.randomUUID?crypto.randomUUID():Math.random().toString(),t.sendContentMessage({type:"eval",id:o,code:n});const i=new e(o);return t.pending.set(i.id,i),i.promise}(n).catch((e=>!1))}function a(e,t=!1){const n=document.querySelectorAll(e);return n.length>0&&(t?n.forEach((e=>e.click())):n[0].click()),n.length>0}function c(e){return null!==document.querySelector(e)}function u(e,t){const n=document.querySelectorAll(e),o=new Array(n.length);return n.forEach(((e,t)=>{o[t]=s(e)})),"none"===t?o.every((e=>!e)):0!==o.length&&("any"===t?o.some((e=>e)):o.every((e=>e)))}function l(e,t=1e4){return i((()=>null!==document.querySelector(e)),Math.ceil(t/200),200)}async function d(e,t=1e4,n=!1){return await l(e,t),a(e,n)}function p(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}function h(){const e=n("autoconsent-prehide");return e&&e.remove(),!!e}const m={main:!0,frame:!1,urlPattern:""};class f{constructor(e){this.runContext=m,this.name=e}get hasSelfTest(){throw new Error("Not Implemented")}get isIntermediate(){throw new Error("Not Implemented")}checkRunContext(){const e={...m,...this.runContext},t=window.top===window;return!(t&&!e.main)&&(!(!t&&!e.frame)&&!(e.urlPattern&&!window.location.href.match(e.urlPattern)))}detectCmp(){throw new Error("Not Implemented")}async detectPopup(){return!1}optOut(){throw new Error("Not Implemented")}optIn(){throw new Error("Not Implemented")}openCmp(){throw new Error("Not Implemented")}async test(){return Promise.resolve(!0)}}async function y(e){const t=[];if(e.exists&&t.push(c(e.exists)),e.visible&&t.push(u(e.visible,e.check)),e.eval){const n=r(e.eval);t.push(n)}var s,h;if(e.waitFor&&t.push(l(e.waitFor,e.timeout)),e.waitForVisible&&t.push(function(e,t=1e4,n="any"){return i((()=>u(e,n)),Math.ceil(t/200),200)}(e.waitForVisible,e.timeout,e.check)),e.click&&t.push(a(e.click,e.all)),e.waitForThenClick&&t.push(d(e.waitForThenClick,e.timeout,e.all)),e.wait&&t.push(p(e.wait)),e.hide&&t.push((s=e.hide,h=e.method,o(n(),s,h))),e.if){if(!e.if.exists&&!e.if.visible)return console.error("invalid conditional rule",e.if),!1;await y(e.if)?t.push(w(e.then)):e.else&&t.push(w(e.else))}if(0===t.length)return!1;return(await Promise.all(t)).reduce(((e,t)=>e&&t),!0)}async function w(e){for(const t of e){if(!await y(t)&&!t.optional)return!1}return!0}class g extends f{constructor(e){super(e.name),this.config=e,this.runContext=e.runContext||m}get hasSelfTest(){return!!this.config.test}get isIntermediate(){return!!this.config.intermediate}get prehideSelectors(){return this.config.prehideSelectors}async detectCmp(){return!!this.config.detectCmp&&async function(e){const t=e.map((e=>y(e)));return(await Promise.all(t)).every((e=>!!e))}(this.config.detectCmp)}async detectPopup(){return!!this.config.detectPopup&&w(this.config.detectPopup)}async optOut(){return!!this.config.optOut&&w(this.config.optOut)}async optIn(){return!!this.config.optIn&&w(this.config.optIn)}async openCmp(){return!!this.config.openCmp&&w(this.config.openCmp)}async test(){return this.hasSelfTest?w(this.config.test):super.test()}}const b="#truste-show-consent",C="#truste-consent-track";const k=[new class extends f{constructor(){super("TrustArc-top"),this.prehideSelectors=[".trustarc-banner-container",`.truste_popframe,.truste_overlay,.truste_box_overlay,${C}`],this.runContext={main:!0,frame:!1},this._shortcutButton=null,this._optInDone=!1}get hasSelfTest(){return!1}get isIntermediate(){return!this._optInDone&&!this._shortcutButton}async detectCmp(){const e=c(`#truste-show-consent,${C}`);return e&&(this._shortcutButton=document.querySelector("#truste-consent-required")),e}async detectPopup(){return u(`#truste-consent-content,#trustarc-banner-overlay,${C}`,"all")}openFrame(){a(b)}async optOut(){return this._shortcutButton?(this._shortcutButton.click(),!0):(o(n(),[".truste_popframe",".truste_overlay",".truste_box_overlay",C]),a(b),setTimeout((()=>{n().remove()}),1e4),!0)}async optIn(){return this._optInDone=!0,a("#truste-consent-button")}async openCmp(){return!0}async test(){return!0}},new class extends f{constructor(){super("TrustArc-frame"),this.runContext={main:!1,frame:!0,urlPattern:"^https://consent-pref\\.trustarc\\.com/\\?"}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return!0}async detectPopup(){return u("#defaultpreferencemanager","any")&&u(".mainContent","any")}async navigateToSettings(){return await i((async()=>c(".shp")||u(".advance","any")||c(".switch span:first-child")),10,500),c(".shp")&&a(".shp"),await l(".prefPanel",5e3),u(".advance","any")&&a(".advance"),await i((()=>u(".switch span:first-child","any")),5,1e3)}async optOut(){return await i((()=>"complete"===document.readyState),20,100),await l(".mainContent[aria-hidden=false]",5e3),!!a(".rejectAll")||(c(".prefPanel")&&await l('.prefPanel[style="visibility: visible;"]',3e3),a("#catDetails0")?(a(".submit"),!0):(a(".required")||(await this.navigateToSettings(),a(".switch span:nth-child(1):not(.active)",!0),a(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{a("#gwt-debug-close_id")}))),!0))}async optIn(){return a(".call")||(await this.navigateToSettings(),a(".switch span:nth-child(2)",!0),a(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{a("#gwt-debug-close_id")}))),!0}},new class extends f{constructor(){super("Cybotcookiebot"),this.prehideSelectors=["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("#CybotCookiebotDialogBodyLevelButtonPreferences")}async detectPopup(){return c("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner")}async optOut(){return a(".cookie-alert-extended-detail-link")?(await l(".cookie-alert-configuration",2e3),a(".cookie-alert-configuration-input:checked",!0),a(".cookie-alert-extended-button-secondary"),!0):c("#dtcookie-container")?a(".h-dtcookie-decline"):(a(".cookiebot__button--settings")||a("#CybotCookiebotDialogBodyButtonDecline")||(a(".cookiebanner__link--details"),a('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled',!0),a("#CybotCookiebotDialogBodyButtonDecline"),a("input[id^=CybotCookiebotDialogBodyLevelButton]:checked",!0),c("#CybotCookiebotDialogBodyButtonAcceptSelected")?a("#CybotCookiebotDialogBodyButtonAcceptSelected"):a("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection",!0),await r("window.CookieConsent.hasResponse !== true")&&(await r("window.Cookiebot.dialog.submitConsent()"),await p(500)),c("#cb-confirmedSettings")&&await r("endCookieProcess()")),!0)}async optIn(){return c("#dtcookie-container")?a(".h-dtcookie-accept"):(a(".CybotCookiebotDialogBodyLevelButton:not(:checked):enabled",!0),a("#CybotCookiebotDialogBodyLevelButtonAccept"),a("#CybotCookiebotDialogBodyButtonAccept"),!0)}async test(){return r("window.CookieConsent.declined === true")}},new class extends f{constructor(){super("Sourcepoint-top"),this.prehideSelectors=["div[id^='sp_message_container_'],.message-overlay"],this.runContext={main:!0,frame:!1}}get hasSelfTest(){return!0}get isIntermediate(){return!0}async detectCmp(){return c("div[id^='sp_message_container_']")}async detectPopup(){return u("div[id^='sp_message_container_']","all")}async optIn(){return!0}async optOut(){const e=document.querySelector(".sp-message-open");return e&&e.classList.remove("sp-message-open"),!0}async test(){return await r("__tcfapi('getTCData', 2, r => window.__rcsResult = r)"),await r("Object.values(window.__rcsResult.purpose.consents).every(c => !c)")}},new class extends f{constructor(){super("Sourcepoint-frame"),this.ccpaMode=!1,this.runContext={main:!1,frame:!0}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){const e=new URL(location.href);return e.searchParams.has("message_id")&&"ccpa-notice.sp-prod.net"===e.hostname?(this.ccpaMode=!0,!0):("/index.html"===e.pathname||"/privacy-manager/index.html"===e.pathname)&&(e.searchParams.has("message_id")||e.searchParams.has("requestUUID")||e.searchParams.has("consentUUID"))}async detectPopup(){return!0}async optIn(){return await l(".sp_choice_type_11,.sp_choice_type_ACCEPT_ALL",2e3),!!a(".sp_choice_type_11")||!!a(".sp_choice_type_ACCEPT_ALL")}isManagerOpen(){return"/privacy-manager/index.html"===new URL(location.href).pathname}async optOut(){if(!this.isManagerOpen()){if(!await l(".sp_choice_type_12,.sp_choice_type_13"))return!1;if(!c(".sp_choice_type_12"))return a(".sp_choice_type_13");a(".sp_choice_type_12"),await i((()=>"/privacy-manager/index.html"===location.pathname),200,100)}await l(".type-modal",2e4);try{const e=".sp_choice_type_REJECT_ALL",t=".reject-toggle",n=await Promise.race([l(e,2e3).then((e=>e?0:-1)),l(t,2e3).then((e=>e?1:-1)),l(".pm-features",2e3).then((e=>e?2:-1))]);if(0===n)return await p(1e3),a(e);1===n?a(t):2===n&&(await l(".pm-features",1e4),a(".checked > span",!0),a(".chevron"))}catch(e){}return a(".sp_choice_type_SAVE_AND_EXIT"),!0}},new class extends f{constructor(){super("consentmanager.net"),this.prehideSelectors=["#cmpbox,#cmpbox2"],this.apiAvailable=!1}get hasSelfTest(){return this.apiAvailable}get isIntermediate(){return!1}async detectCmp(){return this.apiAvailable=await r('window.__cmp && typeof __cmp("getCMPData") === "object"'),!!this.apiAvailable||c("#cmpbox")}async detectPopup(){return this.apiAvailable?await r("!__cmp('consentStatus').userChoiceExists"):u("#cmpbox .cmpmore","any")}async optOut(){return await p(500),this.apiAvailable?await r("__cmp('setConsent', 0)"):!!a(".cmpboxbtnno")||(c(".cmpwelcomeprpsbtn")?(a(".cmpwelcomeprpsbtn > a[aria-checked=true]",!0),a(".cmpboxbtnsave"),!0):(a(".cmpboxbtncustom"),await l(".cmptblbox",2e3),a(".cmptdchoice > a[aria-checked=true]",!0),a(".cmpboxbtnyescustomchoices"),!0))}async optIn(){return this.apiAvailable?await r("__cmp('setConsent', 1)"):a(".cmpboxbtnyes")}async test(){if(this.apiAvailable)return await r("__cmp('consentStatus').userChoiceExists")}},new class extends f{constructor(){super("Evidon")}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return c("#_evidon_banner")}async detectPopup(){return u("#_evidon_banner","any")}async optOut(){return a("#_evidon-decline-button")||(o(n(),["#evidon-prefdiag-overlay","#evidon-prefdiag-background"]),a("#_evidon-option-button"),await l("#evidon-prefdiag-overlay",5e3),a("#evidon-prefdiag-decline")),!0}async optIn(){return a("#_evidon-accept-button")}},new class extends f{constructor(){super("Onetrust"),this.prehideSelectors=["#onetrust-banner-sdk,#onetrust-consent-sdk,.onetrust-pc-dark-filter,.js-consent-banner"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("#onetrust-banner-sdk")}async detectPopup(){return u("#onetrust-banner-sdk","all")}async optOut(){return c("#onetrust-pc-btn-handler")?a("#onetrust-pc-btn-handler"):a(".ot-sdk-show-settings,button.js-cookie-settings"),await l("#onetrust-consent-sdk",2e3),await p(1e3),a("#onetrust-consent-sdk input.category-switch-handler:checked,.js-editor-toggle-state:checked",!0),await l(".save-preference-btn-handler,.js-consent-save",2e3),a(".save-preference-btn-handler,.js-consent-save"),await i((()=>u("#onetrust-banner-sdk","none")),10,500),!0}async optIn(){return a("#onetrust-accept-btn-handler,.js-accept-cookies")}async test(){return await r("window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1")}},new class extends f{constructor(){super("Klaro"),this.prehideSelectors=[".klaro"],this.settingsOpen=!1}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".klaro > .cookie-modal")?(this.settingsOpen=!0,!0):c(".klaro > .cookie-notice")}async detectPopup(){return u(".klaro > .cookie-notice,.klaro > .cookie-modal","any")}async optOut(){return!!a(".klaro .cn-decline")||(this.settingsOpen||(a(".klaro .cn-learn-more"),await l(".klaro > .cookie-modal",2e3),this.settingsOpen=!0),!!a(".klaro .cn-decline")||(a(".cm-purpose:not(.cm-toggle-all) > input:not(.half-checked)",!0),a(".cm-btn-accept")))}async optIn(){return!!a(".klaro .cm-btn-accept-all")||(this.settingsOpen?(a(".cm-purpose:not(.cm-toggle-all) > input.half-checked",!0),a(".cm-btn-accept")):a(".klaro .cookie-notice .cm-btn-success"))}async test(){return await r("klaro.getManager().config.services.every(c => c.required || !klaro.getManager().consents[c.name])")}},new class extends f{constructor(){super("Uniconsent")}get prehideSelectors(){return[".unic",".modal:has(.unic)"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".unic .unic-box,.unic .unic-bar")}async detectPopup(){return u(".unic .unic-box,.unic .unic-bar","any")}async optOut(){if(await l(".unic button",1e3),document.querySelectorAll(".unic button").forEach((e=>{const t=e.textContent;(t.includes("Manage Options")||t.includes("Optionen verwalten"))&&e.click()})),await l(".unic input[type=checkbox]",1e3)){await l(".unic button",1e3),document.querySelectorAll(".unic input[type=checkbox]").forEach((e=>{e.checked&&e.click()}));for(const e of document.querySelectorAll(".unic button")){const t=e.textContent;for(const n of["Confirm Choices","Save Choices","Auswahl speichern"])if(t.includes(n))return e.click(),await p(500),!0}}return!1}async optIn(){return d(".unic #unic-agree")}async test(){await p(1e3);return!c(".unic .unic-box,.unic .unic-bar")}},new class extends f{constructor(){super("Conversant"),this.prehideSelectors=[".cmp-root"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".cmp-root .cmp-receptacle")}async detectPopup(){return u(".cmp-root .cmp-receptacle","any")}async optOut(){if(!await d(".cmp-main-button:not(.cmp-main-button--primary)"))return!1;if(!await l(".cmp-view-tab-tabs"))return!1;await d(".cmp-view-tab-tabs > :first-child"),await d(".cmp-view-tab-tabs > .cmp-view-tab--active:first-child");for(const e of Array.from(document.querySelectorAll(".cmp-accordion-item"))){e.querySelector(".cmp-accordion-item-title").click(),await i((()=>!!e.querySelector(".cmp-accordion-item-content.cmp-active")),10,50);const t=e.querySelector(".cmp-accordion-item-content.cmp-active");t.querySelectorAll(".cmp-toggle-actions .cmp-toggle-deny:not(.cmp-toggle-deny--active)").forEach((e=>e.click())),t.querySelectorAll(".cmp-toggle-actions .cmp-toggle-checkbox:not(.cmp-toggle-checkbox--active)").forEach((e=>e.click()))}return await a(".cmp-main-button:not(.cmp-main-button--primary)"),!0}async optIn(){return d(".cmp-main-button.cmp-main-button--primary")}async test(){return document.cookie.includes("cmp-data=0")}},new class extends f{constructor(){super("tiktok.com"),this.runContext={urlPattern:"tiktok"}}get hasSelfTest(){return!0}get isIntermediate(){return!1}getShadowRoot(){const e=document.querySelector("tiktok-cookie-banner");return e?e.shadowRoot:null}async detectCmp(){return c("tiktok-cookie-banner")}async detectPopup(){return s(this.getShadowRoot().querySelector(".tiktok-cookie-banner"))}async optOut(){const e=this.getShadowRoot().querySelector(".button-wrapper button:first-child");return!!e&&(e.click(),!0)}async optIn(){const e=this.getShadowRoot().querySelector(".button-wrapper button:last-child");return!!e&&(e.click(),!0)}async test(){const e=document.cookie.match(/cookie-consent=([^;]+)/);if(!e)return!1;const t=JSON.parse(decodeURIComponent(e[1]));return Object.values(t).every((e=>"boolean"!=typeof e||!1===e))}},new class extends f{constructor(){super("airbnb"),this.runContext={urlPattern:"^https://(www\\.)?airbnb\\.[^/]+/"},this.prehideSelectors=["div[data-testid=main-cookies-banner-container]",'div:has(> div:first-child):has(> div:last-child):has(> section [data-testid="strictly-necessary-cookies"])']}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("div[data-testid=main-cookies-banner-container]")}async detectPopup(){return u("div[data-testid=main-cookies-banner-container","any")}async optOut(){let e;for(await d("div[data-testid=main-cookies-banner-container] button._snbhip0");e=document.querySelector("[data-testid=modal-container] button[aria-checked=true]:not([disabled])");)e.click();return d("button[data-testid=save-btn]")}async optIn(){return d("div[data-testid=main-cookies-banner-container] button._148dgdpk")}async test(){return await i((()=>!!document.cookie.match("OptanonAlertBoxClosed")),20,200)}}];class v{static setBase(e){v.base=e}static findElement(e,t=null,n=!1){let o=null;return o=null!=t?Array.from(t.querySelectorAll(e.selector)):null!=v.base?Array.from(v.base.querySelectorAll(e.selector)):Array.from(document.querySelectorAll(e.selector)),null!=e.textFilter&&(o=o.filter((t=>{let n=t.textContent.toLowerCase();if(Array.isArray(e.textFilter)){let t=!1;for(let o of e.textFilter)if(-1!==n.indexOf(o.toLowerCase())){t=!0;break}return t}if(null!=e.textFilter)return-1!==n.indexOf(e.textFilter.toLowerCase())}))),null!=e.styleFilters&&(o=o.filter((t=>{let n=window.getComputedStyle(t),o=!0;for(let t of e.styleFilters){let e=n[t.option];o=t.negated?o&&e!==t.value:o&&e===t.value}return o}))),null!=e.displayFilter&&(o=o.filter((t=>e.displayFilter?0!==t.offsetHeight:0===t.offsetHeight))),null!=e.iframeFilter&&(o=o.filter((t=>e.iframeFilter?window.location!==window.parent.location:window.location===window.parent.location))),null!=e.childFilter&&(o=o.filter((t=>{let n=v.base;v.setBase(t);let o=v.find(e.childFilter);return v.setBase(n),null!=o.target}))),n?o:(o.length>1&&console.warn("Multiple possible targets: ",o,e,t),o[0])}static find(e,t=!1){let n=[];if(null!=e.parent){let o=v.findElement(e.parent,null,t);if(null!=o){if(o instanceof Array)return o.forEach((o=>{let i=v.findElement(e.target,o,t);i instanceof Array?i.forEach((e=>{n.push({parent:o,target:e})})):n.push({parent:o,target:i})})),n;{let i=v.findElement(e.target,o,t);i instanceof Array?i.forEach((e=>{n.push({parent:o,target:e})})):n.push({parent:o,target:i})}}}else{let o=v.findElement(e.target,null,t);o instanceof Array?o.forEach((e=>{n.push({parent:null,target:e})})):n.push({parent:null,target:o})}return 0===n.length&&n.push({parent:null,target:null}),t?n:(1!==n.length&&console.warn("Multiple results found, even though multiple false",n),n[0])}}function _(e){const t=v.find(e);return"css"===e.type?!!t.target:"checkbox"===e.type?!!t.target&&t.target.checked:void 0}async function S(e,t){switch(e.type){case"click":return async function(e){const t=v.find(e);null!=t.target&&t.target.click();return x(0)}(e);case"list":return async function(e,t){for(let n of e.actions)await S(n,t)}(e,t);case"consent":return async function(e,t){for(const n of e.consents){const e=-1!==t.indexOf(n.type);if(n.matcher&&n.toggleAction){_(n.matcher)!==e&&await S(n.toggleAction)}else e?await S(n.trueAction):await S(n.falseAction)}}(e,t);case"ifcss":return async function(e,t){v.find(e).target?e.falseAction&&await S(e.falseAction,t):e.trueAction&&await S(e.trueAction,t)}(e,t);case"waitcss":return async function(e){await new Promise((t=>{let n=e.retries||10;const o=e.waitTime||250,i=()=>{const s=v.find(e);(e.negated&&s.target||!e.negated&&!s.target)&&n>0?(n-=1,setTimeout(i,o)):t()};i()}))}(e);case"foreach":return async function(e,t){const n=v.find(e,!0),o=v.base;for(const o of n)o.target&&(v.setBase(o.target),await S(e.action,t));v.setBase(o)}(e,t);case"hide":return async function(e){const t=v.find(e);t.target&&t.target.classList.add("Autoconsent-Hidden")}(e);case"slide":return async function(e){const t=v.find(e),n=v.find(e.dragTarget);if(t.target){let e=t.target.getBoundingClientRect(),o=n.target.getBoundingClientRect(),i=o.top-e.top,s=o.left-e.left;"y"===this.config.axis.toLowerCase()&&(s=0),"x"===this.config.axis.toLowerCase()&&(i=0);let r=window.screenX+e.left+e.width/2,a=window.screenY+e.top+e.height/2,c=e.left+e.width/2,u=e.top+e.height/2,l=document.createEvent("MouseEvents");l.initMouseEvent("mousedown",!0,!0,window,0,r,a,c,u,!1,!1,!1,!1,0,t.target);let d=document.createEvent("MouseEvents");d.initMouseEvent("mousemove",!0,!0,window,0,r+s,a+i,c+s,u+i,!1,!1,!1,!1,0,t.target);let p=document.createEvent("MouseEvents");p.initMouseEvent("mouseup",!0,!0,window,0,r+s,a+i,c+s,u+i,!1,!1,!1,!1,0,t.target),t.target.dispatchEvent(l),await this.waitTimeout(10),t.target.dispatchEvent(d),await this.waitTimeout(10),t.target.dispatchEvent(p)}}(e);case"close":return async function(e){window.close()}();case"wait":return async function(e){await x(e.waitTime)}(e);case"eval":return async function(e){return console.log("eval!",e.code),new Promise((t=>{try{e.async?(window.eval(e.code),setTimeout((()=>{t(window.eval("window.__consentCheckResult"))}),e.timeout||250)):t(window.eval(e.code))}catch(n){console.warn("eval error",n,e.code),t(!1)}}))}(e);default:throw"Unknown action type: "+e.type}}v.base=null;function x(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class P{constructor(e,t){this.name=e,this.config=t,this.methods=new Map,this.runContext=m,t.methods.forEach((e=>{e.action&&this.methods.set(e.name,e.action)})),this.hasSelfTest=!1}get isIntermediate(){return!1}checkRunContext(){return!0}async detectCmp(){return this.config.detectors.map((e=>_(e.presentMatcher))).some((e=>!!e))}async detectPopup(){return this.config.detectors.map((e=>_(e.showingMatcher))).some((e=>!!e))}async executeAction(e,t){return!this.methods.has(e)||S(this.methods.get(e),t)}async optOut(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",[]),await this.executeAction("SAVE_CONSENT"),!0}async optIn(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",["D","A","B","E","F","X"]),await this.executeAction("SAVE_CONSENT"),!0}async openCmp(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),!0}async test(){return!0}}const A=new class{constructor(e,n=null,o=null){if(this.rules=[],this.foundCmp=null,t.sendContentMessage=e,this.sendContentMessage=e,this.rules=[...k],n)this.initialize(n,o);else{o&&this.parseRules(o);e({type:"init",url:window.location.href})}}initialize(e,t){if(this.config=e,e.enabled){if(t&&this.parseRules(t),e.disabledCmps?.length>0&&this.disableCMPs(e.disabledCmps),e.enablePrehide)if(document.documentElement)this.prehideElements();else{const e=()=>{window.removeEventListener("DOMContentLoaded",e),this.prehideElements()};window.addEventListener("DOMContentLoaded",e)}if("loading"===document.readyState){const e=()=>{window.removeEventListener("DOMContentLoaded",e),this.start()};window.addEventListener("DOMContentLoaded",e)}else this.start()}}parseRules(e){Object.keys(e.consentomatic).forEach((t=>{this.addConsentomaticCMP(t,e.consentomatic[t])})),e.autoconsent.forEach((e=>{this.addCMP(e)}))}addCMP(e){this.rules.push(function(e){return new g(e)}(e))}disableCMPs(e){this.rules=this.rules.filter((t=>!e.includes(t.name)))}addConsentomaticCMP(e,t){this.rules.push(new P(`com_${e}`,t))}start(){window.requestIdleCallback?window.requestIdleCallback((()=>this._start()),{timeout:500}):this._start()}async _start(){const e=await this.findCmp(this.config.detectRetries);if(e.length>0){const t=[];for(const n of e)this.sendContentMessage({type:"cmpDetected",url:location.href,cmp:n.name}),t.push(this.waitForPopup(n).then((e=>e?(this.foundCmp||(this.foundCmp=n),this.sendContentMessage({type:"popupFound",cmp:n.name,url:location.href}),!0):Promise.reject(`${n.name} popup not found`))));let n=!1;for(const e of t)try{await e,n=!0;break}catch(e){continue}return n?"optOut"===this.config.autoAction?await this.doOptOut():"optIn"!==this.config.autoAction||await this.doOptIn():(this.config.enablePrehide&&h(),!1)}return this.config.enablePrehide&&h(),!1}async findCmp(e){const t=[];for(const e of this.rules)try{if(!e.checkRunContext())continue;await e.detectCmp()&&t.push(e)}catch(e){}if(t.length>1){const e={msg:"Found multiple CMPs, check the detection rules.",cmps:t.map((e=>e.name))};this.sendContentMessage({type:"autoconsentError",details:e})}return 0===t.length&&e>0?new Promise((t=>{setTimeout((async()=>{const n=this.findCmp(e-1);t(n)}),500)})):t}async doOptOut(){let e;return e=!!this.foundCmp&&await this.foundCmp.optOut(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optOutResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,scheduleSelfTest:this.foundCmp&&this.foundCmp.hasSelfTest,url:location.href}),e&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),e}async doOptIn(){let e;return e=!!this.foundCmp&&await this.foundCmp.optIn(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optInResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,scheduleSelfTest:!1,url:location.href}),e&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),e}async doSelfTest(){let e;return e=!!this.foundCmp&&await this.foundCmp.test(),this.sendContentMessage({type:"selfTestResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,url:location.href}),e}async waitForPopup(e,t=5,n=500){const o=await e.detectPopup();return!o&&t>0?new Promise((o=>setTimeout((()=>o(this.waitForPopup(e,t-1,n))),n))):o}prehideElements(){return function(e){return o(n("autoconsent-prehide"),e,"opacity")}(this.rules.reduce(((e,t)=>t.prehideSelectors?[...e,...t.prehideSelectors]:e),["#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"]))}async receiveMessageCallback(e){switch(e.type){case"initResp":this.initialize(e.config,e.rules);break;case"optIn":await this.doOptIn();break;case"optOut":await this.doOptOut();break;case"selfTest":await this.doSelfTest();break;case"evalResp":!function(e,n){const o=t.pending.get(e);o?(t.pending.delete(e),o.timer&&window.clearTimeout(o.timer),o.resolve(n)):console.warn("no eval #",e)}(e.id,e.result)}}}(chrome.runtime.sendMessage);chrome.runtime.onMessage.addListener((e=>Promise.resolve(A.receiveMessageCallback(e))))}();
|
|
1
|
+
!function(){"use strict";class e{constructor(e,t=1e3){this.id=e,this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),this.timer=window.setTimeout((()=>{this.reject(new Error("timeout"))}),t)}}const t={pending:new Map,sendContentMessage:null};function n(e="autoconsent-css-rules"){const t=`style#${e}`,n=document.querySelector(t);if(n&&n instanceof HTMLStyleElement)return n;{const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("style");return n.id=e,t.appendChild(n),n}}function o(e,t,n="display"){const o="opacity"===n?"opacity: 0":"display: none",i=`${t.join(",")} { ${o} !important; z-index: -1 !important; pointer-events: none !important; } `;return e instanceof HTMLStyleElement&&(e.innerText+=i,t.length>0)}async function i(e,t,n){const o=await e();return!o&&t>0?new Promise((o=>{setTimeout((async()=>{o(i(e,t-1,n))}),n)})):Promise.resolve(o)}function s(e){if(!e)return!1;if(null!==e.offsetParent)return!0;{const t=window.getComputedStyle(e);if("fixed"===t.position&&"none"!==t.display)return!0}return!1}function r(n){return function(n){let o;o=crypto&&void 0!==crypto.randomUUID?crypto.randomUUID():Math.random().toString(),t.sendContentMessage({type:"eval",id:o,code:n});const i=new e(o);return t.pending.set(i.id,i),i.promise}(n).catch((e=>!1))}function a(e,t=!1){const n=document.querySelectorAll(e);return n.length>0&&(t?n.forEach((e=>e.click())):n[0].click()),n.length>0}function c(e){return null!==document.querySelector(e)}function u(e,t){const n=document.querySelectorAll(e),o=new Array(n.length);return n.forEach(((e,t)=>{o[t]=s(e)})),"none"===t?o.every((e=>!e)):0!==o.length&&("any"===t?o.some((e=>e)):o.every((e=>e)))}function l(e,t=1e4){return i((()=>null!==document.querySelector(e)),Math.ceil(t/200),200)}async function d(e,t=1e4,n=!1){return await l(e,t),a(e,n)}function p(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}function h(){const e=n("autoconsent-prehide");return e&&e.remove(),!!e}const m={main:!0,frame:!1,urlPattern:""};class f{constructor(e){this.runContext=m,this.name=e}get hasSelfTest(){throw new Error("Not Implemented")}get isIntermediate(){throw new Error("Not Implemented")}checkRunContext(){const e={...m,...this.runContext},t=window.top===window;return!(t&&!e.main)&&(!(!t&&!e.frame)&&!(e.urlPattern&&!window.location.href.match(e.urlPattern)))}detectCmp(){throw new Error("Not Implemented")}async detectPopup(){return!1}optOut(){throw new Error("Not Implemented")}optIn(){throw new Error("Not Implemented")}openCmp(){throw new Error("Not Implemented")}async test(){return Promise.resolve(!0)}}async function y(e){const t=[];if(e.exists&&t.push(c(e.exists)),e.visible&&t.push(u(e.visible,e.check)),e.eval){const n=r(e.eval);t.push(n)}var s,h;if(e.waitFor&&t.push(l(e.waitFor,e.timeout)),e.waitForVisible&&t.push(function(e,t=1e4,n="any"){return i((()=>u(e,n)),Math.ceil(t/200),200)}(e.waitForVisible,e.timeout,e.check)),e.click&&t.push(a(e.click,e.all)),e.waitForThenClick&&t.push(d(e.waitForThenClick,e.timeout,e.all)),e.wait&&t.push(p(e.wait)),e.hide&&t.push((s=e.hide,h=e.method,o(n(),s,h))),e.if){if(!e.if.exists&&!e.if.visible)return console.error("invalid conditional rule",e.if),!1;await y(e.if)?t.push(w(e.then)):e.else&&t.push(w(e.else))}if(0===t.length)return!1;return(await Promise.all(t)).reduce(((e,t)=>e&&t),!0)}async function w(e){for(const t of e){if(!await y(t)&&!t.optional)return!1}return!0}class g extends f{constructor(e){super(e.name),this.config=e,this.runContext=e.runContext||m}get hasSelfTest(){return!!this.config.test}get isIntermediate(){return!!this.config.intermediate}get prehideSelectors(){return this.config.prehideSelectors}async detectCmp(){return!!this.config.detectCmp&&async function(e){const t=e.map((e=>y(e)));return(await Promise.all(t)).every((e=>!!e))}(this.config.detectCmp)}async detectPopup(){return!!this.config.detectPopup&&w(this.config.detectPopup)}async optOut(){return!!this.config.optOut&&w(this.config.optOut)}async optIn(){return!!this.config.optIn&&w(this.config.optIn)}async openCmp(){return!!this.config.openCmp&&w(this.config.openCmp)}async test(){return this.hasSelfTest?w(this.config.test):super.test()}}const b="#truste-show-consent",C="#truste-consent-track";const k=[new class extends f{constructor(){super("TrustArc-top"),this.prehideSelectors=[".trustarc-banner-container",`.truste_popframe,.truste_overlay,.truste_box_overlay,${C}`],this.runContext={main:!0,frame:!1},this._shortcutButton=null,this._optInDone=!1}get hasSelfTest(){return!1}get isIntermediate(){return!this._optInDone&&!this._shortcutButton}async detectCmp(){const e=c(`#truste-show-consent,${C}`);return e&&(this._shortcutButton=document.querySelector("#truste-consent-required")),e}async detectPopup(){return u(`#truste-consent-content,#trustarc-banner-overlay,${C}`,"all")}openFrame(){a(b)}async optOut(){return this._shortcutButton?(this._shortcutButton.click(),!0):(o(n(),[".truste_popframe",".truste_overlay",".truste_box_overlay",C]),a(b),setTimeout((()=>{n().remove()}),1e4),!0)}async optIn(){return this._optInDone=!0,a("#truste-consent-button")}async openCmp(){return!0}async test(){return!0}},new class extends f{constructor(){super("TrustArc-frame"),this.runContext={main:!1,frame:!0,urlPattern:"^https://consent-pref\\.trustarc\\.com/\\?"}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return!0}async detectPopup(){return u("#defaultpreferencemanager","any")&&u(".mainContent","any")}async navigateToSettings(){return await i((async()=>c(".shp")||u(".advance","any")||c(".switch span:first-child")),10,500),c(".shp")&&a(".shp"),await l(".prefPanel",5e3),u(".advance","any")&&a(".advance"),await i((()=>u(".switch span:first-child","any")),5,1e3)}async optOut(){return await i((()=>"complete"===document.readyState),20,100),await l(".mainContent[aria-hidden=false]",5e3),!!a(".rejectAll")||(c(".prefPanel")&&await l('.prefPanel[style="visibility: visible;"]',3e3),a("#catDetails0")?(a(".submit"),!0):(a(".required")||(await this.navigateToSettings(),a(".switch span:nth-child(1):not(.active)",!0),a(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{a("#gwt-debug-close_id")}))),!0))}async optIn(){return a(".call")||(await this.navigateToSettings(),a(".switch span:nth-child(2)",!0),a(".submit"),l("#gwt-debug-close_id",3e5).then((()=>{a("#gwt-debug-close_id")}))),!0}},new class extends f{constructor(){super("Cybotcookiebot"),this.prehideSelectors=["#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookieoverlay"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("#CybotCookiebotDialogBodyLevelButtonPreferences")}async detectPopup(){return c("#CybotCookiebotDialog,#dtcookie-container,#cookiebanner,#cb-cookiebanner")}async optOut(){return a(".cookie-alert-extended-detail-link")?(await l(".cookie-alert-configuration",2e3),a(".cookie-alert-configuration-input:checked",!0),a(".cookie-alert-extended-button-secondary"),!0):c("#dtcookie-container")?a(".h-dtcookie-decline"):(a(".cookiebot__button--settings")||a("#CybotCookiebotDialogBodyButtonDecline")||(a(".cookiebanner__link--details"),a('.CybotCookiebotDialogBodyLevelButton:checked:enabled,input[id*="CybotCookiebotDialogBodyLevelButton"]:checked:enabled',!0),a("#CybotCookiebotDialogBodyButtonDecline"),a("input[id^=CybotCookiebotDialogBodyLevelButton]:checked",!0),c("#CybotCookiebotDialogBodyButtonAcceptSelected")?a("#CybotCookiebotDialogBodyButtonAcceptSelected"):a("#CybotCookiebotDialogBodyLevelButtonAccept,#CybotCookiebotDialogBodyButtonAccept,#CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection",!0),await r("window.CookieConsent.hasResponse !== true")&&(await r("window.Cookiebot.dialog.submitConsent()"),await p(500)),c("#cb-confirmedSettings")&&await r("endCookieProcess()")),!0)}async optIn(){return c("#dtcookie-container")?a(".h-dtcookie-accept"):(a(".CybotCookiebotDialogBodyLevelButton:not(:checked):enabled",!0),a("#CybotCookiebotDialogBodyLevelButtonAccept"),a("#CybotCookiebotDialogBodyButtonAccept"),!0)}async test(){return r("window.CookieConsent.declined === true")}},new class extends f{constructor(){super("Sourcepoint-top"),this.prehideSelectors=["div[id^='sp_message_container_'],.message-overlay"],this.runContext={main:!0,frame:!1}}get hasSelfTest(){return!0}get isIntermediate(){return!0}async detectCmp(){return c("div[id^='sp_message_container_']")}async detectPopup(){return u("div[id^='sp_message_container_']","all")}async optIn(){return!0}async optOut(){const e=document.querySelector(".sp-message-open");return e&&e.classList.remove("sp-message-open"),!0}async test(){return await r("__tcfapi('getTCData', 2, r => window.__rcsResult = r)"),await r("Object.values(window.__rcsResult.purpose.consents).every(c => !c)")}},new class extends f{constructor(){super("Sourcepoint-frame"),this.ccpaMode=!1,this.runContext={main:!1,frame:!0}}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){const e=new URL(location.href);return e.searchParams.has("message_id")&&"ccpa-notice.sp-prod.net"===e.hostname?(this.ccpaMode=!0,!0):("/index.html"===e.pathname||"/privacy-manager/index.html"===e.pathname)&&(e.searchParams.has("message_id")||e.searchParams.has("requestUUID")||e.searchParams.has("consentUUID"))}async detectPopup(){return await l(".sp_choice_type_11,.sp_choice_type_12,.sp_choice_type_13,.sp_choice_type_ACCEPT_ALL",2e3),!c(".sp_choice_type_9")}async optIn(){return await l(".sp_choice_type_11,.sp_choice_type_ACCEPT_ALL",2e3),!!a(".sp_choice_type_11")||!!a(".sp_choice_type_ACCEPT_ALL")}isManagerOpen(){return"/privacy-manager/index.html"===new URL(location.href).pathname}async optOut(){if(!this.isManagerOpen()){if(!await l(".sp_choice_type_12,.sp_choice_type_13"))return!1;if(!c(".sp_choice_type_12"))return a(".sp_choice_type_13");a(".sp_choice_type_12"),await i((()=>"/privacy-manager/index.html"===location.pathname),200,100)}await l(".type-modal",2e4);try{const e=".sp_choice_type_REJECT_ALL",t=".reject-toggle",n=await Promise.race([l(e,2e3).then((e=>e?0:-1)),l(t,2e3).then((e=>e?1:-1)),l(".pm-features",2e3).then((e=>e?2:-1))]);if(0===n)return await p(1e3),a(e);1===n?a(t):2===n&&(await l(".pm-features",1e4),a(".checked > span",!0),a(".chevron"))}catch(e){}return a(".sp_choice_type_SAVE_AND_EXIT"),!0}},new class extends f{constructor(){super("consentmanager.net"),this.prehideSelectors=["#cmpbox,#cmpbox2"],this.apiAvailable=!1}get hasSelfTest(){return this.apiAvailable}get isIntermediate(){return!1}async detectCmp(){return this.apiAvailable=await r('window.__cmp && typeof __cmp("getCMPData") === "object"'),!!this.apiAvailable||c("#cmpbox")}async detectPopup(){return this.apiAvailable?(await p(500),await r("!__cmp('consentStatus').userChoiceExists")):u("#cmpbox .cmpmore","any")}async optOut(){return await p(500),this.apiAvailable?await r("__cmp('setConsent', 0)"):!!a(".cmpboxbtnno")||(c(".cmpwelcomeprpsbtn")?(a(".cmpwelcomeprpsbtn > a[aria-checked=true]",!0),a(".cmpboxbtnsave"),!0):(a(".cmpboxbtncustom"),await l(".cmptblbox",2e3),a(".cmptdchoice > a[aria-checked=true]",!0),a(".cmpboxbtnyescustomchoices"),!0))}async optIn(){return this.apiAvailable?await r("__cmp('setConsent', 1)"):a(".cmpboxbtnyes")}async test(){if(this.apiAvailable)return await r("__cmp('consentStatus').userChoiceExists")}},new class extends f{constructor(){super("Evidon")}get hasSelfTest(){return!1}get isIntermediate(){return!1}async detectCmp(){return c("#_evidon_banner")}async detectPopup(){return u("#_evidon_banner","any")}async optOut(){return a("#_evidon-decline-button")||(o(n(),["#evidon-prefdiag-overlay","#evidon-prefdiag-background"]),a("#_evidon-option-button"),await l("#evidon-prefdiag-overlay",5e3),a("#evidon-prefdiag-decline")),!0}async optIn(){return a("#_evidon-accept-button")}},new class extends f{constructor(){super("Onetrust"),this.prehideSelectors=["#onetrust-banner-sdk,#onetrust-consent-sdk,.onetrust-pc-dark-filter,.js-consent-banner"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("#onetrust-banner-sdk")}async detectPopup(){return u("#onetrust-banner-sdk","all")}async optOut(){return c("#onetrust-pc-btn-handler")?a("#onetrust-pc-btn-handler"):a(".ot-sdk-show-settings,button.js-cookie-settings"),await l("#onetrust-consent-sdk",2e3),await p(1e3),a("#onetrust-consent-sdk input.category-switch-handler:checked,.js-editor-toggle-state:checked",!0),await l(".save-preference-btn-handler,.js-consent-save",2e3),a(".save-preference-btn-handler,.js-consent-save"),await i((()=>u("#onetrust-banner-sdk","none")),10,500),!0}async optIn(){return a("#onetrust-accept-btn-handler,.js-accept-cookies")}async test(){return await r("window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1")}},new class extends f{constructor(){super("Klaro"),this.prehideSelectors=[".klaro"],this.settingsOpen=!1}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".klaro > .cookie-modal")?(this.settingsOpen=!0,!0):c(".klaro > .cookie-notice")}async detectPopup(){return u(".klaro > .cookie-notice,.klaro > .cookie-modal","any")}async optOut(){return!!a(".klaro .cn-decline")||(this.settingsOpen||(a(".klaro .cn-learn-more"),await l(".klaro > .cookie-modal",2e3),this.settingsOpen=!0),!!a(".klaro .cn-decline")||(a(".cm-purpose:not(.cm-toggle-all) > input:not(.half-checked)",!0),a(".cm-btn-accept")))}async optIn(){return!!a(".klaro .cm-btn-accept-all")||(this.settingsOpen?(a(".cm-purpose:not(.cm-toggle-all) > input.half-checked",!0),a(".cm-btn-accept")):a(".klaro .cookie-notice .cm-btn-success"))}async test(){return await r("klaro.getManager().config.services.every(c => c.required || !klaro.getManager().consents[c.name])")}},new class extends f{constructor(){super("Uniconsent")}get prehideSelectors(){return[".unic",".modal:has(.unic)"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".unic .unic-box,.unic .unic-bar")}async detectPopup(){return u(".unic .unic-box,.unic .unic-bar","any")}async optOut(){if(await l(".unic button",1e3),document.querySelectorAll(".unic button").forEach((e=>{const t=e.textContent;(t.includes("Manage Options")||t.includes("Optionen verwalten"))&&e.click()})),await l(".unic input[type=checkbox]",1e3)){await l(".unic button",1e3),document.querySelectorAll(".unic input[type=checkbox]").forEach((e=>{e.checked&&e.click()}));for(const e of document.querySelectorAll(".unic button")){const t=e.textContent;for(const n of["Confirm Choices","Save Choices","Auswahl speichern"])if(t.includes(n))return e.click(),await p(500),!0}}return!1}async optIn(){return d(".unic #unic-agree")}async test(){await p(1e3);return!c(".unic .unic-box,.unic .unic-bar")}},new class extends f{constructor(){super("Conversant"),this.prehideSelectors=[".cmp-root"]}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c(".cmp-root .cmp-receptacle")}async detectPopup(){return u(".cmp-root .cmp-receptacle","any")}async optOut(){if(!await d(".cmp-main-button:not(.cmp-main-button--primary)"))return!1;if(!await l(".cmp-view-tab-tabs"))return!1;await d(".cmp-view-tab-tabs > :first-child"),await d(".cmp-view-tab-tabs > .cmp-view-tab--active:first-child");for(const e of Array.from(document.querySelectorAll(".cmp-accordion-item"))){e.querySelector(".cmp-accordion-item-title").click(),await i((()=>!!e.querySelector(".cmp-accordion-item-content.cmp-active")),10,50);const t=e.querySelector(".cmp-accordion-item-content.cmp-active");t.querySelectorAll(".cmp-toggle-actions .cmp-toggle-deny:not(.cmp-toggle-deny--active)").forEach((e=>e.click())),t.querySelectorAll(".cmp-toggle-actions .cmp-toggle-checkbox:not(.cmp-toggle-checkbox--active)").forEach((e=>e.click()))}return await a(".cmp-main-button:not(.cmp-main-button--primary)"),!0}async optIn(){return d(".cmp-main-button.cmp-main-button--primary")}async test(){return document.cookie.includes("cmp-data=0")}},new class extends f{constructor(){super("tiktok.com"),this.runContext={urlPattern:"tiktok"}}get hasSelfTest(){return!0}get isIntermediate(){return!1}getShadowRoot(){const e=document.querySelector("tiktok-cookie-banner");return e?e.shadowRoot:null}async detectCmp(){return c("tiktok-cookie-banner")}async detectPopup(){return s(this.getShadowRoot().querySelector(".tiktok-cookie-banner"))}async optOut(){const e=this.getShadowRoot().querySelector(".button-wrapper button:first-child");return!!e&&(e.click(),!0)}async optIn(){const e=this.getShadowRoot().querySelector(".button-wrapper button:last-child");return!!e&&(e.click(),!0)}async test(){const e=document.cookie.match(/cookie-consent=([^;]+)/);if(!e)return!1;const t=JSON.parse(decodeURIComponent(e[1]));return Object.values(t).every((e=>"boolean"!=typeof e||!1===e))}},new class extends f{constructor(){super("airbnb"),this.runContext={urlPattern:"^https://(www\\.)?airbnb\\.[^/]+/"},this.prehideSelectors=["div[data-testid=main-cookies-banner-container]",'div:has(> div:first-child):has(> div:last-child):has(> section [data-testid="strictly-necessary-cookies"])']}get hasSelfTest(){return!0}get isIntermediate(){return!1}async detectCmp(){return c("div[data-testid=main-cookies-banner-container]")}async detectPopup(){return u("div[data-testid=main-cookies-banner-container","any")}async optOut(){let e;for(await d("div[data-testid=main-cookies-banner-container] button._snbhip0");e=document.querySelector("[data-testid=modal-container] button[aria-checked=true]:not([disabled])");)e.click();return d("button[data-testid=save-btn]")}async optIn(){return d("div[data-testid=main-cookies-banner-container] button._148dgdpk")}async test(){return await i((()=>!!document.cookie.match("OptanonAlertBoxClosed")),20,200)}}];class v{static setBase(e){v.base=e}static findElement(e,t=null,n=!1){let o=null;return o=null!=t?Array.from(t.querySelectorAll(e.selector)):null!=v.base?Array.from(v.base.querySelectorAll(e.selector)):Array.from(document.querySelectorAll(e.selector)),null!=e.textFilter&&(o=o.filter((t=>{let n=t.textContent.toLowerCase();if(Array.isArray(e.textFilter)){let t=!1;for(let o of e.textFilter)if(-1!==n.indexOf(o.toLowerCase())){t=!0;break}return t}if(null!=e.textFilter)return-1!==n.indexOf(e.textFilter.toLowerCase())}))),null!=e.styleFilters&&(o=o.filter((t=>{let n=window.getComputedStyle(t),o=!0;for(let t of e.styleFilters){let e=n[t.option];o=t.negated?o&&e!==t.value:o&&e===t.value}return o}))),null!=e.displayFilter&&(o=o.filter((t=>e.displayFilter?0!==t.offsetHeight:0===t.offsetHeight))),null!=e.iframeFilter&&(o=o.filter((t=>e.iframeFilter?window.location!==window.parent.location:window.location===window.parent.location))),null!=e.childFilter&&(o=o.filter((t=>{let n=v.base;v.setBase(t);let o=v.find(e.childFilter);return v.setBase(n),null!=o.target}))),n?o:(o.length>1&&console.warn("Multiple possible targets: ",o,e,t),o[0])}static find(e,t=!1){let n=[];if(null!=e.parent){let o=v.findElement(e.parent,null,t);if(null!=o){if(o instanceof Array)return o.forEach((o=>{let i=v.findElement(e.target,o,t);i instanceof Array?i.forEach((e=>{n.push({parent:o,target:e})})):n.push({parent:o,target:i})})),n;{let i=v.findElement(e.target,o,t);i instanceof Array?i.forEach((e=>{n.push({parent:o,target:e})})):n.push({parent:o,target:i})}}}else{let o=v.findElement(e.target,null,t);o instanceof Array?o.forEach((e=>{n.push({parent:null,target:e})})):n.push({parent:null,target:o})}return 0===n.length&&n.push({parent:null,target:null}),t?n:(1!==n.length&&console.warn("Multiple results found, even though multiple false",n),n[0])}}function _(e){const t=v.find(e);return"css"===e.type?!!t.target:"checkbox"===e.type?!!t.target&&t.target.checked:void 0}async function S(e,t){switch(e.type){case"click":return async function(e){const t=v.find(e);null!=t.target&&t.target.click();return x(0)}(e);case"list":return async function(e,t){for(let n of e.actions)await S(n,t)}(e,t);case"consent":return async function(e,t){for(const n of e.consents){const e=-1!==t.indexOf(n.type);if(n.matcher&&n.toggleAction){_(n.matcher)!==e&&await S(n.toggleAction)}else e?await S(n.trueAction):await S(n.falseAction)}}(e,t);case"ifcss":return async function(e,t){v.find(e).target?e.falseAction&&await S(e.falseAction,t):e.trueAction&&await S(e.trueAction,t)}(e,t);case"waitcss":return async function(e){await new Promise((t=>{let n=e.retries||10;const o=e.waitTime||250,i=()=>{const s=v.find(e);(e.negated&&s.target||!e.negated&&!s.target)&&n>0?(n-=1,setTimeout(i,o)):t()};i()}))}(e);case"foreach":return async function(e,t){const n=v.find(e,!0),o=v.base;for(const o of n)o.target&&(v.setBase(o.target),await S(e.action,t));v.setBase(o)}(e,t);case"hide":return async function(e){const t=v.find(e);t.target&&t.target.classList.add("Autoconsent-Hidden")}(e);case"slide":return async function(e){const t=v.find(e),n=v.find(e.dragTarget);if(t.target){let e=t.target.getBoundingClientRect(),o=n.target.getBoundingClientRect(),i=o.top-e.top,s=o.left-e.left;"y"===this.config.axis.toLowerCase()&&(s=0),"x"===this.config.axis.toLowerCase()&&(i=0);let r=window.screenX+e.left+e.width/2,a=window.screenY+e.top+e.height/2,c=e.left+e.width/2,u=e.top+e.height/2,l=document.createEvent("MouseEvents");l.initMouseEvent("mousedown",!0,!0,window,0,r,a,c,u,!1,!1,!1,!1,0,t.target);let d=document.createEvent("MouseEvents");d.initMouseEvent("mousemove",!0,!0,window,0,r+s,a+i,c+s,u+i,!1,!1,!1,!1,0,t.target);let p=document.createEvent("MouseEvents");p.initMouseEvent("mouseup",!0,!0,window,0,r+s,a+i,c+s,u+i,!1,!1,!1,!1,0,t.target),t.target.dispatchEvent(l),await this.waitTimeout(10),t.target.dispatchEvent(d),await this.waitTimeout(10),t.target.dispatchEvent(p)}}(e);case"close":return async function(e){window.close()}();case"wait":return async function(e){await x(e.waitTime)}(e);case"eval":return async function(e){return console.log("eval!",e.code),new Promise((t=>{try{e.async?(window.eval(e.code),setTimeout((()=>{t(window.eval("window.__consentCheckResult"))}),e.timeout||250)):t(window.eval(e.code))}catch(n){console.warn("eval error",n,e.code),t(!1)}}))}(e);default:throw"Unknown action type: "+e.type}}v.base=null;function x(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class P{constructor(e,t){this.name=e,this.config=t,this.methods=new Map,this.runContext=m,t.methods.forEach((e=>{e.action&&this.methods.set(e.name,e.action)})),this.hasSelfTest=!1}get isIntermediate(){return!1}checkRunContext(){return!0}async detectCmp(){return this.config.detectors.map((e=>_(e.presentMatcher))).some((e=>!!e))}async detectPopup(){return this.config.detectors.map((e=>_(e.showingMatcher))).some((e=>!!e))}async executeAction(e,t){return!this.methods.has(e)||S(this.methods.get(e),t)}async optOut(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",[]),await this.executeAction("SAVE_CONSENT"),!0}async optIn(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),await this.executeAction("HIDE_CMP"),await this.executeAction("DO_CONSENT",["D","A","B","E","F","X"]),await this.executeAction("SAVE_CONSENT"),!0}async openCmp(){return await this.executeAction("HIDE_CMP"),await this.executeAction("OPEN_OPTIONS"),!0}async test(){return!0}}const A=new class{constructor(e,n=null,o=null){if(this.rules=[],this.foundCmp=null,t.sendContentMessage=e,this.sendContentMessage=e,this.rules=[...k],n)this.initialize(n,o);else{o&&this.parseRules(o);e({type:"init",url:window.location.href})}}initialize(e,t){if(this.config=e,e.enabled){if(t&&this.parseRules(t),e.disabledCmps?.length>0&&this.disableCMPs(e.disabledCmps),e.enablePrehide)if(document.documentElement)this.prehideElements();else{const e=()=>{window.removeEventListener("DOMContentLoaded",e),this.prehideElements()};window.addEventListener("DOMContentLoaded",e)}if("loading"===document.readyState){const e=()=>{window.removeEventListener("DOMContentLoaded",e),this.start()};window.addEventListener("DOMContentLoaded",e)}else this.start()}}parseRules(e){Object.keys(e.consentomatic).forEach((t=>{this.addConsentomaticCMP(t,e.consentomatic[t])})),e.autoconsent.forEach((e=>{this.addCMP(e)}))}addCMP(e){this.rules.push(function(e){return new g(e)}(e))}disableCMPs(e){this.rules=this.rules.filter((t=>!e.includes(t.name)))}addConsentomaticCMP(e,t){this.rules.push(new P(`com_${e}`,t))}start(){window.requestIdleCallback?window.requestIdleCallback((()=>this._start()),{timeout:500}):this._start()}async _start(){const e=await this.findCmp(this.config.detectRetries);if(e.length>0){const t=[];for(const n of e)this.sendContentMessage({type:"cmpDetected",url:location.href,cmp:n.name}),t.push(this.waitForPopup(n).then((e=>e?(this.foundCmp||(this.foundCmp=n),this.sendContentMessage({type:"popupFound",cmp:n.name,url:location.href}),!0):Promise.reject(`${n.name} popup not found`))));let n=!1;for(const e of t)try{await e,n=!0;break}catch(e){continue}return n?"optOut"===this.config.autoAction?await this.doOptOut():"optIn"!==this.config.autoAction||await this.doOptIn():(this.config.enablePrehide&&h(),!1)}return this.config.enablePrehide&&h(),!1}async findCmp(e){const t=[];for(const e of this.rules)try{if(!e.checkRunContext())continue;await e.detectCmp()&&t.push(e)}catch(e){}if(t.length>1){const e={msg:"Found multiple CMPs, check the detection rules.",cmps:t.map((e=>e.name))};this.sendContentMessage({type:"autoconsentError",details:e})}return 0===t.length&&e>0?new Promise((t=>{setTimeout((async()=>{const n=this.findCmp(e-1);t(n)}),500)})):t}async doOptOut(){let e;return e=!!this.foundCmp&&await this.foundCmp.optOut(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optOutResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,scheduleSelfTest:this.foundCmp&&this.foundCmp.hasSelfTest,url:location.href}),e&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),e}async doOptIn(){let e;return e=!!this.foundCmp&&await this.foundCmp.optIn(),this.config.enablePrehide&&h(),this.sendContentMessage({type:"optInResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,scheduleSelfTest:!1,url:location.href}),e&&!this.foundCmp.isIntermediate&&this.sendContentMessage({type:"autoconsentDone",cmp:this.foundCmp.name,url:location.href}),e}async doSelfTest(){let e;return e=!!this.foundCmp&&await this.foundCmp.test(),this.sendContentMessage({type:"selfTestResult",cmp:this.foundCmp?this.foundCmp.name:"none",result:e,url:location.href}),e}async waitForPopup(e,t=5,n=500){const o=await e.detectPopup();return!o&&t>0?new Promise((o=>setTimeout((()=>o(this.waitForPopup(e,t-1,n))),n))):o}prehideElements(){return function(e){return o(n("autoconsent-prehide"),e,"opacity")}(this.rules.reduce(((e,t)=>t.prehideSelectors?[...e,...t.prehideSelectors]:e),["#didomi-popup,.didomi-popup-container,.didomi-popup-notice,.didomi-consent-popup-preferences,#didomi-notice,.didomi-popup-backdrop,.didomi-screen-medium"]))}async receiveMessageCallback(e){switch(e.type){case"initResp":this.initialize(e.config,e.rules);break;case"optIn":await this.doOptIn();break;case"optOut":await this.doOptOut();break;case"selfTest":await this.doSelfTest();break;case"evalResp":!function(e,n){const o=t.pending.get(e);o?(t.pending.delete(e),o.timer&&window.clearTimeout(o.timer),o.resolve(n)):console.warn("no eval #",e)}(e.id,e.result)}}}(chrome.runtime.sendMessage);chrome.runtime.onMessage.addListener((e=>Promise.resolve(A.receiveMessageCallback(e))))}();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 2,
|
|
3
3
|
"name": "Autoconsent",
|
|
4
|
-
"version": "2022.
|
|
4
|
+
"version": "2022.11.3",
|
|
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
|
+
}
|
|
@@ -170,32 +170,6 @@
|
|
|
170
170
|
}
|
|
171
171
|
]
|
|
172
172
|
},
|
|
173
|
-
{
|
|
174
|
-
"name": "asus",
|
|
175
|
-
"detectCmp": [
|
|
176
|
-
{
|
|
177
|
-
"exists": "#cookie-policy-info"
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
"detectPopup": [
|
|
181
|
-
{
|
|
182
|
-
"visible": "#cookie-policy-info"
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
"optIn": [
|
|
186
|
-
{
|
|
187
|
-
"click": ".btn-read-ck"
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
"optOut": [
|
|
191
|
-
{
|
|
192
|
-
"click": ".btn-setting"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"click": ".btn-save"
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
},
|
|
199
173
|
{
|
|
200
174
|
"name": "ausopen.com",
|
|
201
175
|
"isHidingRule": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";const e=chrome.runtime.getManifest().manifest_version,t={};async function o(o){if(2!==e)return chrome.storage.local.set(o);Object.assign(t,o)}async function a(o){return null===o?2===e?t:await chrome.storage.local.get(null):2===e?t[o]:(await chrome.storage.local.get(o))?.[o]}async function s(o){if(2!==e)return chrome.storage.local.remove(o);delete t[o]}async function n(e,t,o=""){let a="",s="icons/cookie-idle.png";"success"===t?(a=`Opt out successful! (${o})`,s="icons/party.png"):"complete"===t?(a=`Opt out complete! (${o})`,s="icons/tick.png"):"working"===t?(a=`Processing... (${o})`,s="icons/cog.png"):"verified"===t?(a=`Verified (${o})`,s="icons/verified.png"):"idle"===t?(a="Idle",s="icons/cookie-idle.png"):"available"===t&&(a=`Click to opt out (${o})`,s="icons/cookie.png");const n=chrome.action||chrome.pageAction;chrome.pageAction&&chrome.pageAction.show(e),await n.setTitle({tabId:e,title:a}),await n.setIcon({tabId:e,path:s})}async function c(){const e=await fetch("./rules.json");o({rules:await e.json()})}async function i(){console.log("init sw");const e=await a("config");if(console.log("storedConfig",e),!e){console.log("init config");const e={enabled:!0,autoAction:"optOut",disabledCmps:[],enablePrehide:!0,detectRetries:20};await o({config:e})}}chrome.runtime.onInstalled.addListener((()=>{c(),i()})),2===e&&(c(),i()),chrome.tabs.onRemoved.addListener((e=>{s(`detected${e}`)})),chrome.runtime.onMessage.addListener((async(t,c)=>{const i=c.tab.id,r=c.frameId,l=await a("rules"),d=await a("config");switch(t.type){case"init":0===r&&await n(i,"idle"),chrome.tabs.sendMessage(i,{type:"initResp",rules:l,config:d},{frameId:r});break;case"eval":(async function(t,o,a){return 2===e?new Promise((e=>{chrome.tabs.executeScript(t,{frameId:o,code:`!!window.eval(decodeURIComponent("${encodeURIComponent(a)}"))`},(t=>{e([{result:t,frameId:o}])}))})):chrome.scripting.executeScript({target:{tabId:t,frameIds:[o]},world:"MAIN",args:[a],func:e=>{try{return window.eval(e)}catch(t){return void console.warn("eval error",e,t)}}})})(i,r,t.code).then((([e])=>{chrome.tabs.sendMessage(i,{id:t.id,type:"evalResp",result:e.result},{frameId:r})}));break;case"popupFound":await n(i,"available",t.cmp),o({[`detected${i}`]:r});break;case"optOutResult":case"optInResult":t.result&&(await n(i,"working",t.cmp),t.scheduleSelfTest&&await o({[`selfTest${i}`]:r}));break;case"selfTestResult":t.result&&await n(i,"verified",t.cmp);break;case"autoconsentDone":{await n(i,"success",t.cmp);const e=`selfTest${i}`,o=(await chrome.storage.local.get(e))?.[e];"number"==typeof o&&(s(e),chrome.tabs.sendMessage(i,{type:"selfTest"},{frameId:o}));break}case"autoconsentError":console.error("Error:",t.details)}})),2===e&&chrome.pageAction.onClicked.addListener((async e=>{const t=e.id,o=`detected${t}`,c=await a(o);"number"==typeof c&&(s(o),await n(t,"working"),chrome.tabs.sendMessage(t,{type:"optOut"},{frameId:c}))}))}();
|
|
1
|
+
!function(){"use strict";const e=chrome.runtime.getManifest().manifest_version,t={};async function o(o){if(2!==e)return chrome.storage.local.set(o);Object.assign(t,o)}async function a(o){return null===o?2===e?t:await chrome.storage.local.get(null):2===e?t[o]:(await chrome.storage.local.get(o))?.[o]}async function s(o){if(2!==e)return chrome.storage.local.remove(o);delete t[o]}async function n(e,t,o=""){let a="",s="icons/cookie-idle.png";"success"===t?(a=`Opt out successful! (${o})`,s="icons/party.png"):"complete"===t?(a=`Opt out complete! (${o})`,s="icons/tick.png"):"working"===t?(a=`Processing... (${o})`,s="icons/cog.png"):"verified"===t?(a=`Verified (${o})`,s="icons/verified.png"):"idle"===t?(a="Idle",s="icons/cookie-idle.png"):"available"===t&&(a=`Click to opt out (${o})`,s="icons/cookie.png");const n=chrome.action||chrome.pageAction;chrome.pageAction&&chrome.pageAction.show(e),await n.setTitle({tabId:e,title:a}),await n.setIcon({tabId:e,path:s})}async function c(){const e=await fetch("./rules.json");o({rules:await e.json()})}async function i(){console.log("init sw");const e=await a("config");if(console.log("storedConfig",e),!e){console.log("init config");const e={enabled:!0,autoAction:"optOut",disabledCmps:[],enablePrehide:!0,detectRetries:20};await o({config:e})}}chrome.runtime.onInstalled.addListener((()=>{c(),i()})),2===e&&(c(),i()),chrome.tabs.onRemoved.addListener((e=>{s(`detected${e}`)})),chrome.runtime.onMessage.addListener((async(t,c)=>{const i=c.tab.id,r=c.frameId,l=await a("rules"),d=await a("config");switch(t.type){case"init":0===r&&await n(i,"idle"),chrome.tabs.sendMessage(i,{type:"initResp",rules:l,config:d},{frameId:r});break;case"eval":(async function(t,o,a){return 2===e?new Promise((e=>{chrome.tabs.executeScript(t,{frameId:o,code:`!!window.eval(decodeURIComponent("${encodeURIComponent(a)}"))`},(t=>{e([{result:t[0],frameId:o}])}))})):chrome.scripting.executeScript({target:{tabId:t,frameIds:[o]},world:"MAIN",args:[a],func:e=>{try{return window.eval(e)}catch(t){return void console.warn("eval error",e,t)}}})})(i,r,t.code).then((([e])=>{chrome.tabs.sendMessage(i,{id:t.id,type:"evalResp",result:e.result},{frameId:r})}));break;case"popupFound":await n(i,"available",t.cmp),o({[`detected${i}`]:r});break;case"optOutResult":case"optInResult":t.result&&(await n(i,"working",t.cmp),t.scheduleSelfTest&&await o({[`selfTest${i}`]:r}));break;case"selfTestResult":t.result&&await n(i,"verified",t.cmp);break;case"autoconsentDone":{await n(i,"success",t.cmp);const e=`selfTest${i}`,o=(await chrome.storage.local.get(e))?.[e];"number"==typeof o&&(s(e),chrome.tabs.sendMessage(i,{type:"selfTest"},{frameId:o}));break}case"autoconsentError":console.error("Error:",t.details)}})),2===e&&chrome.pageAction.onClicked.addListener((async e=>{const t=e.id,o=`detected${t}`,c=await a(o);"number"==typeof c&&(s(o),await n(t,"working"),chrome.tabs.sendMessage(t,{type:"optOut"},{frameId:c}))}))}();
|