mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-12 20:49:33 +01:00
Fix "Open in new window" context menu action in release builds (#2873)
* Fix "Open in new window" context menu action in release builds * Better check and add comment
This commit is contained in:
parent
c3f3881f76
commit
c8d37cd552
@ -31,7 +31,8 @@ function runApp() {
|
||||
},
|
||||
{
|
||||
label: 'Open in a New Window',
|
||||
visible: parameters.linkURL.includes((new URL(browserWindow.webContents.getURL())).origin),
|
||||
// Only show the option for in-app URLs and not external ones
|
||||
visible: parameters.linkURL.split('#')[0] === browserWindow.webContents.getURL().split('#')[0],
|
||||
click: () => {
|
||||
createWindow({ replaceMainWindow: false, windowStartupUrl: parameters.linkURL, showWindowNow: true })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user