diff --git a/src/index.js b/src/index.js index df64f71..873343e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -const { app, BrowserWindow, protocol, session } = require('electron') +const { app, BrowserWindow, protocol, shell } = require('electron') const path = require('path') function createWindow () { @@ -11,6 +11,11 @@ function createWindow () { } }) + win.webContents.on('new-window', function(e, url) { + e.preventDefault(); + shell.openExternal(url); + }) + // The starting point of the app win.loadFile('./frontend/index.html') }