Skip to content

Commit 6d16a82

Browse files
committed
fix issue to open external link
1 parent 4ad4348 commit 6d16a82

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "lindo",
33
"productName": "Lindo",
44
"private": true,
5-
"version": "3.0.0-alpha.4",
5+
"version": "3.0.0-alpha.5",
66
"description": "Play Dofus Touch on Linux/OS X/Window",
77
"author": "Zenoxs <[email protected]>",
88
"license": "GPL-3.0",

packages/main/windows/game-window.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FollowInstruction, GameTeam, GameTeamWindow, IPCEvents, MultiAccountContext, RootStore } from '@lindo/shared'
2-
import { app, BeforeSendResponse, BrowserWindow } from 'electron'
2+
import { app, BeforeSendResponse, BrowserWindow, shell } from 'electron'
33
import { attachTitlebarToWindow } from 'custom-electron-titlebar/main'
44
import { join } from 'path'
55
import { EventEmitter } from 'stream'
@@ -132,8 +132,8 @@ export class GameWindow extends (EventEmitter as new () => TypedEmitter<GameWind
132132
}
133133
}
134134
// Make all links open with the browser, not with the application
135-
this._win.webContents.setWindowOpenHandler(() => {
136-
// if (url.startsWith('https:')) shell.openExternal(url)
135+
this._win.webContents.setWindowOpenHandler(({ url }) => {
136+
if (url.startsWith('https:')) shell.openExternal(url)
137137
return { action: 'deny' }
138138
})
139139

0 commit comments

Comments
 (0)