Merge pull request #20 from wanhose/5.2.1

5.2.1
This commit is contained in:
wanhose 2021-11-03 16:15:59 +01:00 committed by GitHub
commit 0f2f28f74c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Cookie Dialog Monster",
"version": "5.2.0",
"version": "5.2.1",
"default_locale": "en",
"description": "__MSG_appDesc__",
"icons": {
@ -20,6 +20,7 @@
"content_scripts": [
{
"all_frames": true,
"css": ["styles/fixes.css"],
"exclude_matches": ["*://*.gfycat.com/*"],
"js": ["scripts/content.js"],
"matches": ["http://*/*", "https://*/*"],

View File

@ -55,8 +55,12 @@ const observer = new MutationObserver((mutations, instance) => {
for (let j = mutation.addedNodes.length; j--; ) {
const node = mutation.addedNodes[j];
const valid =
node instanceof HTMLElement &&
node.parentElement &&
!["BODY", "HTML"].includes(node.tagName);
if (!(node instanceof HTMLElement)) continue;
if (!valid) continue;
if (node.matches(selectors)) node.outerHTML = "";
}

3
styles/fixes.css Normal file
View File

@ -0,0 +1,3 @@
body > * {
filter: initial !important;
}

View File

@ -1,5 +1,3 @@
/* Globals */
:root {
--color-chocolate: #47321e;
--color-cookie: #f2e9df;