[opencms-dev] Adding some JavaScript

Sam2266 at gmx.de Sam2266 at gmx.de
Wed Dec 13 09:35:23 CET 2006


Good morning everyone,

I'm trying to insert a javascript that is valid for the hole website. The script would normaly be inserted in the <head> or in a separate .js file. It's decrypter to minimize spaming.
<script> <!--
function UnCryptMailto(s, shift) {
	var n=0;
	var r="";
	for(var i=0;i<s.length;i++) { 
		n=s.charCodeAt(i); 
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(shift)); 
	}
	return r;
}
function linkTo_UnCryptMailto(s, shift)	{
	location.href=UnCryptMailto(s, shift);
}
// --> </script>
	
I would use for each email adress a script, so the bots would not find the mail adress that easy.. 
Has anyone of you an idea in which .js file an in which folder do I have to insert this code? I know that there is a javascript file where all scriüts are, but I actually do not know where this file is.

Thanks a lot for your help..

Cheers,
Sam
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



More information about the opencms-dev mailing list