Skip to content

Instantly share code, notes, and snippets.

Avatar

Per Sjoholm taspts

  • Stockholm, Sweden
View GitHub Profile
@taspts
taspts / AntiSpamEM
Created Jun 2, 2015
Javascript Anti Spam Email
View AntiSpamEM
<!-- Hiding email address using a function to write in document (DOM) -->
<script type="text/javascript">
//<![CDATA[
function AntiSpamEM(domain, id, name) {
email='"mail' + 'to:' +id + '@' + domain.replace(/%23/g,".") + '"'
return '<a href=' + email + 'onmouseover=' + email + 'onfocus=' + email + '>' + name + '</a>' ;
};
//]]>
</script>
You can’t perform that action at this time.