Dashboard

Mar 09 00:53 | Tired doesn't seem the right word at the moment. Time to grab a couple hours.
Mar 08 21:41 | 5 reasons why your company should be distributed: http://bit.ly/bxoJag Big fan of the concept (I've worked remote for 6 years)
Mar 05 16:21 | Sometimes things are out of your control, no matter how much you think or try otherwise.

Bit.ly sidebar bookmarklet into Ubiquity command

December 29th 2009

If there is one thing that annoys me, it’s very long links. But what annoys me even more is having to open up a URL shorter service to generate said short link. Bookmarklets, small pieces of javascript in bookmark form, work very well…but I don’t run the bookmark tool bar or want another button to deal with. Instead, I’d much prefer to use Ubiquity, a command interface for Firefox.

It just so happens you can turn any bookmarklet into an Ubiquity command in just three lines of code. There is a very clear tutorial on the subject (complete with video walkthrough).

I decided that I wanted to run the bit.ly sidebar bookmarklet, which will not only shorten the link for the current page you’re viewing, but also give the the stats on said link (traffic, conversations, and history). I added a short description and the icon to my version of the command (which makes it a couple lines longer), but it works a treat! Below you’ll find the command to install (you’ll need Ubiquity installed first).

Bit.ly sidebar slideout Ubiquity command

The source code is below:

?View Code JAVASCRIPT
1
2
3
4
5
6
7
8
9
CmdUtils.makeBookmarkletCommand({
name: "bit.ly sidebar slideout",
icon: "http://bit.ly/static/images/favicon.png",
description: "Conversion of bit.ly sidebar bookmarklet; slides out to shorten your long link, then shows Traffic, Conversations, and History.",
homepage: "http://justinribeiro.com/projects/ubiquity/bitly-sidebar-slideout.html",
author: {name: "Justin Ribeiro", email: "justin@justinribeiro.com"},
license: "GPL",
url: "javascript:var%20e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','http://bit.ly/bookmarklet/load.js');document.body.appendChild(e);void(0);"
});

Simple, quick, effective. Just how I like it!

Note, if you’ve got the Mozilla General Utility Commands installed, you can use the “create bookmarklet” command that is available to convert any bookmarklet(s) you already have into a Ubiquity command. So even if you don’t want to muck around with three lines of code, you can still use the power of Ubiquity.

Reader Responses

Skip to Response Form

Comment on this Entry

About This Entry

You are reading "Bit.ly sidebar bookmarklet into Ubiquity command", and entry posted on 29 December, 2009 and filed under script, ubiquity.

0 responses to this entry. 0 blog reactions. Add your response or trackback from your own site.