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

View File

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