Posted By

jatkins on 04/03/11


Tagged

image flickr size resolution full photo


Versions (?)

Flickr Original Resolution Bookmarklet


 / Published in: JavaScript
 

Released to the public domain. You may need to remove the newlines, though you won't need to in Chrome.

This will take you to the viewing page of the largest resolution of the image you are viewing if you are not viewing one of the alternate sizes; if so, it will load the file of the size being shown (i.e. if you are viewing an image click once to view the page with the largest version on, and once more to view the file of the largest version).

  1. javascript:function loadOriginal() {
  2. href = document.location.href;
  3. if(href.indexOf('sizes/')==-1) {
  4. user_regexp = /\/photos\/([^\/]+)\//;
  5. user_start = href.search(user_regexp);
  6. user = href.match(user_regexp)[0];
  7. href = href.substring(user_start + user.length);
  8. next_slash = href.indexOf('/');
  9. document.location = 'http://www.flickr.com' + user + href.substring(0, next_slash != -1 ? next_slash : href.length) + '/sizes/o/';
  10. }
  11. else
  12. document.location = document.getElementById('allsizes-photo').innerHTML.match(/src=\"([^\"]+)\"/)[1];
  13. }
  14. loadOriginal();

Report this snippet  

You need to login to post a comment.