Call the bit.ly URL shortener for the current site

Nov 18, '08 07:30:00AM

Contributed by: tangential

I use bit.ly as my URL shortening service, mainly because I like the way that it links to Twitter and tracks statistics on shortened URLs that I send folks. I am, however, lazy and I don't like to do any more clicking, copying, or pasting than I have to.

So I created a bookmark on my bookmarks bar in Safari which opens bit.ly in a new window and passes the current page I am on as a parameter. The net effect is that most of the work is done for me when the window opens. The JavaScript bookmark is:

javascript:window.open('http://bit.ly/?url='+location.href);
This approach will probably work with other shorteners as well, and the above shortcut should work in any browser.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20081113060903860