deobfuscate email

This commit is contained in:
ansuz
2016-09-29 14:46:32 +02:00
parent 0be8c333e0
commit 921ee128bc
4 changed files with 3 additions and 38 deletions

View File

@@ -4,26 +4,14 @@ define([
'/customize/application_config.js',
'/common/cryptpad-common.js',
'/bower_components/lil-uri/uri.min.js',
'/customize/email.js',
'/bower_components/jquery/dist/jquery.min.js',
], function (Messages, DecorateToolbar, Config, Cryptpad, LilUri, Email) {
], function (Messages, DecorateToolbar, Config, Cryptpad, LilUri) {
var $ = window.$;
var APP = window.APP = {
Cryptpad: Cryptpad,
};
var email = Email.makeScrambler(1);
// slip past the spammers, then unscramble mailto links
$('a[href^="mailto:"]').each(function () {
$(this).attr('href', function (i, href) {
return href.replace(/:(.*$)/, function (a, address) {
return ':' + email.decrypt(address);
});
});
});
DecorateToolbar.main($('#bottom-bar'));
Cryptpad.styleAlerts();