Allow popups to be opened when their url starts with the referrer url
This commit is contained in:
parent
ab38ff51dc
commit
18c3219e9b
@ -76,6 +76,8 @@ export default class Application {
|
||||
if (contents.getType() === 'webview') {
|
||||
console.log('Setting external links to open in default OS browser');
|
||||
contents.setWindowOpenHandler(details => {
|
||||
if (details.url.startsWith(details.referrer.url)) return {action: 'allow'};
|
||||
|
||||
const url = details.url;
|
||||
this.openExternalLink(url)
|
||||
.catch(console.error);
|
||||
|
Loading…
Reference in New Issue
Block a user