TwelvestoneFront End

Probably easy Flickr Javascript ?


Sign in

  • Waiting for Godot ( 720 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 4.8 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.8 k posts )
    general front end design an...
  • Back End ( 9.6 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
valpospe
 
2010-08-04

Flickr just went through a small redesign, but it broke a script that I picked up some time ago. Essentially, the script was just a shortcut to skip right to the large size of an image. From the photo page I would click on a "favorite" on my tool bar which contained and would run this script and load the large size of the image.

Old Script - javascript:for(m%20in%20M=document.getElementsByTagName('img')){s=M[m].src;%20if(s%20&&%20s.match(/static/)%20&&%20!s.match(/_s|buddy/)){void(window.open(s.replace('.jpg','_b.jpg'),'_self'));%20break}}

This no longer works after the changes to flickr. You can still get to the large size of the image, but it takes a few mouse clicks and I'm lazy. With the new site design, after you click through, it loads a new page, that has the original URL with "sizes/l/" at the end. For example - "http://www.flickr.com/photos/lil_lu/3743732878" becomes "http://www.flickr.com/photos/lil_lu/3743732878/sizes/l/"

Phew, sorry for the long winded intro - so I was wondering if one could write a simple script that I could replace the old script with to simply append the URL with "/sizes/l/" and reload the page with that URL. I am no programmer, unless you count writing if/then programs on an Apple II+, so I appreciate your time and consideration. Thanks.

scudsucker
 
2010-08-04

I do not use flickr, nor do I use javascript bookmarklets, but I would guess that you could do it with something like this:

to get http://farm3.static.flickr.com/2518/3743732878_1284d0572b_b.jpg

from http://farm3.static.flickr.com/2518/3743732878_1284d0572b_z.jpg

javascript:for(m%20in%20M=document.getElementsByTagName('img')){s=M[m].src;%20if(s%20&&%20s.match(/static/)%20&&%20!s.match(/_s|buddy/)){void(window.open(s.replace('_z.jpg','_b.jpg'),'_self'));%20break}}

valpospe
 
2010-08-05

Hmm... Like I said, the old, more complex way, no longer works. I don't want to apply the bookmarklet (thanks for the new, to me, word) to the actual image address, ie the farm* url.

Flickr has actually made it much simpler. I just need to append the generic photo page URL with "sizes/l/"

In other words, I am looking for a simple bookmarklet script that would turn -www.whatever.com - into -www.whatever.com/sizes/l/ and reload the page with the appended URL.

Thanks

valpospe
 
2010-08-05

this seems to do the trick

javascript: (function(){%20location.href%20=%20location.href%20+%20'sizes/l/';%20})();

scudsucker
 
2010-08-05

Ok, cool - I thought you wanted to go direct to the actual image, rather than the page that contained the image.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFront End

Probably easy Flickr Javascript ?