Skip to content

Commit

Permalink
js: fix patch not showing with GHC build 20.8.301
Browse files Browse the repository at this point in the history
Closes issue #15
  • Loading branch information
paveyry committed Sep 16, 2020
1 parent 98eca24 commit ae0a561
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions js/electron_code_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
}
})

0 comments on commit ae0a561

Please sign in to comment.