Skip to content

Commit

Permalink
Open link in system browser window (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Nov 6, 2024
1 parent a66d37c commit df55189
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df55189

Please sign in to comment.