fix: open links in OS default browser
continuous-integration/drone/push Build is passing Details

Resolves #130
This commit is contained in:
kolaente 2022-12-23 19:04:45 +01:00
parent da183cd0d5
commit 99153187d7
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 4 deletions

View File

@ -17,10 +17,10 @@ function createWindow() {
})
// Open external links in the browser
mainWindow.webContents.on('new-window', function (e, url) {
e.preventDefault()
shell.openExternal(url)
})
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
shell.openExternal(url);
return { action: 'deny' };
});
// Hide the toolbar
mainWindow.setMenuBarVisibility(false)