Neil Cowburn is a Freelance iPhone and iPad Developer based in North Wales, UK
Linkie - a Bit.ly app for iPhone, is now available in the iTunes App Store.
25-Jun-09

Here’s a bookmarklet that may be of use to someone reading this blog. Recently Flickr introduced canonical short URLs for all photos hosted by the site. If you look at the source code for a Flickr photo page, you will see a new link element that looks similar to this:

<link rev="canonical" type="text/html" href="http://flic.kr/p/6jZucD" >

As I write this, there doesn’t seem to be a way to retrieve this URL through the page itself, so I wrote a bookmarklet that would pull the canonical short URL from DOM tree. I’ve tested the bookmarklet in Firefox and Safari.

Drag this to your bookmark toolbar: Get flic.kr URL

 

4 comments
  1. Works perfectly – would be even more awesome if the bookmarklet copy and paste the shorten URL into clipboard automatically (I suppose I can do that, but then I'm lazy) :)

  2. Copying to the clipboard via JavaScript in a way that's cross-browser compatible is a bit of a minefield. I'm happy with Cmd-C.

  3. [...] – small snippets of javascript that you can bookmark that perform useful functions. One new find is the Flickr short ur generator, its pretty handy if you like twitter / irc / facebook and post flickr urls a [...]

  4. This is rad! Can you make it work on photos that have an in/set-XXXXXX url?

Leave a

Comment