* Mail: register EGroupware as protocol handler for mail, you need to click on the double-diamond in the url bar and confirm it

This commit is contained in:
ralf 2022-07-22 09:43:37 +02:00
parent d14f63599e
commit 26268c68a2

View File

@ -438,6 +438,11 @@
parseInt(egw_script.getAttribute('data-websocket-account_id')) parseInt(egw_script.getAttribute('data-websocket-account_id'))
); );
} }
// 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');
} }
catch(e) { catch(e) {
// ignore SecurityError exception if top is different security context / cross-origin // ignore SecurityError exception if top is different security context / cross-origin
@ -480,4 +485,4 @@ var exports = {};
function et2_call(_func) function et2_call(_func)
{ {
return egw.applyFunc(_func, [].slice.call(arguments, 1), window); return egw.applyFunc(_func, [].slice.call(arguments, 1), window);
} }