bootstrap: default css config for injection
This commit is contained in:
parent
3278a3f97e
commit
3e027d59f2
|
@ -43,7 +43,7 @@ const startCore = () => {
|
||||||
bw.webContents.executeJavaScript(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8')
|
bw.webContents.executeJavaScript(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8')
|
||||||
.replaceAll('<hash>', hash || 'custom')
|
.replaceAll('<hash>', hash || 'custom')
|
||||||
.replaceAll('<notrack>', oaConfig.noTrack)
|
.replaceAll('<notrack>', oaConfig.noTrack)
|
||||||
.replace('<css>', oaConfig.css.replaceAll('`', '\\`').replaceAll('\\', '\\\\')));
|
.replace('<css>', (oaConfig.css ?? '').replaceAll('`', '\\`').replaceAll('\\', '\\\\')));
|
||||||
|
|
||||||
if (oaConfig.js) bw.webContents.executeJavaScript(oaConfig.js);
|
if (oaConfig.js) bw.webContents.executeJavaScript(oaConfig.js);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue