Discussions (2,366)

GM Script: Flic.kr Link

view profile

S.D. says:

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!
6:26PM, 3 July 2009 PST (permalink)

view photostream

Brenda Anderson says:

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?
69 months ago (permalink)

view photostream

S.D. says:

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...


Originally posted 69 months ago. (permalink)
S.D. edited this topic 69 months ago.

view photostream

Wil C. Fry says:

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/
Originally posted 69 months ago. (permalink)
Wil C. Fry edited this topic 69 months ago.

view photostream

S.D. says:

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.


Originally posted 69 months ago. (permalink)
S.D. edited this topic 69 months ago.

view photostream

ryanne { trimmed reality } says:

thanks, a much-needed script!

i'm also happy that flic.kr redirects to flickr.com (and redirects all the sub-dirs too)!
69 months ago (permalink)

view photostream

S.D. says:

Glad you like it.


69 months ago (permalink)

view photostream

clickykbd says:

Nice idea for a first script. Thanks for sharing!
69 months ago (permalink)

view photostream

S.D. says:



69 months ago (permalink)

view photostream

Wil C. Fry says:

Cool.
69 months ago (permalink)

view photostream

bitrot says:

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
Originally posted 67 months ago. (permalink)
bitrot edited this topic 67 months ago.

view photostream

S.D. says:



67 months ago (permalink)

view photostream

bitrot says:

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
66 months ago (permalink)

view photostream

S.D. says:

I've updated the script to work with old and new photo page.
57 months ago (permalink)

Would you like to comment?

Sign up for a free account, or sign in (if you're already a member).