Buggy user-specific behavior in AniDB js code

All your questions about AniDB belong in here.
No download support!

Moderator: AniDB

Locked
windmage
Posts: 66
Joined: Thu May 26, 2005 11:49 pm

Buggy user-specific behavior in AniDB js code

Post by windmage »

There seems to be a bug in the following javascript code:

http://www.anidb.net/js/anidbscript.js

specifically in lines 41-51:

isWindy = false;
spanlist = document.getElementsByTagName('span');
for (var i = 0; i < spanlist.length; i++)
{ if (spanlist[i].className == "user" && spanlist[i].firstChild.nodeValue.indexOf("windmage") != -1) isWindy = true; }
for (var i = 0; i < linklist.length; i++)
{
var relstring = linklist[i].getAttribute("rel") || "";
if (isWindy)
{
linklist[i].onclick = Confirm;
}

The bug causes an annoying confirmation box to appear whenever any link on anidb is clicked. Oddly it only affects certain users.
dark
Posts: 7
Joined: Wed Oct 19, 2005 12:23 am

Post by dark »

this is amusingly horrible. I guess the real question, Windmage, is which mod hates you ;p
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

It's a feature! That he asked for! ...well, kinda. I figured I'd go the whole way and watch out for *all* his accidental clicks, as a free added bonus. :D
Anyway, I knew I'd have completely forgotten I'd done this by the time windy realised, he uses a JS browser so seldom. I'm sure he'll make sure he uses it much more now, for this special feature.

Rar
fahrenheit
AniDB Staff
Posts: 438
Joined: Thu Apr 08, 2004 1:43 am
Location: Portugal

Post by fahrenheit »

lol, service with a smile :P
Locked