Java Script Scrambler
[created 2/11/2003 updated 2/13/2003] 
With thanks to: http://innerpeace.org/escrambler.shtml
 Be certain to visit "Inner Peace".
    They have a very nice description of the need for a scrambler (called EScrambler)
    They have a webpage containing a clever automatic code generation tool
        - nice demos
        - fun to use
        - the webpage can be saved as a webpage on your hard disk to use locally


This webpage,  Java Script Scrambler, describes a Java script which prevents spam crawler robots from "mining" your webpage for email addresses.  This method provides your email addresses to legitimate visitors of your web site without ending up on more junk email lists.   This is an improvement over the annoying and confusing technique used by many people who insert words like "REMOVE" or "TAKEOUT" into their email addresses. This practice is very common on NewsGroup postings which were the first source of email addresses for SPAM robots ... sometimes called "data mining".

To learn more, visit: http://innerpeace.org/escrambler.shtml I have modified their code further to make decoding even more impossible while simplifying their Java script.

The old way:  I used to modify Email Addresses to prevent "mining" of addresses from my websites by companies that send out "SPAM" ... ie: unsolicited advertisements to get rich quick, sell products and promote adult websites. Thus, the email address:  joedoe@mail.com was represented by joedoeREMOVE@mail.com.  Another method was to make the email address a graphic: no mailto link in place with no link to sending an email; thus, the user had to open an email and type in the email address by hand which is fraught with making typing errors.

The embedded link information would be:  "mailto:joedoeREMOVE@mail.com

After clicking on the address, the browser will open a message window with the above address in the "To:" window.  The sender needed to delete the letters "REMOVE"  before clicking on "Send".  This confused many people and resulted in emails which didn't reach the intended recipient.

There are three Java scripts for three forms of email addresses:
    joedoe@mail.com ...... email link from the same email address (guaranteed to produce SPAM)
    Joe Doe ..................... email link from text on page which is different from the email address
  .............. email link from an image, icon or animated GIF file
You can click on each of these to see the email page created ... the old way.
 
EScrambler scrambles the email address by breaking it into two parts  "username" and the "domain" ...ie: "joedoe" and "mail.com".  I further break up the domain into two parts: "mail" and "com". Also note: the word "mailto:" is scrambled increasing the difficulty of the SPAM robot finding your email addresses.

I save the Java script in a text file using Microsoft Notepad for later use.  I then open the text file, cut-and-paste the intended email address into the Java script.  Next I copy the Java Script and paste it into the HTML code of the webpage.

When using Microsoft Word to create webpages, first select "View" and click on "Web Layout".  The select "File" and click on "Save as Web Page".   Now that the document is an official webpage, you can select "View" and click on "HTML Source".  The trick is finding the correct place to "paste" the Java script into the HTML source code (search for closely associate text).

Using Netscape Composer, you select "Insert" and click on "HTML Tag ...".  Then paste the Java script in the window displayed.  This leaves an icon representing the HTML tag on your source webpage:  but produces the appropriate script and image on the user's screen based by executing the Java script contained within the HTML file.  HTML files are what the browser reads and interprets to produce the webpage on your screen. When the browser encounters the Java script, that script is executed (and that is about all I know about this stuff ... hope you know much more).

Be certain to replace "com" with "net", "us", etc. if necessary.  Normally it is best to use lower case except for AOL email addresses. Each example in the heading should produce a blank email addresses to: NNNNN@DDDD.com
 

Basic Email Address 
 Link from TEXT
 Link from Graphic 
   
<SCRIPT><!-- 
function escramble() 

 var a,b,c,d,e 
 a='<a href=\"mai' 
 b='NNNNN
 c='\">' 
 a+='lto:' 
 b+='@' 
 e='</a>' 
 b+='DDDD
 b+='.' 
 b+='com
 d=b 
 document.write(a+b+c+d+e) 

escramble()//--></SCRIPT> 
 
<SCRIPT><!-- 
function etscramble() 

 var a,b,c,d,e,f 
 a='<a href=\"mai' 
 b='NNNNN
 c='\">' 
 a+='lto:' 
 b+='@' 
 e='</a>' 
 f='ANYTEXT
 b+='DDDD
 b+='.' 
 b+='com
 d=f 
 document.write(a+b+c+d+e) 

etscramble()//--></SCRIPT> 
 
<script><!-- 
function egscramble(){ 
 var a,b,c,d,e,f,g,h,i 
 a='<a href=\"mai' 
 b='NNNNN' 
 c='\">' 
 a+='lto:' 
 b+='@' 
 e='</a>' 
 f='' 
 b+='DDDD 
 b+='.'  
 b+='com' 
 g='<img src=\"' 
 h='send_email_anim.gif
 i='\" alt="Email us." border="0">' 
 d=g+h+i 
  document.write(a+b+c+d+e) 
} 
egscramble()//--></script>
 
Copy three files from above or download these 3 text files: escramble  eTscramble  eGscramble    
[Note: right click and save to a file ... double click results in execution!]
 
Notes:
- Some blank spaces are important.
- In the Link from Graphic example, you could also change Alt. Text, "Email us." to something else. 
[Return to SHA Homepage]
Address of this webpage:  http://www.sailplanehomebuilders.com/scrambler.htm
Copyright © 2001 by Sailplane Homebuilders Association, all rights reserved