diff --git a/js/electron_code_wrapper.js b/js/electron_code_wrapper.js index 4d0dc96..74a309f 100644 --- a/js/electron_code_wrapper.js +++ b/js/electron_code_wrapper.js @@ -7,12 +7,15 @@ app.on('web-contents-created', (e, webContents) => { }() ) `; - webContents.on('did-finish-load', () => { - webContents.executeJavaScript(code, true); - }); - webContents.on('before-input-event', (event, input) => { - if (input.key == "F12") { - webContents.openDevTools(); - } - }) + if (webContents.id > 3) { + webContents.on('did-finish-load', () => { + webContents.executeJavaScript(`(console.log("running better-hangoutschat..."))`); + webContents.executeJavaScript(code, true); + }); + webContents.on('before-input-event', (event, input) => { + if (input.key == "F12") { + webContents.openDevTools(); + } + }); + } })