diff --git a/electron/main/index.ts b/electron/main/index.ts index f209629..5e429cd 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -68,9 +68,9 @@ async function createWindow() { }) // Make all links open with the browser, not with the application - win.webContents.setWindowOpenHandler(({ url }) => { - if (url.startsWith('https:')) shell.openExternal(url) - return { action: 'deny' } + win.webContents.on('will-navigate', (event, url) => { + event.preventDefault() + shell.openExternal(url) }) }