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
79df51dbbb
commit
1058347c0a
@ -475,10 +475,13 @@ window.app = {classes: {}};
|
||||
);
|
||||
}
|
||||
|
||||
// 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