Merge pull request #36 from wanhose/5.4.6

5.4.6
This commit is contained in:
wanhose 2022-01-20 15:36:32 +01:00 committed by GitHub
commit c2f3402e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 15 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.DS_Store
release

View File

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Cookie Dialog Monster",
"version": "5.4.5",
"version": "5.4.6",
"default_locale": "en",
"description": "__MSG_appDesc__",
"icons": {
@ -22,8 +22,9 @@
"exclude_matches": [
"*://*.gfycat.com/*",
"*://*.gmx.com/*",
"*://*.mediathekviewweb.de/*",
"*://*.rundschau-online.de/*",
"*://*.mediathekviewweb.de/*"
"*://*.youtube.com/embed/*"
],
"js": ["scripts/content.js"],
"matches": ["http://*/*", "https://*/*"],

View File

@ -93,20 +93,23 @@ const fix = () => {
if (hostname.includes(match)) {
switch (action) {
case "click":
const submit = document.querySelector(selector);
submit?.click?.();
break;
case "reset":
case "click": {
const node = document.querySelector(selector);
node?.style?.setProperty?.(property, "initial", "important");
break;
case "resetAll":
node?.click();
}
case "remove": {
const node = document.querySelector(selector);
node?.style?.removeProperty(property);
}
case "reset": {
const node = document.querySelector(selector);
node?.style?.setProperty(property, "initial", "important");
}
case "resetAll": {
const nodes = document.querySelectorAll(selector);
nodes.forEach((node) =>
node?.style?.setProperty?.(property, "initial", "important")
);
break;
// prettier-ignore
nodes.forEach((node) => node?.style?.setProperty(property, "initial", "important"));
}
default:
break;
}