From 4485db061e7f5c6529340514f6179716abb0d633 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Tue, 5 Nov 2024 21:58:14 -0500 Subject: [PATCH] Open link in system browser window --- src/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.ts b/src/main.ts index 69f5c772..d5b20c4d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -171,6 +171,12 @@ if (!gotTheLock) { mainWindow = null; app.quit(); }); + + mainWindow.webContents.setWindowOpenHandler(({ url }) => { + shell.openExternal(url); + return { action: 'deny' }; + }); + ipcMain.on(IPC_CHANNELS.RENDERER_READY, () => { log.info('Received renderer-ready message!'); // Send all queued messages