Just include the antispammail.js file in your documents header or just before the closing body tag. If you use the span Tags with classname crypt
than you should load the CSS file too or copy the styles inside your stylesheet.
If you only want to use the script for decrypting you don't have to load the complete version. Just use antispammail-decrypt.js instead.
<a href="mailto:my@email.com">
my@email.com
</a>
<a href="javascript:antiSpamMail.linkDecrypt('nbjmup;nzAfnbjm/dpn');">
my [at] email [dot] com
</a>
<a href="javascript:antiSpamMail.linkDecrypt('nbjmup;nzAfnbjm/dpn');">
Write me an email!
</a>
<a href="javascript:antiSpamMail.linkDecrypt('nbjmup;nzAfnbjm/dpn');">
my<span class="crypt" aria-hidden="true">.</span>@<span class="crypt" aria-hidden="true">.</span>email<span class="crypt" aria-hidden="true">.</span>.<span class="crypt" aria-hidden="true">.</span>com
</a>
I use the image replacement method by Nicolas Gallagher:
.crypt {
font: 0/0 a;
text-shadow: none;
color: transparent;
border: 0;
background-color: transparent;
}
Please be aware of the licenses of each component we use in this project. Everything else that has been developed by the contributions to this project is under MIT License.