“E”-ddress encoder

"So who is the real Mr. Tines? The monster who'd smash a world, or the nice guy I'm hearing now?"
-- The Blabber, Vernor Vingee.

S I T E   M A P





 

 

This page contains JavaScript that emulates an early version of the Hiveware/Hivelogic “Enkoder” program, one that ran on platforms other than Mac (current official version here). This version emulates the simple XOR masking of the original; but I have modified the scripting so that it uses DOM manipulation, rather than document.write(), which makes it suitable for use in XHTML pages.

Enter your details in the text fields, and then hit “Go!” — this generates a simple HTML page with scripting which can be used as a skeleton for your pages, like this (generated with the default values):

<html><head><title>"E"-ddress encoder framework page</title>
<script type="text/javascript">
var data=new Array(
575,563,571,574,550,573,616,567,
575,563,571,574,530,572,573,549,
570,567,544,567,636,572,571,574,
621,545,551,560,568,567,561,550,
623,518,570,571,545,631,608,610,
575,563,571,574,631,608,610,571,
545,631,608,610,563,560,573,551,
550,616,594,535,575,563,571,574,
626,575,567,627,594,567,575,563,
571,574,622,563,550,620,572,573,
549,570,567,544,567,622,566,573,
550,620,572,571,574,594
);
function injectEddress(){if(!document.layers){
var m = document.getElementById('mailtag');while(m.firstChild) {m.removeChild(m.firstChild);}
var a = document.createElement('a');
var idx=0, n=data[data.length-1];var mailtext= '';
while( data[idx]!=n ) {mailtext+=String.fromCharCode(data[idx++]^n);}idx++;a.setAttribute('href', mailtext);mailtext= '';
while( data[idx]!=n ) {mailtext+=String.fromCharCode(data[idx++]^n);}idx++;a.setAttribute('title', mailtext);mailtext= '';
while( data[idx]!=n ) {mailtext+=String.fromCharCode(data[idx++]^n);}idx++;a.appendChild(document.createTextNode(mailtext));
m.appendChild(a)};};
</script></head><body>
<p id="mailtag">email &lt;at&gt; nowhere &lt;dot&gt; nil</p>
<script type="text/javascript">injectEddress()</script>
</body></html>

The paragraph with the id attribute of mailtag is modified during the page load, to become:

<p id="mailtag">

    <a title="Email me!" href="mailto:[email protected]?subject=This+mail+is+about%3A"> email&lt;at&gt;nowhere&lt;dot&gt;nil </a>

</p>

The script section in the head should be lifted out into a separate .js file so that it can be referred to from every page, rather than bulking every page up.

The subject is optional and can be left blank, which than omits the “?subject=” clause from the mailto: URL.

The source for the script is here. You can save the page as “Web Page, complete” and run it in a browser locally.


Made with Cascading Style Sheets

This document maintained by domain webmaster - tines at ravna and tines dot com.

Material Copyright © 2000-2005 Mr. Tines

S I T E   M A P
Hosted by www.Geocities.ws

1