mainWindow: rewrite css injection

This commit is contained in:
Ducko 2022-09-28 17:50:29 +01:00
parent 5d2bd94945
commit 3278a3f97e

View file

@ -40,9 +40,13 @@ setInterval(() => {
host.append(document.createTextNode(' | '), el);
}, 2000);
const injCSS = x => {
const el = document.createElement('style');
el.appendChild(document.createTextNode(x));
document.body.appendChild(el);
};
const el = document.createElement('style');
el.appendChild(document.createTextNode(`<css>
injCSS(document.createTextNode(`
[class^="socialLinks-"] + [class^="info-"] {
padding-right: 0;
}
@ -56,7 +60,8 @@ el.appendChild(document.createTextNode(`<css>
text-decoration: underline;
color: var(--text-normal);
}`));
document.body.appendChild(el);
injCSS(`<css>`);
openasar = {}; // Define global for any mods which want to know / etc