Along with upgrading all my extensions to work in Firefox 3 I also added a new feature to the TinyUrl creator extension: Link Preview.
Now the extension will find all links which have a tinyurl.com address and add a tooltip to tell you what the actual URL is. Simply hover your mouse over the link for a moment and the tooltip will appear with the full URL. Here’s an example:
I can’t actually take full credit for this idea, last month my friend Stephanie Trimble suggested it over twitter. Thanks Stephanie for the idea!
I also plan to add support for other URL shrinking services in this feature. Please post a comment here with your favorite URL shrinking service so I can be sure to add it to the list.
You can install the extension from this page: http://mozmonkey.com
As always, I really appreciate the support of my users. Thanks.
Hi Jeremy. I’m on the bit.ly team. Of course I’d love to see support for bit.ly in your next rev. If there’s anything you need, let us know. @bitly
J-dogg,
I’m curious how you did this. Does TinyURL have a real API, or are you scraping the preview page, or doing just a header request? I’d like to get something similar on our forums, as TinyURL and its ilk are so often used to dupe user into going to phishing sites.
Yes, TinyUrl has a really simple API which returns the short URL. As an example, load this url into your browser:
http://tinyurl.com/api-create.php?url=http://mozmonkey.com
Here’s my code that does the URL conversion for all the services the extension supports:
http://bit.ly/1WMrE4
The code you’re looking for is in the “tinyurl : {” section.
Hey Tim,
I just realized that I didn’t completely understand your question.
I use the API to get the short URL, but unfortunately TinyUrl doesn’t have an API to preview it. Even so, I don’t need to do any screen scraping to get it. I setup a simple HTTP request to load the URL and tell it to not follow redirects. Then when it returns I can see where it was going to redirect to.
So in this code:
http://bit.ly/1WMrE4
The “expand : function(url, callback){” function does the work. This is Firefox specific code, but an engineer might be able to get something out of it.
Useful stuff, Jeremy, thanks!
[…] to your browser, or install the TinyURL Creator FireFox Extention at http://tinyurl.com/633vxr. The latest version includes “link preview” which displays the full original link in the HTML Anchor text title or alt attribute, giving the […]
Hi Jeremy,
The TinyURL creator does not seem to be compatible with the latest FireFox 3.5.2 version. Any thoughts?
I’m looking forward to Copy Plain Text becoming compatible with Firefox 3.5+
Thanks for the previous use of your creations.
TinyURL creator 2.0.2 stopped working, but TinyURL Creator 1.0.5 won’t install under Seamonkey 2.11. Can this please be addressed? I would appreciate it. Thanks.