Because of the really intuitive URL (http://btrott.typepad.com/test/), I guess you may not have known that I actually have a moblog, where I post photos from my mobile phone. But for a really long time, in fact—basically, prior to last month—the moblog was the only place where I posted.
I've thought about adding the moblog posts directly to my weblog, but I don't want to discourage myself from actually writing real text posts [1].
So instead of adding the photos to my main weblog, I played around tonight with getting the moblog to show up on my weblog sidebar. And not just the titles of the posts, but the actual photo thumbnails. It was harder than it should have been—I really wish I could've used E4X—and it may not work in Internet Explorer on Windows (I haven't tested it yet there, because I don't have a Windows computer at home).
But so otherwise I have it working now, as you can (hopefully) see in the sidebar to the right! I'm using XMLHttpRequest to parse the Atom feed for my moblog, parsing it, then adding the photos to the sidebar dynamically. The really cool part is that I'm using a Notes TypeList to add the necessary Javascript on my blog, without having to switch to custom templates.
Thanks to:
- Prototype, for providing a really nice base for Ajax requests
- this post, for supplying a DOMParser replacement for browsers that don't support it directly [2]
[1] And no jokes about whether my usual posts about TV should be considered "real" or not.
[2] ... which gets around the really dumb "feature" that some browsers don't try to parse responseXML for responses where the Content-Type isn't text/xml.