Fix opening links

This commit is contained in:
smartfridge 2021-05-01 18:37:31 +02:00
parent f4266dd5b3
commit 2ef4441d40
2 changed files with 6 additions and 1 deletions

View File

@ -17,7 +17,10 @@ function createWindow() {
})
mainWindow.loadFile('index.html')
mainWindow.webContents.on("new-window", function (e, url) {
e.preventDefault();
require("electron").shell.openExternal(url);
});
// Open the DevTools.
// mainWindow.webContents.openDevTools()
@ -46,3 +49,4 @@ app.whenReady().then(() => {
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit()
})

View File

@ -7,3 +7,4 @@ window.addEventListener('DOMContentLoaded', () => {
})