The whole document you posted the URL of does not >contain any script
Here is the source code, the FIRST hundred lines, with the codes, which of
course are then displayed on the page in textareas (you know darling, that
funny procedure whereas you populate a textarea with a call to
toString()...): DO FIND EVAL NOW and do DEMONSTRATE there are no
javascripts, please. Now you go till the end of your GRATUITOUS and FALSE
allegations darling...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>JS: css: The style sheets bonanza (Javascript)</title>
<link rel="stylesheet" type="text/css" href="../orange.css">
<link rel="stylesheet" type="text/css" href="../red.css">
<script language="JavaScript" src="../miscella.js">
</script>
<script><!--
function findSheet(characteristic, characteristicIsHREF){
if(!document.getElementById || !document.styleSheets.length){ return
false; };
if(typeof(characteristic)=="undefined"){ return false; };
this.characteristicIsHREF = (characteristicIsHREF)?1:0;
switch( typeof(characteristic) ){
case "number":
if( (characteristic>document.styleSheets.length-1)
|| typeof(document.styleSheets[characteristic])=="undefined" ){
return false; };
var href=document.styleSheets[characteristic].href;
return new Array(
document.styleSheets[characteristic],
characteristic,
href.substring( href.lastIndexOf("/")+1 ),
href
);
break;
case "object":
var i=0;
var objectToReturn;
outer:
for( ; i<document.styleSheets.length; i++){
if(document.styleSheets[i]==characteristic){
objectToReturn=document.styleSheets[i];
break;
};
if(document.styleSheets[i].imports){
for(var ii=0; ii<document.styleSheets[i].imports.length; ii++){
if(document.styleSheets[i].imports[ii]==characteristic){
objectToReturn=document.styleSheets[i].imports[ii];
break outer;
};
};
};
};
return (typeof(objectToReturn)=="undefined")?
false:new Array(
objectToReturn,
i,
objectToReturn.href.substring( objectToReturn.href.lastIndexOf("/")+1 ),
objectToReturn.href
);
break;
case "string":
this.stripHref=function(arg1, arg2){
if(!this.characteristicIsHREF){
arg1=arg1.substring( arg1.lastIndexOf("/"+1) );
var reg=new RegExp();
reg.compile("\\b"+arg2+"\\b","g");
return reg.test(arg1);
}
else{
return(arg1==arg2)?true:false;
}
return false;};
var i=0;
var objectToReturn;
outer:
for( ; i<document.styleSheets.length; i++){
if( this.stripHref( document.styleSheets[i].href, characteristic ) ){
objectToReturn=document.styleSheets[i];
break;
};
if(document.styleSheets[i].imports){
for(var ii=0; ii<document.styleSheets[i].imports.length; ii++){
if( this.stripHref( document.styleSheets[i].imports[ii].href,
characteristic ) ){
objectToReturn=document.styleSheets[i].imports[ii];
break outer;
};
};
};
};
return (typeof(objectToReturn)=="undefined")?
false:new Array(
objectToReturn,
i,
objectToReturn.href.substring( objectToReturn.href.lastIndexOf("/")+1 ),
objectToReturn.href
);
break;
};
return false;
/* keep this comment to reuse freely:
http://www.unitedscripters.com */};
function addClass(sheetIndex, definition, optionalIndex){
if(!document.getElementById || !document.styleSheets.length){ return
false; };
sheetIndex=(sheetIndex && !isNaN(parseFloat(sheetIndex)))?
parseFloat(sheetIndex):0;
if(sheetIndex>document.styleSheets.length-1){ return false; };
if(!definition || definition.indexOf("{")==-1 ||
definition.indexOf("}")==-1 ){ return false; };
var obj=document.styleSheets[sheetIndex];
optionalIndex=(!optionalIndex)?1:
(obj.rules)?
obj.rules.length : obj.cssRules.length;
if(obj.addRule){
definition=definition.split("{");
obj.addRule(definition[0], definition[1], optionalIndex);
}
else if(obj.insertRule){
obj.insertRule(definition, optionalIndex);
};
return true;
/* keep this comment to reuse freely:
http://www.unitedscripters.com */};
function deleteClass(sheetIndex, whichIndex){
if(!document.getElementById ||
!document.styleSheets.length ||
typeof(whichIndex)=="undefined" ){ return false; };
sheetIndex=(sheetIndex && !isNaN(parseFloat(sheetIndex)))?
parseFloat(sheetIndex):0;
if(sheetIndex>document.styleSheets.length-1){ return false; };
var obj=document.styleSheets[sheetIndex];
whichIndex=(!isNaN(parseFloat(whichIndex)))? parseFloat(whichIndex):0;
var RULES=(obj.rules)?"rules":"cssRules";
if(whichIndex>obj[RULES].length-1){ return false; };
if(obj.removeRule){
obj.removeRule( whichIndex );
}
else if(obj.deleteRule){
obj.deleteRule( whichIndex );
};
return true;
/* keep this comment to reuse freely:
http://www.unitedscripters.com */}
function switchSheet(indexOrObject, off){
if(!document.getElementById || !document.styleSheets.length){ return
false; };
off=(!off)?true:false;
var obj;
if(typeof(parseFloat(indexOrObject))=="number"){
indexOrObject=parseFloat(indexOrObject);
if(indexOrObject>document.styleSheets.length-1){ return false; };
obj=document.styleSheets[indexOrObject];
}else{
obj=indexOrObject;
};
obj.disabled=(off)?false:true;
return true;
};
function allClasses(indexOrObject){
if(!document.getElementById || !document.styleSheets.length){ return
false; };
indexOrObject=(indexOrObject && !isNaN(parseFloat(indexOrObject)))?
parseFloat(indexOrObject):
(typeof(indexOrObject)=="object")?indexOrObject:0;
var isObj=(typeof(indexOrObject)=="object")?1:0;
if(!isObj && typeof(document.styleSheets[indexOrObject])=="undefined"){
return false; };
var output=new Array(0);
var RULES=( typeof(document.styleSheets[0].rules)!="undefined" )?
"rules":"cssRules";
var object=(!isObj)?
document.styleSheets[indexOrObject]:indexOrObject;
for(var i=0; i<object[RULES].length; i++){
var OL=++output.length-1;
output[OL]=
new Array(
object[RULES][i],
object[RULES][i].selectorText,
new Array(0), new Array(0), new Object(), i, indexOrObject
);
for(var grab in object[RULES][i].style){
var current=object[RULES][i].style[grab];
if(current!="" && typeof(current)!="function"){
output[OL][2][ ++output[OL][2].length-1 ]=grab;
output[OL][3][ ++output[OL][3].length-1 ]=current;
output[OL][4]=object[RULES][i].style;
};
};
};
return output;/* keep this comment to reuse freely:
http://www.unitedscripters.com */};
function oneClass(object, cssIndex, setProperty, withThisValue,
objIsSelector){
if(!document.getElementById || !document.styleSheets.length){ return
false; };
var type=typeof(object);
object=(!isNaN(parseFloat(object)))? parseFloat(object):object;
if( type=="object" ||
(type=="number" && typeof(cssIndex)!="undefined") ){
cssIndex=(!isNaN(parseFloat(cssIndex)))? parseFloat(cssIndex):0;
if(type!="object" && cssIndex>document.styleSheets.length-1){ return
false; };
var trueObject=(type=="object")?
object:document.styleSheets[cssIndex];
var RULES=(trueObject.rules)?"rules":"cssRules";
if(type=="number" && object>trueObject[RULES].length-1){ return
false; };
trueObject=(type=="object")?
trueObject:trueObject[RULES][object];
if(setProperty){
trueObject.style[setProperty]=withThisValue;
return true;
};
var output=new Array(1);
output[0]=new Array(
trueObject,
trueObject.selectorText,
new Array(0), new Array(0), new Object(), object
);
var OL=output.length-1;
for(var grab in trueObject.style){
var current=trueObject.style[grab];
if(current!="" && typeof(current)!="function"){
output[OL][2][ ++output[OL][2].length-1 ]=grab;
output[OL][3][ ++output[OL][3].length-1 ]=current;
output[OL][4]=trueObject.style;
};
};
return output;
}
else if(type=="number" && typeof(cssIndex)=="undefined"){
var output=new Array(0);
var RULES=(document.styleSheets[0].rules)?"rules":"cssRules";
for(var i=document.styleSheets.length-1; i>=0; i--){
var trueObject=document.styleSheets[i][RULES];
if(object>trueObject.length-1){ ;continue; };
var OL=++output.length-1;
output[OL]=new Array(
trueObject[object],
trueObject[object].selectorText,
new Array(0), new Array(0), new Object(), object, i
);
for(var grab in trueObject[object].style){
var current=trueObject[object].style[grab];
if(current!="" && typeof(current)!="function"){
output[OL][2][ ++output[OL][2].length-1 ]=grab;
output[OL][3][ ++output[OL][3].length-1 ]=current;
output[OL][4]=trueObject.style;
};
};
};
return output;
}
else if(type=="string"){
var output=new Array(0);
this.compare=function(arg1, arg2){
if(objIsSelector){
return (arg1==arg2)?true:false;
}
else{
arg2=arg2.replace(/\./gi,"");
var expr=new RegExp("\\b"+arg2+"\\b");
return expr.test(arg1);
};
};
if(setProperty){
cssIndex=(!isNaN(parseFloat(cssIndex)))? parseFloat(cssIndex):0;
if(cssIndex>document.styleSheets.length-1){ return false; };
var RULES=(document.styleSheets[0].rules)?"rules":"cssRules";
for(var i=0; i<document.styleSheets[cssIndex][RULES].length; i++){
var current=document.styleSheets[cssIndex][RULES][i];
if( this.compare(object, current.selectorText) ){
current.style[setProperty]=withThisValue;
return true;
};
};
}
else{
if(typeof(cssIndex)=="undefined" ||
(typeof(cssIndex)!="number" && objIsSelector)
){
var RULES=(document.styleSheets[0].rules)?"rules":"cssRules";
for(var i=document.styleSheets.length-1; i>=0; i--){
for(var ii=0; ii<document.styleSheets[i][RULES].length; ii++ ){
var current=document.styleSheets[i][RULES][ii];
if( this.compare(object, current.selectorText) ){
var OL=++output.length-1;
output[OL]=new Array(
current,
current.selectorText,
new Array(0), new Array(0), new Object(), ii, i
);
for(var grab in current.style){
var current2=current.style[grab];
if(current2!="" && typeof(current2)!="function"){
output[OL][2][ ++output[OL][2].length-1 ]=grab;
output[OL][3][ ++output[OL][3].length-1 ]=current2;
output[OL][4]=current.style;
};
};
};
};
};
}
else{
cssIndex=(!isNaN(parseFloat(cssIndex)))? parseFloat(cssIndex):0;
if(cssIndex>document.styleSheets.length-1){ return false; };
var RULES=(document.styleSheets[0].rules)?"rules":"cssRules";
for(var i=0; i<document.styleSheets[cssIndex][RULES].length; i++){
var current=document.styleSheets[cssIndex][RULES][i];
if( this.compare(object, current.selectorText) ){
var OL=++output.length-1;
output[OL]=new Array(
current,
current.selectorText,
new Array(0), new Array(0), new Object(), i, cssIndex
);
for(var grab in current.style){
var current2=current.style[grab];
if(current2!="" && typeof(current2)!="function"){
output[OL][2][ ++output[OL][2].length-1 ]=grab;
output[OL][3][ ++output[OL][3].length-1 ]=current2;
output[OL][4]=current.style;
};
};
};
};
};
};
return output;
};
return false;/* keep this comment to reuse freely:
http://www.unitedscripters.com */}
function findClass(wantedClass, beyondMatch){
/*REQUIRES the allClasses function in the same document*/
if(!wantedClass || !document.styleSheets){return false;};
if(!window["allClasses"]){ return false; };
var tempClasses=new Array(0);
this.compare=function(arg1, arg2){
if(arg1==arg2){return true}
else{
arg2=arg2.replace(/\./gi,"");
var expr=new RegExp("\\b"+arg2+"\\b");
return expr.test(arg1);
};
}
var output=new Array(0);
outer:
for(var s=document.styleSheets.length-1; s>=0; s--){
tempClasses=allClasses(s);
for(var t=0; t<tempClasses.length;t++){
if(this.compare(tempClasses[t][1], wantedClass)){
var OL=++output.length-1;
output[OL]=new Array(0,0,0,0)
output[OL][0]=s;
output[OL][1]=t;
output[OL][2]=document.styleSheets[s];
output[OL][3]=tempClasses[t];
if(!beyondMatch){ return output; }
};
};
};
return output;/* keep this comment to reuse freely:
http://www.unitedscripters.com */}
function readClass(cssIndex, ruleIndex, property, optionalID){
if(!document.getElementById){ return false; };
if(optionalID){
return (!document.getElementById(optionalID))?
false:(document.getElementById(optionalID)[property])
};
if(!document.styleSheets.length){ return false ;}
cssIndex=(cssIndex && !isNaN(parseFloat(cssIndex)))? parseFloat(cssIndex):0;
ruleIndex=(ruleIndex && !isNaN(parseFloat(ruleIndex)))?
parseFloat(ruleIndex):0;
if(cssIndex>document.styleSheets.length-1){ return false; };
var RULES=( typeof(document.styleSheets[0].rules)!="undefined" )?
"rules":"cssRules";
if(ruleIndex>document.styleSheets[cssIndex][RULES].length-1){ return
false; };
return document.styleSheets[cssIndex][RULES][ruleIndex].style[property];
/* keep this comment to reuse freely:
http://www.unitedscripters.com */}
function writeClass(cssIndex, ruleIndex, property, value, optionalID,
onlyID){
if(!document.getElementById){ return false; };
if(optionalID){
if(onlyID){
return (!document.getElementById(optionalID))?
false:(document.getElementById(optionalID)=value)
}
else{
if(typeof(optionalID)=="string" &&
!document.getElementById(optionalID)){ return false; };
if(typeof(optionalID)=="string"){document.getEleme ntById(optionalID)[propert
y]=value}
else{/*an array of IDs!*/
for(var id=0; id<optionalID.length; id++){
if(!document.getElementById(optionalID[id])){continue};
document.getElementById(optionalID[id]).style[property]=value;
};
};
};
};/*out of if optionalID*/
if(!document.styleSheets.length){ return false ;}
cssIndex=(cssIndex && !isNaN(parseFloat(cssIndex)))? parseFloat(cssIndex):0;
ruleIndex=(ruleIndex && !isNaN(parseFloat(ruleIndex)))?
parseFloat(ruleIndex):0;
if(cssIndex>document.styleSheets.length-1){ return false; };
var RULES=( typeof(document.styleSheets[0].rules)!="undefined" )?
"rules":"cssRules";
if(ruleIndex>document.styleSheets[cssIndex][RULES].length-1){ return
false; };
return
document.styleSheets[cssIndex][RULES][ruleIndex].style[property]=value;
/* keep this comment to reuse freely:
http://www.unitedscripters.com */}
//--></script>
<style>
..thisCell{background-color:#cc0000;}
</style>
</head>
<body bgcolor="#ff0000" onLoad="" link="#ff9999" alink="#ff0000"
vlink="#ff9999">
<form name="main">
<script language="JavaScript">
<!--
var df=document.forms[0];
var nm=new Image(200,410)
nm.src="moric4.jpg";
function addcomm(arg, a2){
arg=arg.toString();
if(a2){return arg};
if(arg.indexOf("unitedscripters")==-1){
arg=arg.substring(0,arg.lastIndexOf("}"));
arg+="}";
}
return arg;
}
(... ... ...)
The function returns an <strong>Array</strong> of <strong>5 entries</strong>
holding the following data on the style sheet (or it returns
<strong>false</strong> if no styleSheet corresponding to the passed criteria
has been located in the current document):
<ol start="0">
<li><strong>entry [0]</strong>: the style sheet Object (a scripting
reference to it, that is)</li>
<li><strong>entry [1]</strong>: the style sheet <strong>numerical
index</strong></li>
<li><strong>entry [2]</strong>: the style sheet file <strong>name</strong>
stripped of the location path.<br>
If there was no external file, but say a STYLE tag, this property would
carry an empty string.
</li>
<li><strong>entry [4]</strong>: the style sheet location path (very good in
case you knew only the file name but not the path!)<br>
If there was no external file, but say a STYLE tag, this property would
carry an empty string.</li>
</ol>
(... ... ...)
<script><!--
function test1(){
if(!document.styleSheets){alert("Your browser does not recognizes the
syntax styleSheets.\nPlease consider upgrading to Netscape 6 and above or to
Mozilla or to Internet Explorer 5 and above.\n\nFunction aborted.");return
false;}
if(/^\s+$/.test(df.t1t1.value) || df.t1t1.value==""){
alert("No valid data input. Please provide data. Function aborted.");
return false;
}
var hr=(df.t1c1.checked)?1:0;
var arg1=(!isNaN(parseFloat(df.t1t1.value)))?
parseFloat(df.t1t1.value):df.t1t1.value;
df.t1s1.value="findSheet("+ (
(typeof(arg1)=="number")?arg1:("'"+arg1+"'") )+", "+hr+")";
var out=findSheet( arg1, hr )
df.t1x1.value=(out)?out.join("\n"):out;
}//--></script>
(... ... ...)
textarea name="f3" cols="60" rows="15" class="buttons2" wrap="hard"
style="text-align:right;font-weight:normal;text-decoration:underline;color:#
F7C684" onFocus="this.select()"
onChange="this.value=addcomm(allClasses)"></textarea>
<script><!--
df.f3.value=addcomm(allClasses);
//--></script>
SEE ABOVE! Surpries! A textarea df.f3.value= populated with a script code
from a function named allClasses!
And yet you say you saw no codes...
mmmmmhhhhh... smart guy!