Created
September 1, 2015 13:21
-
-
Save Avelar/65891a7dcb2331576375 to your computer and use it in GitHub Desktop.
Mail link spam control function
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
<!-- a link with function and 2 arguments, and atribute rel with nofollow value --> | |
<a href='javascript:spamControl("user", "gmail.com")' rel="nofollow">Get in touch</a> | |
<script type="text/javascript"> | |
// The script | |
function spamControl(user,domain) { | |
getString = 'mailto:' + user + '@' + domain; | |
window.location = getString; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment