feat: edge cases support increased
This commit is contained in:
parent
9da02c30f7
commit
9245d6662c
@ -12501,4 +12501,5 @@ body > div[data-nosnippet="true"] > aside
|
|||||||
epaas-consent-drawer-shell
|
epaas-consent-drawer-shell
|
||||||
.epaas-notavailable-banner
|
.epaas-notavailable-banner
|
||||||
.cbar
|
.cbar
|
||||||
.cbar-overlay
|
.cbar-overlay
|
||||||
|
div[style="overflow: hidden; position: absolute; top: 0px; width: 379px; z-index: 991; height: 180px; margin-top: 70px; right: 0px; margin-right: 25px;"]
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Cookie Dialog Monster",
|
"name": "Cookie Dialog Monster",
|
||||||
"version": "5.3.2",
|
"version": "5.3.3",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_appDesc__",
|
"description": "__MSG_appDesc__",
|
||||||
"icons": {
|
"icons": {
|
||||||
@ -20,7 +20,6 @@
|
|||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"all_frames": true,
|
"all_frames": true,
|
||||||
"css": ["styles/fixes.css"],
|
|
||||||
"exclude_matches": ["*://*.gfycat.com/*"],
|
"exclude_matches": ["*://*.gfycat.com/*"],
|
||||||
"js": ["scripts/content.js"],
|
"js": ["scripts/content.js"],
|
||||||
"matches": ["http://*/*", "https://*/*"],
|
"matches": ["http://*/*", "https://*/*"],
|
||||||
@ -34,5 +33,5 @@
|
|||||||
"storage",
|
"storage",
|
||||||
"tabs"
|
"tabs"
|
||||||
],
|
],
|
||||||
"web_accessible_resources": ["assets/fonts/*", "scripts/*", "styles/*"]
|
"web_accessible_resources": ["assets/fonts/*", "scripts/popup.js", "styles/*"]
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,17 @@ let classes = [];
|
|||||||
|
|
||||||
const dispatch = chrome.runtime.sendMessage;
|
const dispatch = chrome.runtime.sendMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Hostname
|
||||||
|
*/
|
||||||
|
|
||||||
|
const hostname = document.location.hostname;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Is consent preview page?
|
* @description Is consent preview page?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const isConsentPreview = document.location.host.startsWith("consent.");
|
const isConsentPreview = hostname.startsWith("consent.");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Options provided to observer
|
* @description Options provided to observer
|
||||||
@ -54,12 +60,22 @@ const clean = () => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fix = () => {
|
const fix = () => {
|
||||||
|
const automobiel = /automobielmanagement.nl/g.test(hostname);
|
||||||
const body = document.body;
|
const body = document.body;
|
||||||
const facebook = document.getElementsByClassName("_31e")[0];
|
const facebook = document.getElementsByClassName("_31e")[0];
|
||||||
const google = document.querySelector('form[action*="consent.google"]');
|
const google = document.querySelector('form[action*="consent.google"]');
|
||||||
const html = document.documentElement;
|
const html = document.documentElement;
|
||||||
|
const play = hostname.startsWith("play.google.");
|
||||||
const yahoo = document.querySelector("#consent-page");
|
const yahoo = document.querySelector("#consent-page");
|
||||||
|
|
||||||
|
if (automobiel && body) {
|
||||||
|
for (let i = body.childNodes.length; i--; ) {
|
||||||
|
const node = body.childNodes[i];
|
||||||
|
if (node instanceof HTMLElement)
|
||||||
|
node.style.setProperty("filter", "initial", "important");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (body) {
|
if (body) {
|
||||||
if (classes.length) body.classList.remove(...classes);
|
if (classes.length) body.classList.remove(...classes);
|
||||||
body.style.setProperty("overflow-y", "initial", "important");
|
body.style.setProperty("overflow-y", "initial", "important");
|
||||||
@ -71,7 +87,8 @@ const fix = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (google) {
|
if (google) {
|
||||||
google.querySelector("button").click();
|
const submit = google.querySelector("button");
|
||||||
|
if (submit) submit.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (html) {
|
if (html) {
|
||||||
@ -80,8 +97,14 @@ const fix = () => {
|
|||||||
html.style.setProperty("overflow-y", "initial", "important");
|
html.style.setProperty("overflow-y", "initial", "important");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (play) {
|
||||||
|
const element = document.querySelector("body > div");
|
||||||
|
if (element) element.style.setProperty("z-index", "initial", "important");
|
||||||
|
}
|
||||||
|
|
||||||
if (yahoo) {
|
if (yahoo) {
|
||||||
yahoo.querySelector('button[type="submit"]').click();
|
const submit = yahoo.querySelector('button[type="submit"]');
|
||||||
|
if (submit) submit.click();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -149,18 +172,14 @@ document.addEventListener("readystatechange", () => {
|
|||||||
* @description Setups everything and starts to observe if enabled
|
* @description Setups everything and starts to observe if enabled
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dispatch(
|
dispatch({ hostname, type: "GET_CACHE" }, null, async ({ enabled }) => {
|
||||||
{ hostname: document.location.hostname, type: "GET_CACHE" },
|
dispatch({ type: "ENABLE_POPUP" });
|
||||||
null,
|
|
||||||
async ({ enabled }) => {
|
|
||||||
dispatch({ type: "ENABLE_POPUP" });
|
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
dispatch({ type: "ENABLE_ICON" });
|
dispatch({ type: "ENABLE_ICON" });
|
||||||
const results = await Promise.all([setupClasses(), setupSelectors()]);
|
const results = await Promise.all([setupClasses(), setupSelectors()]);
|
||||||
classes = results[0].classes;
|
classes = results[0].classes;
|
||||||
selectors = results[1].selectors;
|
selectors = results[1].selectors;
|
||||||
observer.observe(target, options);
|
observer.observe(target, options);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
body > * {
|
|
||||||
filter: initial !important;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user