Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Call the bit.ly URL shortener for the current site Web Browsers
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.
    •    
  • Currently 1.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[10,825 views]  

Call the bit.ly URL shortener for the current site | 4 comments | Create New Account
Click here to return to the 'Call the bit.ly URL shortener for the current site' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Call the bit.ly URL shortener for the current site
Authored by: pgib on Nov 18, '08 08:51:57AM

bit.ly has a much nicer bookmarklet you can add:

javascript:var%20e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','http://bit.ly/bookmarklet/load.php');document.body.appendChild(e);void(0);

It loads over the current page as a semi-transparent strip with a simple "Copy" link that copies the shortened URL for the current page to your clipboard.



[ Reply to This | # ]
Call the bit.ly URL shortener for the current site
Authored by: kiltbear on Nov 18, '08 10:08:06AM

thank you thank you for posting this... bit.ly had replaced their bookmarklet on their site with one that pops open a new window. I had clobbered the bookmarklet you posted with their new one. I really prefer the grey overlay, as it works nicer when I'm in MobileSafari.

So, you might also want to check out their new bookmarklet, it has other/different nice features to it.



[ Reply to This | # ]
Call the bit.ly URL shortener for the current site
Authored by: nathanfolkman on Nov 18, '08 10:40:20AM
There are currently two bit.ly bookmarklets we provide.

The "bit.ly" bookmarklet is available from the "Tools" section on the right, and will bring the user to the bit.ly application.

There is also the more feature rich "bit.info" bookmarklet which overlays on top of the current page you are viewing, and includes traffic, conversations, and metadata about the current URL.

You can grab both bookmarklets from: http://bit.ly/app/tools.

[ Reply to This | # ]
Call the bit.ly URL shortener for the current site
Authored by: mountainbiker on Nov 19, '08 12:12:06PM
Another variation of the bookmarklet...

javascript:void(w=window.open('http://bit.ly/?url='+location.href,%20'bit.ly',%20'width=600,height=300,dependent=yes,modal=yes,resizable=yes,scrollbars=yes,menubar=no,status=no'))

It pops open a new window. Adjust the window opinions as you like, e.g., height and width.

[ Reply to This | # ]