Peter
Junior Member
Coding God
Posts: 50
|
Post by Peter on Apr 29, 2006 13:14:33 GMT
<script type="text/javascript"> <!--
// Legend in info center. // Created by Peter
var iLegend = [ ["Member", ""], ["Moderator", "green"], ["Global Moderator", "blue"], ["Administrator", "red"] ];
var iDiv = document.createElement("div"); var iTable = document.getElementsByTagName("table");
for(t = 0; t < iTable.length; t ++){ if(iTable.item(t).width == "98%" && iTable.item(t).cellPadding == "3"){ if(iTable.item(t).rows.item(0).innerHTML.match(/Most users online/)){ var nCell = iTable.item(t).insertRow(iTable.item(t).rows.length).insertCell(0); for(l = 0; l < iLegend.length; l ++){ var nSpan = document.createElement("span"); nSpan.align = "center" nSpan.style.color = iLegend[l][1]; nSpan.style.fontSize = 9; nSpan.appendChild(document.createTextNode(iLegend[l][0])); iDiv.appendChild(nSpan); if(l != (iLegend.length - 1)){ iDiv.appendChild(document.createTextNode(" - ")); } } iDiv.align = "center"; nCell.appendChild(iDiv); } } }
//--> </script>
Main footer.
This will show a small legend under the users online. You can change the colors in the array.
|
|