forked from extern/egroupware
trying to fix FF poping up install mailto-link message constantly, when changing content in an iframe / reading mail
This commit is contained in:
parent
26268c68a2
commit
5fa958de86
@ -439,10 +439,13 @@
|
||||
);
|
||||
}
|
||||
|
||||
// register our mail as mailto protocol handler
|
||||
let url = egw_webserverUrl;
|
||||
if (url[0] === '/') url = document.location.protocol+'://'+document.location.hostname+(url !== '/' ? url : '');
|
||||
navigator.registerProtocolHandler('mailto', url+'/index.php?menuaction=mail.mail_compose.compose&preset[mailto]=%s', 'Mail');
|
||||
// register our mail as mailto protocol handler (only for main-page, FF seems to pop it up constantly, if we do so in an iframe)
|
||||
if (location.href.match(/(\?|&)cd=yes(&|$)/))
|
||||
{
|
||||
let url = egw_webserverUrl;
|
||||
if (url[0] === '/') url = document.location.protocol+'://'+document.location.hostname+(url !== '/' ? url : '');
|
||||
navigator.registerProtocolHandler('mailto', url+'/index.php?menuaction=mail.mail_compose.compose&preset[mailto]=%s', 'Mail');
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
// ignore SecurityError exception if top is different security context / cross-origin
|
||||
|
Loading…
Reference in New Issue
Block a user