S.D. 1:26am, 4 July 2009
Flic.kr_link  Greasemonkey Script

I've been seeing people use flic.kr links (Short URL provided by Flickr) so I wrote a Greasemonkey script that will display the current photo's flic.kr link on the page. I then cut and paste the short link (i.e. flic.kr/p/6BsJkW) into Facebook or an email.

You can read about it on my blog and get the script here.

Discussion and Javascript function by ‘Xenocryst @ Antares Scorpii’ here.
He wrote the Base58 Javascript function I made use of and was kind enough to help me clean it up my script a bit.
;)

Simply said, the script inserts:
The Flic.kr link: flic.kr/p/6BsJkW

Right under the "Flag this photo". It can then be cut and pasted as needed. It's not much, but it solved a "problem" for me to make it.

If you just want the script without the Blog entry, here you go.

It's a simple script, but I hope it is useful. Thanks!
Brenda Anderson 6 years ago
Quite neat.

I wonder if the script might have been quicker to simply grab the flic.kr from the HTML of the page, rather than recalculate it?
S.D. Posted 6 years ago. Edited by S.D. (member) 6 years ago
Thanks!

Actually, That was my original plan of attack, but I noticed something interesting:
This has the flic.kr link on line 21:
www.flickr.com/photos/s_d/3664820893/

But not This:
www.flickr.com/photos/s_d/3664820893/in/photostream/
Which I thought was odd, but I wrote the original script to actually load the 1st URL and get the code.

You can see it here and see that it's a bit verbose (first time playing with GM!) but fun for me to play with...

Wil C. Fry Posted 6 years ago. Edited by Wil C. Fry (member) 6 years ago
I can understand that Twitter has a limit on characters, but for most places like blogs and Facebook, wouldn't a regular link work (copied & pasted out of the address bar)?

You can even take out the /photo/ part:

flickr.com/saintseminole/3685959770/
S.D. Posted 6 years ago. Edited by S.D. (member) 6 years ago
Absolutely, but since Flickr offered this functionality, I figured I'd take advantage of it.

Ultimately, for me, It was fun to write and tinker with.

thanks, a much-needed script!

i'm also happy that flic.kr redirects to flickr.com (and redirects all the sub-dirs too)!
S.D. 6 years ago
Glad you like it.

clickykbd 6 years ago
Nice idea for a first script. Thanks for sharing!
S.D. 6 years ago

Wil C. Fry 6 years ago
Cool.
bitrot Posted 6 years ago. Edited by bitrot (member) 6 years ago
Doh! Didn't think of searching for this before I did the same thing, also based on Xenocryst @ Antares Scorpii's bookmarklet code. Mine just puts the link in a slightly different place on the page:

flic.kr short URL screenshot

Still, variety is the spice of life and all that! Here's the link:

userscripts.org/scripts/show/56364
S.D. 6 years ago

bitrot 6 years ago
I've just released v0.2 of my script that fixes the bug caused by today's change in the Flickr page source code. Unfortunately you'll need to update all your other scripts that have been broken in order for it to take effect. (The fix is described in that link.)

You can grab v0.2 from Userscripts:

userscripts.org/scripts/show/56364
S.D. 5 years ago
I've updated the script to work with old and new photo page.
Groups Beta