I thought I might contribute to the world of bad scripts today. Here’s one I wrote that can be used to be pretty annoying.
——
originalTitle=document.title
// functions to blink the title of the page with a message
function blinkTitle(message, count) {
blinkingTitle(count, message, true);
}
function blinkingTitle(count, message, blink){
if(blink){
document.title=message;
} else {
document.title=originalTitle;
count– // decrement the number of times left to blink
}
if (count > 0) {
blinkTimer = setTimeout(”blinkingTitle(”+count+”, ‘”+message+”‘, “+!blink+”)”, 800);
}
}
—–
You can call this crazy title blinking with something like: blinkTitle(’bitches!’,2)
Try this one in your body tag:
onload=”setInterval(’blinkTitle(”drink.”, 3)’, 1000*60*5);”
That should make your page title blink ‘drink.’ three times every five minutes. Fun times.
5 Comments
jesse
i love it.
my visitors will love it too…if they know whats good for them.
Jake
Ah, I fondly remember the days when marquees and blinking text was all the rage.
MikeCa
Off topic: If its true, then congrats on the new tech venture w/ Digg guys.
http://gigaom.com/2007/05/09/kevin-rose-new-company/
Sean
onload=”setInterval(’blinkTitle(”I’m not a programmer other than this thread tell me how I do .”, 3)’, 1000*60*1);”
Sean
not so well I guess