@duckduckgo/autoconsent 7.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/addon-firefox/content.bundle.js +10 -12
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/rules.json +61 -185
- package/dist/addon-mv3/content.bundle.js +10 -12
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/rules.json +61 -185
- package/dist/autoconsent.cjs.js +10 -12
- package/dist/autoconsent.esm.js +10 -12
- package/dist/autoconsent.playwright.js +1 -1
- package/lib/cmps/evidon.ts +1 -1
- package/lib/cmps/trustarc-top.ts +1 -1
- package/lib/rule-executors.ts +4 -4
- package/lib/rules.ts +1 -6
- package/lib/utils.ts +3 -5
- package/lib/web.ts +1 -1
- package/package.json +2 -2
- package/readme.md +37 -28
- package/rules/autoconsent/1password-com.json +1 -1
- package/rules/autoconsent/agolde-com.json +1 -1
- package/rules/autoconsent/altium-com.json +1 -1
- package/rules/autoconsent/aquasana-com.json +1 -1
- package/rules/autoconsent/athlinks-com.json +1 -1
- package/rules/autoconsent/ausopen.json +1 -1
- package/rules/autoconsent/baden-wuerttemberg-de.json +1 -1
- package/rules/autoconsent/bbb.json +1 -1
- package/rules/autoconsent/burpee-com.json +1 -1
- package/rules/autoconsent/cc-banner.json +1 -1
- package/rules/autoconsent/clustrmaps-com.json +1 -1
- package/rules/autoconsent/complianz-notice.json +1 -1
- package/rules/autoconsent/cookie-law-info.json +1 -1
- package/rules/autoconsent/cookie-notice.json +1 -1
- package/rules/autoconsent/cookieinformation.json +1 -1
- package/rules/autoconsent/cookieyes.json +1 -1
- package/rules/autoconsent/crossfit-com.json +1 -1
- package/rules/autoconsent/dailymotion-us.json +1 -1
- package/rules/autoconsent/delta-com.json +1 -1
- package/rules/autoconsent/dsgvo.json +1 -1
- package/rules/autoconsent/eu-cookie-compliance.json +1 -1
- package/rules/autoconsent/eu-cookie-law.json +1 -1
- package/rules/autoconsent/geeks-for-geeks.json +1 -1
- package/rules/autoconsent/generic-cosmetic.json +1 -1
- package/rules/autoconsent/hl-co-uk.json +1 -1
- package/rules/autoconsent/indeed-com.json +1 -1
- package/rules/autoconsent/itopvpn-com.json +1 -1
- package/rules/autoconsent/jquery-cookiebar.json +1 -1
- package/rules/autoconsent/macpaw-com.json +1 -1
- package/rules/autoconsent/marksandspencer.json +1 -1
- package/rules/autoconsent/midway-usa.json +1 -1
- package/rules/autoconsent/moove.json +1 -1
- package/rules/autoconsent/nba-com.json +1 -1
- package/rules/autoconsent/netflix-de.json +1 -1
- package/rules/autoconsent/notice-cookie.json +1 -1
- package/rules/autoconsent/nrk-no.json +1 -1
- package/rules/autoconsent/osano.json +1 -1
- package/rules/autoconsent/pinetools-com.json +1 -1
- package/rules/autoconsent/pmc-cmp.json +1 -1
- package/rules/autoconsent/pornhub.json +1 -1
- package/rules/autoconsent/pornpics.json +1 -1
- package/rules/autoconsent/primebox.json +1 -1
- package/rules/autoconsent/samsung-com.json +1 -1
- package/rules/autoconsent/similarweb-com.json +1 -1
- package/rules/autoconsent/takealot-com.json +1 -1
- package/rules/autoconsent/tealium.json +2 -2
- package/rules/autoconsent/testcmp-cosmetic.json +1 -1
- package/rules/autoconsent/tidbits-com.json +1 -1
- package/rules/autoconsent/tractor-supply.json +1 -1
- package/rules/autoconsent/trader-joes-com.json +1 -1
- package/rules/autoconsent/true-car.json +1 -1
- package/rules/autoconsent/tumblr-com.json +1 -1
- package/rules/autoconsent/twitch.json +1 -1
- package/rules/autoconsent/uk-cookie-consent.json +1 -1
- package/rules/autoconsent/urbanarmorgear-com.json +1 -1
- package/rules/autoconsent/whitepages.json +1 -1
- package/rules/autoconsent/wpcc.json +1 -1
- package/rules/autoconsent/xhamster-us.json +1 -1
- package/rules/autoconsent/xnxx-com.json +1 -1
- package/rules/autoconsent/youporn.json +1 -1
- package/rules/rules.json +61 -185
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# v8.0.0 (Sat Jan 06 2024)
|
|
2
|
+
|
|
3
|
+
#### 💥 Breaking Change
|
|
4
|
+
|
|
5
|
+
- single selector in hide rules [#334](https://github.com/duckduckgo/autoconsent/pull/334) ([@muodov](https://github.com/muodov))
|
|
6
|
+
|
|
7
|
+
#### 🔩 Dependency Updates
|
|
8
|
+
|
|
9
|
+
- Bump the dev-dependencies group with 4 updates [#328](https://github.com/duckduckgo/autoconsent/pull/328) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
10
|
+
|
|
11
|
+
#### Authors: 2
|
|
12
|
+
|
|
13
|
+
- [@dependabot[bot]](https://github.com/dependabot[bot])
|
|
14
|
+
- Maxim Tsoy ([@muodov](https://github.com/muodov))
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
1
18
|
# v7.1.0 (Wed Jan 03 2024)
|
|
2
19
|
|
|
3
20
|
#### 🚀 Enhancement
|
|
@@ -415,14 +415,12 @@
|
|
|
415
415
|
return css;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function hideElements(styleEl,
|
|
418
|
+
function hideElements(styleEl, selector, method = "display") {
|
|
419
419
|
const hidingSnippet = method === "opacity" ? `opacity: 0` : `display: none`;
|
|
420
|
-
const rule = `${
|
|
421
|
-
","
|
|
422
|
-
)} { ${hidingSnippet} !important; z-index: -1 !important; pointer-events: none !important; } `;
|
|
420
|
+
const rule = `${selector} { ${hidingSnippet} !important; z-index: -1 !important; pointer-events: none !important; } `;
|
|
423
421
|
if (styleEl instanceof HTMLStyleElement) {
|
|
424
422
|
styleEl.innerText += rule;
|
|
425
|
-
return
|
|
423
|
+
return selector.length > 0;
|
|
426
424
|
}
|
|
427
425
|
return false;
|
|
428
426
|
}
|
|
@@ -514,14 +512,14 @@
|
|
|
514
512
|
}, ms);
|
|
515
513
|
});
|
|
516
514
|
}
|
|
517
|
-
function hide(
|
|
515
|
+
function hide(selector, method) {
|
|
518
516
|
const styleEl = getStyleElement();
|
|
519
|
-
return hideElements(styleEl,
|
|
517
|
+
return hideElements(styleEl, selector, method);
|
|
520
518
|
}
|
|
521
|
-
function prehide(
|
|
519
|
+
function prehide(selector) {
|
|
522
520
|
const styleEl = getStyleElement("autoconsent-prehide");
|
|
523
521
|
enableLogs && console.log("[prehide]", styleEl, location.href);
|
|
524
|
-
return hideElements(styleEl,
|
|
522
|
+
return hideElements(styleEl, selector, "opacity");
|
|
525
523
|
}
|
|
526
524
|
function undoPrehide() {
|
|
527
525
|
const existingElement = getStyleElement("autoconsent-prehide");
|
|
@@ -1074,7 +1072,7 @@
|
|
|
1074
1072
|
}
|
|
1075
1073
|
hideElements(
|
|
1076
1074
|
getStyleElement(),
|
|
1077
|
-
|
|
1075
|
+
`.truste_popframe, .truste_overlay, .truste_box_overlay, ${bannerContainer}`
|
|
1078
1076
|
);
|
|
1079
1077
|
click(cookieSettingsButton);
|
|
1080
1078
|
setTimeout(() => {
|
|
@@ -1425,7 +1423,7 @@
|
|
|
1425
1423
|
if (click("#_evidon-decline-button")) {
|
|
1426
1424
|
return true;
|
|
1427
1425
|
}
|
|
1428
|
-
hideElements(getStyleElement(),
|
|
1426
|
+
hideElements(getStyleElement(), "#evidon-prefdiag-overlay,#evidon-prefdiag-background");
|
|
1429
1427
|
click("#_evidon-option-button");
|
|
1430
1428
|
await waitForElement("#evidon-prefdiag-overlay", 5e3);
|
|
1431
1429
|
click("#evidon-prefdiag-decline");
|
|
@@ -2098,7 +2096,7 @@
|
|
|
2098
2096
|
this.undoPrehide();
|
|
2099
2097
|
}
|
|
2100
2098
|
}, this.config.prehideTimeout || 2e3);
|
|
2101
|
-
return prehide(selectors);
|
|
2099
|
+
return prehide(selectors.join(","));
|
|
2102
2100
|
}
|
|
2103
2101
|
undoPrehide() {
|
|
2104
2102
|
this.updateState({ prehideOn: false });
|