aboutsummaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorAvram Tudor <tudor.potecaru@8x8.com>2022-08-24 11:22:27 +0300
committerAvram Tudor <tudor.potecaru@8x8.com>2022-08-24 11:22:27 +0300
commit542c7f089a241487a0c7bc7905e21db93c5bb13b (patch)
tree67cbcaae1108955c7450ad2805d788f8e6ac4cd1 /main.js
parent5b9119c62b011de090171134a56253ab748e8064 (diff)
chore: update jitsi-electron-sdk to 3.0.18
Diffstat (limited to 'main.js')
-rw-r--r--main.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/main.js b/main.js
index ee35221..522a720 100644
--- a/main.js
+++ b/main.js
@@ -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;
});