css: fix escaping backticks

This commit is contained in:
Ducko 2022-10-10 16:41:39 +01:00
parent c72f1a3fc0
commit 7a04cb57df

2
src/bootstrap.js vendored
View file

@ -43,7 +43,7 @@ const startCore = () => {
bw.webContents.executeJavaScript(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8')
.replaceAll('<hash>', hash || 'custom')
.replaceAll('<notrack>', oaConfig.noTrack)
.replace('<css>', (oaConfig.css ?? '').replaceAll('`', '\\`').replaceAll('\\', '\\\\')));
.replace('<css>', (oaConfig.css ?? '').replaceAll('\\', '\\\\').replaceAll('`', '\\`')));
if (oaConfig.js) bw.webContents.executeJavaScript(oaConfig.js);
});