Skip to content

Instantly share code, notes, and snippets.

@sujoyu
Created December 16, 2016 11:54
Show Gist options
  • Save sujoyu/f22537a480a0b69da2903f932a5c35b2 to your computer and use it in GitHub Desktop.
Save sujoyu/f22537a480a0b69da2903f932a5c35b2 to your computer and use it in GitHub Desktop.
Anti mail spammer
setTimeout(function() {
var encoded = 'eycptqkGmkx|ys=s€';
var decoded = Array.prototype.map.call(encoded, function(c, i) {
return String.fromCharCode(c.charCodeAt(0) - i);
}).join('');
$('#contact').html($('<a></a>')
.attr('href', 'mailto:' + decoded)
.text(decoded));
}, 3000)
var email = Array.prototype.map.call('example@example.com', function(c, i) {
return String.fromCharCode(c.charCodeAt(0) + i);
}).join("");
console.log(email)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment