Dashboard

Feb 03 19:20 | @jjmorganstern It's a slippery slope that vinyl. I should know; bought one record, house is now full of vinyl and 3 record players. ;-)
Feb 02 19:06 | Every time someone attempts to explain a joke to me for now on, I will throw water in your face. It'll be funnier than your explanation.
Feb 02 17:43 | Lot's of little interesting tests and tools coming out today. How much CSS3 does our browser support? http://t.co/Kq0mM9Hd

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.