[Bootstrap] Fix random JS injection issues because Electron
This commit is contained in:
parent
c3d6eced6c
commit
e7a3a61a73
1 changed files with 3 additions and 4 deletions
7
src/bootstrap.js
vendored
7
src/bootstrap.js
vendored
|
@ -49,12 +49,11 @@ const startCore = () => {
|
|||
|
||||
const [ channel, hash ] = oaVersion.split('-'); // Split via -
|
||||
|
||||
const exec = bw.webContents.executeJavaScript;
|
||||
exec(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8')
|
||||
bw.webContents.executeJavaScript(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8')
|
||||
.replaceAll('<channel>', channel)
|
||||
.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) {
|
||||
const bl = { cancel: true }; // Standard block callback response
|
||||
|
||||
|
|
Loading…
Reference in a new issue