allow to disable installing EGroupware as mailto handler globally

This commit is contained in:
ralf
2022-07-26 10:05:43 +02:00
parent aace76b97a
commit f5cf39f224
5 changed files with 30 additions and 11 deletions

View File

@ -474,14 +474,6 @@ window.app = {classes: {}};
parseInt(egw_script.getAttribute('data-websocket-account_id'))
);
}
// 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