Created
December 16, 2016 11:54
-
-
Save sujoyu/f22537a480a0b69da2903f932a5c35b2 to your computer and use it in GitHub Desktop.
Anti mail spammer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function() { | |
var encoded = 'eycptqkGmkx|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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var email = Array.prototype.map.call('[email protected]', 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