Merge pull request #901 from wanhose/v7.2.3

7.2.3
This commit is contained in:
wanhose 2024-09-07 10:52:47 +02:00 committed by GitHub
commit d407a61c0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 18 additions and 22 deletions

View File

@ -12,9 +12,10 @@
## Compatibility
- All browsers based on Chromium 88+ (Blisk, Brave, Colibri, Epic Browser, Iron Browser, Vivaldi and many more)
- Google Chrome 88+
- Microsoft Edge 88+
- Mozilla Firefox 85+
- Google Chrome 109+
- Microsoft Edge 109+
- Mozilla Firefox 109+
- Mozilla Firefox Mobile 126+
## Installation (for Mozilla Firefox users)

View File

@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Cookie Dialog Monster",
"version": "7.2.2",
"version": "7.2.3",
"default_locale": "en",
"description": "__MSG_appDesc__",
"icons": {
@ -22,7 +22,7 @@
"browser_specific_settings": {
"gecko": {
"id": "{77e2c00b-e173-4604-863d-01645d8d2826}",
"strict_min_version": "101.0",
"strict_min_version": "109.0",
"update_url": "https://www.cookie-dialog-monster.com/mozilla/updates.json"
}
},

View File

@ -88,14 +88,6 @@ let initiallyVisible = document.visibilityState === 'visible';
*/
const options = { childList: true, subtree: true };
/**
* @description Is consent preview page?
*/
const preview =
(hostname.startsWith('consent.') &&
!(hostname.startsWith('consent.google') || hostname.startsWith('consent.youtube'))) ||
hostname.startsWith('myprivacy.');
/**
* @description Elements that were already matched and are removable
* @type {HTMLElement[]}
@ -372,6 +364,10 @@ function fix() {
element?.style?.removeProperty(property);
break;
}
case 'reload': {
window.location.reload();
break;
}
case 'reset': {
const element = document.querySelector(selector);
element?.style?.setProperty(property, 'initial', 'important');
@ -431,7 +427,7 @@ function restoreDOM() {
function run(params = {}) {
const { containers, elements, skipMatch } = params;
if (document.body?.children.length && !preview && state.enabled && tokens.selectors.length) {
if (document.body?.children.length && state.enabled && tokens.selectors.length) {
fix();
if (elements?.length) {
@ -482,7 +478,7 @@ async function setUp(params = {}) {
* @type {MutationObserver}
*/
const observer = new MutationObserver((mutations) => {
if (preview || !state.enabled || !tokens.selectors.length) {
if (!state.enabled || !tokens.selectors.length) {
return;
}
@ -505,11 +501,7 @@ browser.runtime.onMessage.addListener(async (message) => {
}
case 'RUN': {
await setUp({ skipRunFn: true });
run(
removables.length
? { elements: removables, skipMatch: true }
: { containers: tokens.containers }
);
run({ elements: removables, skipMatch: true });
break;
}
}
@ -521,7 +513,7 @@ browser.runtime.onMessage.addListener(async (message) => {
* @listens window#DOMContentLoaded
* @returns {void}
*/
window.addEventListener('DOMContentLoaded', async () => {
document.addEventListener('DOMContentLoaded', async () => {
if (document.visibilityState === 'visible') {
await setUp();
}
@ -535,7 +527,6 @@ window.addEventListener('DOMContentLoaded', async () => {
window.addEventListener('pageshow', async (event) => {
if (document.visibilityState === 'visible' && event.persisted) {
await setUp();
run({ containers: tokens.containers });
}
});

View File

@ -37,6 +37,10 @@
{
"version": "7.2.2",
"update_link": "https://www.cookie-dialog-monster.com/releases/7.2.2.xpi"
},
{
"version": "7.2.3",
"update_link": "https://www.cookie-dialog-monster.com/releases/7.2.3.xpi"
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.