From 921ee128bc3a79ef8925af81f674c89e5f1867fe Mon Sep 17 00:00:00 2001
From: ansuz <ansuz@transitiontech.ca>
Date: Thu, 29 Sep 2016 14:46:32 +0200
Subject: [PATCH] deobfuscate email

---
 customize.dist/email.js                    | 23 ----------------------
 customize.dist/main.js                     | 14 +------------
 customize.dist/translations/messages.fr.js |  2 +-
 customize.dist/translations/messages.js    |  2 +-
 4 files changed, 3 insertions(+), 38 deletions(-)
 delete mode 100644 customize.dist/email.js

diff --git a/customize.dist/email.js b/customize.dist/email.js
deleted file mode 100644
index 52323f755..000000000
--- a/customize.dist/email.js
+++ /dev/null
@@ -1,23 +0,0 @@
-define(function () {
-    var Email = {};
-    var patt = /./g;
-    var each = function (d) {
-        d = d || 1;
-        return function (c, i) {
-            return String.fromCharCode((c.charCodeAt(0) + d));
-        };
-    };
-
-    Email.makeScrambler = function (n) {
-        return {
-            encrypt: function (S) {
-                return S.replace(patt, each(n));
-            },
-            decrypt: function (S) {
-                return S.replace(patt, each(-n));
-            }
-        };
-    };
-
-    return Email;
-});
diff --git a/customize.dist/main.js b/customize.dist/main.js
index d9220a8d7..306db9786 100644
--- a/customize.dist/main.js
+++ b/customize.dist/main.js
@@ -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();
 
diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js
index dd2fb372a..a87afe47d 100644
--- a/customize.dist/translations/messages.fr.js
+++ b/customize.dist/translations/messages.fr.js
@@ -135,7 +135,7 @@ define(function () {
     out.main_howitworks_p1 = 'CryptPad utilise une variante de l\'algorithme d\'<a href="https://en.wikipedia.org/wiki/Operational_transformation">Operational transformation</a> qui est capable de trouver un consensus distribué en utilisant une chaîne de bloc Nakamoto, un outil popularisé par le <a href="https://fr.wikipedia.org/wiki/Bitcoin">Bitcoin</a>. De cette manière, l\'algorithme évite la nécessité d\'utiliser un serveur central pour résoudre les conflits d\'édition de l\'Operational Transformation, et sans ce besoin de résolution des conflits le serveur peut rester ignorant du contenu qui est édité dans le pad.';
     out.main_about = 'À propos';
     out.main_about_p1 = 'Vous pouvez en apprendre davantage sur notre <a href="/privacy.html" title="">politique de confidentialité</a> et nos <a href="/terms.html">conditions d\'utilisation</a>.';
-    out.main_about_p2 = 'Si vous avez des questions ou commentaires, vous pouvez <a href="https://twitter.com/cryptpad">nous tweeter</a>, ouvrir une issue sur <a href="https://github.com/xwiki-labs/cryptpad/issues/" title="our issue tracker">Github</a>, venir dire bonjour sur IRC (<a href="http://webchat.freenode.net?channels=%23cryptpad&uio=MT1mYWxzZSY5PXRydWUmMTE9Mjg3JjE1PXRydWUe7" title="freenode webchat">irc.freenode.net</a>), ou <a href="mailto:sftfbsdiAyxjlj/dpn">nous envoyer un email</a>.';
+    out.main_about_p2 = 'Si vous avez des questions ou commentaires, vous pouvez <a href="https://twitter.com/cryptpad">nous tweeter</a>, ouvrir une issue sur <a href="https://github.com/xwiki-labs/cryptpad/issues/" title="our issue tracker">Github</a>, venir dire bonjour sur IRC (<a href="http://webchat.freenode.net?channels=%23cryptpad&uio=MT1mYWxzZSY5PXRydWUmMTE9Mjg3JjE1PXRydWUe7" title="freenode webchat">irc.freenode.net</a>), ou <a href="mailto:research@xwiki.com">nous envoyer un email</a>.';
     out.main_oops = '<strong>OUPS</strong> Afin de pouvoir réaliser le cryptage depuis votre navigateur, Javascript est <strong>vraiment</strong> requis.';
 
     out.table_type = 'Type';
diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js
index eea13040f..9a310e00e 100644
--- a/customize.dist/translations/messages.js
+++ b/customize.dist/translations/messages.js
@@ -135,7 +135,7 @@ define(function () {
     out.main_howitworks_p1 = 'CryptPad uses a variant of the <a href="https://en.wikipedia.org/wiki/Operational_transformation">Operational transformation</a> algorithm which is able to find distributed consensus using a Nakamoto Blockchain, a construct popularized by <a href="https://en.wikipedia.org/wiki/Bitcoin">Bitcoin</a>. This way the algorithm can avoid the need for a central server to resolve Operational Transform Edit Conflicts and without the need for resolving conflicts, the server can be kept unaware of the content which is being edited on the pad.';
     out.main_about = 'About';
     out.main_about_p1 = 'You can read more about our <a href="/privacy.html" title="">privacy policy</a> and <a href="/terms.html">terms of service</a>.';
-    out.main_about_p2 = 'If you have any questions or comments, you can <a href="https://twitter.com/cryptpad">tweet us</a>, open an issue <a href="https://github.com/xwiki-labs/cryptpad/issues/" title="our issue tracker">on github</a>, come say hi on irc (<a href="http://webchat.freenode.net?channels=%23cryptpad&uio=MT1mYWxzZSY5PXRydWUmMTE9Mjg3JjE1PXRydWUe7" title="freenode webchat">irc.freenode.net</a>), or <a href="mailto:sftfbsdiAyxjlj/dpn">send us an email</a>.';
+    out.main_about_p2 = 'If you have any questions or comments, you can <a href="https://twitter.com/cryptpad">tweet us</a>, open an issue <a href="https://github.com/xwiki-labs/cryptpad/issues/" title="our issue tracker">on github</a>, come say hi on irc (<a href="http://webchat.freenode.net?channels=%23cryptpad&uio=MT1mYWxzZSY5PXRydWUmMTE9Mjg3JjE1PXRydWUe7" title="freenode webchat">irc.freenode.net</a>), or <a href="mailto:research@xwiki.com">send us an email</a>.';
     out.main_oops = '<strong>OOPS</strong> In order to do encryption in your browser, Javascript is really <strong>really</strong> required.';
 
     out.table_type = 'Type';