inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jun 5, 2005 4:03:48 GMT -8
<script type="text/javascript"> <!--
// Created by PopThosePringles
// Speed of changing colours var flashSpeed = 100;
// How many times it repeats; var cycleLength = 4;
//change the colours below var colors = ["red", "green", "yellow", "blue"];
var re = />,\s(\d+)\s(are|is)\s/i var tCycles = curColor = 0;
function cColors(){ if(document.getElementsByTagName("table").item(0).innerHTML.match(re)){ if(RegExp.$1 >= 1){ curColor = (curColor == 3) ? 0 : ++ curColor; document.getElementsByTagName("a").item(0).style.color = colors[curColor]; if(tCycles ++ < Math.floor(cycleLength * cycleLength)){ var inter = setTimeout("cColors()", flashSpeed); } else { document.getElementsByTagName("a").item(0).style.color = colors[0]; clearTimeout(inter); } } else { return false; } } }
cColors();
//--> </script>
Add to global headers.
You can add more colors to the array in the top of the script.
|
|