In order to put e-mail addresses on my sites, I use this Javascript:
function showEmailLink(user, domain, linkText) {
if (linkText == "") {
linkText = user + "@" + domain;
}
return document.write("<a href=" + "mail" + "to:" + user + "@" + domain
+ ">" + linkText + "<\/a>");
}
so that in my HTML I can write this:
please send me an
<script type="text/javascript">
<!--
showEmailLink("edward","tanguay.info","e-mail");
//-->
</script>
This protects my site from spammers who collect e-mail addresses by screenscraping the source code since my e-mail is no where in the text.
However, I can't imagine that a motivated spammer could not write a screenscaper somehow which could mechanically determine the e-mail address based on this javascript and HTML code.
How safe is this method of javascript e-mail obsfuscation really?