diff options
author | Avram Tudor <tudor.potecaru@8x8.com> | 2022-08-24 11:22:27 +0300 |
---|---|---|
committer | Avram Tudor <tudor.potecaru@8x8.com> | 2022-08-24 11:22:27 +0300 |
commit | 542c7f089a241487a0c7bc7905e21db93c5bb13b (patch) | |
tree | 67cbcaae1108955c7450ad2805d788f8e6ac4cd1 /main.js | |
parent | 5b9119c62b011de090171134a56253ab748e8064 (diff) |
chore: update jitsi-electron-sdk to 3.0.18
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -211,26 +211,30 @@ function createJitsiMeetWindow() { } }; + const windowOpenHandler = ({ url, frameName }) => { + const target = getPopupTarget(url, frameName); + + if (!target || target === 'browser') { + openExternalLink(url); + } + + return { action: 'deny' }; + }; + mainWindow = new BrowserWindow(options); windowState.manage(mainWindow); mainWindow.loadURL(indexURL); + mainWindow.webContents.setWindowOpenHandler(windowOpenHandler); + initPopupsConfigurationMain(mainWindow); - setupAlwaysOnTopMain(mainWindow); + setupAlwaysOnTopMain(mainWindow, null, windowOpenHandler); setupPowerMonitorMain(mainWindow); setupScreenSharingMain(mainWindow, config.default.appName, pkgJson.build.appId); if (ENABLE_REMOTE_CONTROL) { new RemoteControlMain(mainWindow); // eslint-disable-line no-new } - mainWindow.webContents.on('new-window', (event, url, frameName) => { - const target = getPopupTarget(url, frameName); - - if (!target || target === 'browser') { - event.preventDefault(); - openExternalLink(url); - } - }); mainWindow.on('closed', () => { mainWindow = null; }); |