fix(data): skip accounts google
This commit is contained in:
parent
8d903534d2
commit
6f18d4694f
@ -1,3 +1,4 @@
|
|||||||
|
accounts.google.com
|
||||||
canvasjs.com
|
canvasjs.com
|
||||||
chessmadra.com
|
chessmadra.com
|
||||||
correos.es
|
correos.es
|
||||||
@ -5,6 +6,7 @@ flickr.com
|
|||||||
godotforums.org
|
godotforums.org
|
||||||
key-shortcut.com
|
key-shortcut.com
|
||||||
lever.co
|
lever.co
|
||||||
|
login.microsoftonline.com
|
||||||
mantisbt.org
|
mantisbt.org
|
||||||
musicmeter.nl
|
musicmeter.nl
|
||||||
personio.com
|
personio.com
|
||||||
|
@ -131,22 +131,17 @@ const match = (node, skipMatch) => {
|
|||||||
|
|
||||||
const fix = () => {
|
const fix = () => {
|
||||||
const backdrop = document.getElementsByClassName('modal-backdrop')[0];
|
const backdrop = document.getElementsByClassName('modal-backdrop')[0];
|
||||||
|
const facebook = document.getElementsByClassName('_31e')[0];
|
||||||
|
const fixes = data?.fixes ?? [];
|
||||||
|
const skips = data?.skips ?? [];
|
||||||
|
|
||||||
if (backdrop && backdrop.children.length === 0) {
|
if (backdrop?.children.length === 0) {
|
||||||
backdrop.remove();
|
backdrop.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementsByClassName('_31e')[0]?.classList.remove('_31e');
|
facebook?.classList.remove('_31e');
|
||||||
|
|
||||||
if (data?.skips.length && !data.skips.includes(hostname)) {
|
for (const fix of fixes) {
|
||||||
for (const item of [document.body, document.documentElement]) {
|
|
||||||
item?.classList.remove(...(data?.classes ?? []));
|
|
||||||
item?.style.setProperty('position', 'initial', 'important');
|
|
||||||
item?.style.setProperty('overflow-y', 'initial', 'important');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const fix of data?.fixes ?? []) {
|
|
||||||
const [match, selector, action, property] = fix.split('##');
|
const [match, selector, action, property] = fix.split('##');
|
||||||
|
|
||||||
if (hostname.includes(match)) {
|
if (hostname.includes(match)) {
|
||||||
@ -176,6 +171,16 @@ const fix = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!skips.includes(hostname)) {
|
||||||
|
dispatch({ type: 'INSERT_CONTENT_CSS' });
|
||||||
|
|
||||||
|
for (const item of [document.body, document.documentElement]) {
|
||||||
|
item?.classList.remove(...(data?.classes ?? []));
|
||||||
|
item?.style.setProperty('position', 'initial', 'important');
|
||||||
|
item?.style.setProperty('overflow-y', 'initial', 'important');
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -220,7 +225,6 @@ window.addEventListener('pageshow', (event) => {
|
|||||||
if (state.enabled) {
|
if (state.enabled) {
|
||||||
data = await dispatch({ hostname, type: 'GET_DATA' });
|
data = await dispatch({ hostname, type: 'GET_DATA' });
|
||||||
dispatch({ type: 'ENABLE_ICON' });
|
dispatch({ type: 'ENABLE_ICON' });
|
||||||
dispatch({ type: 'INSERT_CONTENT_CSS' });
|
|
||||||
observer.observe(document.body ?? document.documentElement, options);
|
observer.observe(document.body ?? document.documentElement, options);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user