I think I have a resolution to the Twitter code problem that's been bugging me for the last few days. Although I reserve the right to develop new issues should obnoxious non-standard browser conflicts demand it.
I did some serious investigation into the Twitter-Code-On-IE thing. If you do a Google search for '"NaN days ago" Twitter', you'll find a couple other confused souls out there. How can something as (temporarily) huge as Twitter drop this shitty code out there and not have it work inside the world's (unfortunately) #1 web browser? It boggles the mind. I guess nobody is using this particular display option. Or, at least, those who are using it know enough how to fix it. Unlike me.
A few more Google searches brought me to PatMyBelly.com, where the proprietor Ant had posted some clever and brief custom code... an adaptation of the Twitter-supplied stuff with the bonus of actually working in more than one browser. This code even includes nifty back-and-forth buttons to page through the last ten messages, which makes it very similar to Twitter's own Flash solution without being ugly and permanently set to a weird, unusable size.
So last night I set to work adapting the PatMyBelly code to work within the word balloon design I had already created. (IT'S LIKE THE LOGO IS TALKING, GET IT.) The big hurdle was figuring out how to twist the code into working with a table of images, since the original is all text based. Safari and IE handle table imagery in subtle yet annoying ways. In Safari, you can declare background images in just about any portion, the TABLE, the TR or the TD. IE isn't as forgiving; it just wants the TABLE or TD. I had to use background graphics to simulate the "dimmed arrow" look when you can't page further forward or backward. What's actually happening there is that the dimmed arrow is part of a background image, which, should paging be active, is then covered with a lit arrow image.
It's probably the worst way in the world to handle something like that, so pro coders the world over can begin laughing now.
Anyway, once I figured out the precise language so that the table displayed properly in Safari and in Explorer, then I realized that the timestamp was incorrect. It was showing a two-hour-old message as being from "about a minute ago." The implication being that I played Baten Kaitos at two in the morning, gasp. That's better than defaulting to "NaN days ago," sure, but still undesireable.
The vagaries of javascript time functions are above my head, so I posted a message to PatMyBelly and received a reply with corrected code within hours. Turns out, Ant had not included a line to handle adjustment for different time zones. Crazy! I never would have figured that out; I probably would have just moved to French Guiana, where the timestamps would have been correct. With the fix applied, the Twitters all sorted themselves into a more chronologically accurate position, so people tracking my Baten Kaitos play can breathe a now-accurate sigh of relief.
So the main reason behind this entry is to give a big shout out of thanks to PatMyBelly.com, who, in addition to hosting a sweet Twitter code solution, also sports a kickingly colorful weblog design.
And, secondarily, to get this info into Google so future webloggers pissed off by Twitter can search themselves closer to fixing the problem. The truth is out there. You don't have to put up with NaN Days Ago anymore.
JavaScript is usually the hardest to get correct on all browsers unless you're really trained in the stuff. I'm a web developer, and I disregarded cross-browser compatible javascript when I first started, so I had a lot of trouble later on when I was testing it all. Granted, that was years ago, so now I write the code correctly on the first shot. ;) (or at least, with only minor tweaking, haha)
I do have to say though, whenever I use "premade" code from somebody else for some widget or similar (like in the case with twitter) I always end up recoding it all for myself as it's usually broken on a lot of browsers.
Sorry for the delay. Thank you so much for the shout out! It's very much appreciated. Glad the code helped you out - let me know if there's anything else I can help with.