From df551899ab0cb4e1ed40cd4f1bbc25b9d05750b2 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Tue, 5 Nov 2024 21:59:13 -0500 Subject: [PATCH] Open link in system browser window (#191) --- 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