User:Kachii/monobook.js

/******************************************************/ /* Multicoloured links Javascript entirely by Kachii */ /* You may not sell or redistribute this script w/o  */ /* prior consent to do so. You may however use it for */ /* yourself on personal webpages. */ /* copyright Kachii (Katy J Ereira) 2005             */ /* Contact kachii@gmail.com for help. */ /******************************************************/

addEventListener("load", loopLinks, false);

//Set the colour array. You can add more, remove some, or change them completely! Whatever colours you want in the cycle var color = new Array( "#E33535", "#E33583", "#E335E1", "#8B35E3", "#354EE3", "#35B4E3", "#35E3A4", "#39E335", "#E1E335", "#E38F35" )

//Set the loop and timer variables, don't change these var i = 0; var timeoutObj;

function loopLinks { for(n=0;n= color.length) { i = 0; }	//work out what element we're changing var link = document.getElementById(element); //change it	link.style.color = color[i]; i++; //loop it :D you can change '50' to whatever you like, the lower the number the faster the rainbow timeoutObj = setTimeout("changeColor('"+element+"')", 50); }

//this function stops the loop on mouseout function clearThis { clearTimeout(timeoutObj); }