Flickrlicious

Not being a big Del.icio.us user (I tend to use MyWeb more, but I'm weird), I hadn't known about it's integration with flickr.

The method they use is fairly simple, if you wanted to do it yourself:

/* Get the document's URL and split on the slashes. */
var urlBits = document.location.pathname.split('/');
/* (the split returns empty elements at the start and end, I'll cheat a little to get the last real bit) */
var photoId = urlBits[urlBits.length - 2];
/* The actual img tag is the first DOM child of the photoImgDivphotoId section.
It's also the only element. */

var img = document.getElementById('photoImgDiv'+photoId).firstChild;
/* Get the img's src, and add a "_t" to the end to give the thumnail.
adding "_m" gives the 'medium' resolution if you want something larger. */

var imgUrl = img.src;
imgUrl.replace('.jpg','_t.jpg');

Forgive my crappy Javascript, I'm still in the process of learning it all, but I figured it worked as psuedo-code.

Leave a Reply


Yahoo! Font by Daniel Gauthier
Feed Icons by Matt Brett