Skip to content

Instantly share code, notes, and snippets.

@rendfall
Created September 8, 2016 19:09
Show Gist options
  • Select an option

  • Save rendfall/6a7f8bb71fccb3a165384427dc3a68df to your computer and use it in GitHub Desktop.

Select an option

Save rendfall/6a7f8bb71fccb3a165384427dc3a68df to your computer and use it in GitHub Desktop.
Anti-Spam Email Encoder
// Example for gmail accounts only >> rot13(tznvy.pbz)
function getEmail(u) {
var c = ':otliam'.split('').reverse().join('');
var a = String.fromCharCode('0'+8*8);
var h = 'tznvy.pbz'.replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});
return c+u+a+h;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment