mainWindow: rewrite css injection

This commit is contained in:
Ducko 2022-09-28 17:50:29 +01:00
parent 5d2bd94945
commit 3278a3f97e
1 changed files with 8 additions and 3 deletions

View File

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