Browse Source

Fix multiple browser tabs on Skype link click

Rather nasty hack, but prevents opening many tabs in browser after clicking a link in Skype.
There seem to be invalid events generated, so log them in console for further inspection.

Fixes #11 and also fixes #102 duplicate I've reported.
pull/116/head
Adam Brodziak 9 years ago committed by GitHub
parent
commit
c37ba1516f
  1. 5
      app/ux/WebView.js

5
app/ux/WebView.js

@ -109,6 +109,11 @@ Ext.define('Rambox.ux.WebView',{
// Open links in default browser
webview.addEventListener('new-window', function(e) {
// hack to fix multiple browser tabs on Skype link click, re #11
if (e.url === 'https://web.skype.com/en/undefined') {
console.log(e);
return;
}
const protocol = require('url').parse(e.url).protocol;
if (protocol === 'http:' || protocol === 'https:' || protocol === 'mailto:') {
e.preventDefault();

Loading…
Cancel
Save