Peter
New Member
God
Posts: 6
|
Post by Peter on Oct 30, 2004 14:04:52 GMT
Simple one, someone asked for it, so I thought I would see if I could do it :P
When you have new PM's the PM link will flash, but rotate the colours
add to heades
<script type="text/javascript"> <!-- /* Copyright © 2003 - 2004 SolidSnakeDesigns.com All Rights Reserved
This code may not be redistributed without express permission from the creator. This header must stay intact at all times. */
var flashSpeed = 100 //speed of changing colours var cycleLength = 4 //how many times it repeats
//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")[0].innerHTML.match(re)){ if(RegExp.$1 >= 1){ curColor = (curColor == 3) ? 0 : ++curColor; document.getElementsByTagName("a")[0].style.color = colors[curColor]; if(tCycles++ < Math.floor(cycleLength * cycleLength)){ var inter = setTimeout("cColors()",flashSpeed); } else { document.getElementsByTagName("a")[0].style.color = colors[0]; clearTimeout(inter); } } else { return false; } } }
cColors()
//--> </script>
#nosmileys#nosmileys
|
|