checking links being opened

This commit is contained in:
antelle 2020-04-03 18:25:26 +02:00
parent f7eab86166
commit 086f2c73db
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
1 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,9 @@ const Launcher = {
return this.electron().remote.require(mod);
},
openLink(href) {
this.electron().shell.openExternal(href);
if (/^(http|https|ftp|sftp|mailto):/i.test(href)) {
this.electron().shell.openExternal(href);
}
},
devTools: true,
openDevTools() {