Copy Short URL Add-on
Update: The add-on is now on AMO! Check it out! Also, feedback is greatly appreciated!
This week during the Mozilla Summit in Whistler, British Columbia, there was a “Rocket Your Firefox” Jetpack contest: The idea, make a new add-on using the Jetpack SDK, submit it, win a prize.
So I went ahead and made a jetpack called “Copy Short URL” and it does what it sounds like:
On any webpage, you get a new item in the right click menu called “copy short URL”. When you click it, the add-on looks for a canonical short URL exposed in the page header. Currently, a number of major websites expose their own short URLs for any entry on their webpages, among these: youtube (“youtu.be/…”), flickr (“flic.kr/…”), Arstechnica, Techcrunch, and many more.
If, however, the site does not name its own short URL, the add-on automatically falls back to making a short URL using tinyurl.com.
Either way, after a fraction of a second, you end up with a short URL in your clipboard, ready to be used in forum posts, tweets, or wherever else you please.
My add-on won the contest in the “most useful” category. The prize was an awesome jetpack sweatshirt:


If you want to check out the add-on, it is currently available (open source, of course) on the add-ons builder website. I also uploaded the add-on to AMO.
Hope you find it useful!

I can’t wait until Fx 4 is released, so that I can use these add-ons.
Nice sweatshirt.
Nice Jetpack Frédéric!
Thanks, guys!
Erik: Thanks also for making the clipboard library that I was able to use in my jetpack!
ah it was nothing, it’s straight from the prototype =]
Nice. Another thing that was in the prototype that isn’t in the SDK anymore is Growl notifications. I wonder if those can be ported similarly.
Thanks for making the clipboard library that i use in my work
Very useful and congrats on winning!
Dude, this is awesome! Any updates on submitting this to AMO? Installing it from the add-ons builder website doesn’t seem to work.
Ehsan: Done! You should be able to install it off AMO now!
I also have a question: Do you guys think the fallback functionality (to tinyURL, currently, because unlike bitly and others, it does not require an API key) is a good thing, or would the add-on be more useful if it only added a right-click menu when there’s a short URL exposed, and leave the user alone if not?
Thanks for uploading the add-on to AMO!
I think having a tinyurl fallback is really helpful, so I would say you don’t need to change that. However, I think it would be useful if you add the context menu item to links and images as well, so that you can get the short URL for those items without having to open them in their own tabs.
Thanks!
“Another thing that was in the prototype that isn’t in the SDK anymore is Growl notifications. I wonder if those can be ported similarly.”
I haven’t looked yet, although I’ve been meaning to, but I think someone on the Jetpack team is going to be working on this (if they’re not already).
Oh yea, Growl notifications would be terrific for this add-on.