css: rewrite css injection to use mainWindow to fix imports
This commit is contained in:
parent
a021777ede
commit
5d2bd94945
|
@ -42,10 +42,10 @@ const startCore = () => {
|
|||
|
||||
bw.webContents.executeJavaScript(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8')
|
||||
.replaceAll('<hash>', hash || 'custom')
|
||||
.replaceAll('<notrack>', oaConfig.noTrack));
|
||||
.replaceAll('<notrack>', oaConfig.noTrack)
|
||||
.replace('<css>', oaConfig.css.replaceAll('`', '\\`').replaceAll('\\', '\\\\')));
|
||||
|
||||
if (oaConfig.js) bw.webContents.executeJavaScript(oaConfig.js);
|
||||
if (oaConfig.css) bw.webContents.insertCSS(oaConfig.css);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ setInterval(() => {
|
|||
|
||||
|
||||
const el = document.createElement('style');
|
||||
el.appendChild(document.createTextNode(`[class^="socialLinks-"] + [class^="info-"] {
|
||||
el.appendChild(document.createTextNode(`<css>
|
||||
[class^="socialLinks-"] + [class^="info-"] {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue