[Bootstrap] Fix random JS injection issues because Electron
This commit is contained in:
parent
c3d6eced6c
commit
e7a3a61a73
|
@ -49,12 +49,11 @@ const startCore = () => {
|
||||||
|
|
||||||
const [ channel, hash ] = oaVersion.split('-'); // Split via -
|
const [ channel, hash ] = oaVersion.split('-'); // Split via -
|
||||||
|
|
||||||
const exec = bw.webContents.executeJavaScript;
|
bw.webContents.executeJavaScript(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8')
|
||||||
exec(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8')
|
|
||||||
.replaceAll('<channel>', channel)
|
.replaceAll('<channel>', channel)
|
||||||
.replaceAll('<hash>', hash || 'custom'));
|
.replaceAll('<hash>', hash || 'custom'));
|
||||||
|
|
||||||
if (oaConfig.js) exec(oaConfig.js);
|
if (oaConfig.js) bw.webContents.executeJavaScript(oaConfig.js);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -83,7 +82,7 @@ const startCore = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const startUpdate = async () => {
|
const startUpdate = () => {
|
||||||
if (oaConfig.noTrack !== false) {
|
if (oaConfig.noTrack !== false) {
|
||||||
const bl = { cancel: true }; // Standard block callback response
|
const bl = { cancel: true }; // Standard block callback response
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue