Open _blank links in browser window

This commit is contained in:
Joel Collins 2019-11-27 16:05:47 +00:00
parent 3bf804011b
commit 738fc9e217

View file

@ -135,6 +135,11 @@ function createWindow() {
mainWindow.on("closed", function() {
mainWindow = null; // Dereference the window object
});
mainWindow.webContents.on("new-window", function(event, url) {
event.preventDefault();
electron.shell.openExternal(url);
});
}
// Some APIs can only be used after this event occurs.