Make attachments open in a new tab/browser

This commit is contained in:
SiriusXT
2024-11-06 10:02:42 +08:00
parent a02146df17
commit d2ee3738a2
2 changed files with 4 additions and 8 deletions

View File

@@ -111,13 +111,9 @@ async function createMainWindow(app: App) {
}
function configureWebContents(webContents: WebContents, spellcheckEnabled: boolean) {
if (!mainWindow) {
return;
}
remoteMain.enable(webContents);
mainWindow.webContents.setWindowOpenHandler((details) => {
webContents.setWindowOpenHandler((details) => {
async function openExternal() {
(await import('electron')).shell.openExternal(details.url);
}