Graceful Mailto Obfuscator plugin

Plugin details

gracefully obfuscates emails as described in a list apart: http://www.alistapart.com/articles/gracefulemailobfuscation

Repositoryhttp://svn.playtype.net/plugins/graceful_mailto_obfuscator Tags Obfuscator, email LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://svn.playtype.net/plugins/graceful_mailto_obfuscator

Requirements
============

Lowpro and Prototype. Lowpro enhances Prototype with some nifty unobtrusive shit. Download from dan's svn repository. Currently that's 0.5:
http://svn.danwebb.net/external/lowpro/tags/rel_0.5/dist/lowpro.js

put that in /public/javascripts then include it in your application layout:

<%= javascript_include_tag "lowpro" %>



Example
=======

calling mail_to("me@mail.com", "mail me") will generate the following link:

 a class="obfuscated" href="/contactto/new/zr+znvy+pbz">mail me a



for users who do not have javascript turned on, /contactto/new collects a message which can be submitted to an action which sends the email, without it ever being divulged.

when javascript is turned on, a behaviour converts the obfuscated anchor into a normal mailto: link with the orignal email address. spam bots will now bounce off your site like frustrated popcorn.

Installation
============

Add the following lines to your application.js:

Event.addBehavior({
  "a.obfuscated": EmailDecoder
});



Include lowpro and the EmailDecoder behaviour in your layout:

<%= javascript_include_tag "email_decoder" %>

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: Guest, about 1 month ago