Skip to content

Instantly share code, notes, and snippets.

@Rudis1261
Created November 13, 2015 13:24
Show Gist options
  • Save Rudis1261/6313aa5f5bdf3d734476 to your computer and use it in GitHub Desktop.
Save Rudis1261/6313aa5f5bdf3d734476 to your computer and use it in GitHub Desktop.
Obfuscate That Email Address YO
// Used to Obfuscate a email address on a page.
// Try and stop the bot attacks
var username = "john.doe";
var hostname = "example.com";
var linktext = username + "@" + hostname ;
document.write("<a style='color:white;' href='" + "mail" + "to:" + linktext + "'>" + linktext + "</a>");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment