mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🎨 iframe 使用短网址会打开浏览器或跳转 APP Fix https://github.com/siyuan-note/siyuan/issues/6327
This commit is contained in:
parent
c9882b29d4
commit
7a99f9078e
1 changed files with 5 additions and 2 deletions
|
|
@ -336,12 +336,15 @@ const boot = () => {
|
|||
})
|
||||
|
||||
// iframe 使用短网址会打开浏览器或跳转 APP https://github.com/siyuan-note/siyuan/issues/6327
|
||||
mainWindow.webContents.on('will-redirect', (event, url) => {
|
||||
mainWindow.webContents.on('will-redirect', (event, url, isInPlace, isMainFrame) => {
|
||||
if (url.startsWith('http://127.0.0.1:6806')) {
|
||||
return
|
||||
}
|
||||
|
||||
event.preventDefault()
|
||||
if (!isMainFrame) {
|
||||
event.preventDefault()
|
||||
return
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.on('close', (event) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue