Skip to content
This repository has been archived by the owner on Feb 19, 2018. It is now read-only.

Latest commit

 

History

History
75 lines (47 loc) · 2.05 KB

README.md

File metadata and controls

75 lines (47 loc) · 2.05 KB

Mailifier – Hide email addresses from spambots

Mailifier is a jQuery plugin that allows you to display emailaddresses in webpages whilst preventing spambots from harvesting them.

Features

  • Mailifier is fast and compact.
  • Being a jQuery plugin it is easily implemented.
  • It allows for easy extending and customization.

Example

Original HTML:

<span class="email">user [at] example [dot] com</span>

Javascript:

$("span.email").emailify();

Resulting HTML:

<span class="email"><a href="mailto:[email protected]">[email protected]</a></span>

View this example at jsfiddle.

Requirements

jQuery 1.4.4 or higher.

Instructions

  1. Include the plugin on your web page:

    <script src="jquery.vm.emailifier.min.js" type="text/javascript"></script>
  2. Contain obfuscated emailadresses in an arbitrary element:

    <span class="email">tim [at] example [dot] com</span> <span class="email">bob [at] example [dot] com</span>

  3. Emailify the addresses:

    $(document).ready(function() { $("span.email").emailify(); });

Parameters

The options are to be passed in an object. None are mandatory.

OPTIONTYPEDEFAULTREMARK
atSignstring" [at] "String that will be replaced by '@'.
dotSignstring" [dot] "String that will be replaced by '.'.
substitutefunction(string)The substitute html can be customized by passing in a function. It receives the deobfuscated address as a parameter and should return the substitute html.

About Emailifier

Emailifier was developed by Roel van Dijk, Anne Fortuin, Rolf Timmermans and Thijs Brilleman.

Copyright 2011 Voormedia - www.voormedia.com

License

Emailifier is released under the MIT license.