I have a project that deals with JavaScript commands that anyone can author, so I decided it would be smart to take more time looking and integrating with Ubiquity which recently got another beautiful upgrade.
Ubiquity really is the “other” command line of the Web (the URL bar being the first one). It gives me Quicksilver like access, but also has huge improvements: Writing plugins is simple JavaScript, and you can subscribe to commands from other people. This is huge. A social command-line!
There is a built in tinyurl command, but I use tr.im one these days, so I quickly wrote one:
CmdUtils.CreateCommand({ name: "trimurl", homepage: "http://almaer.com/firefox/commands/", author: { name: "Dion Almaer", email: "dion@almaer.com"}, license: "ASL", description: "Sends your URL to tr.im instead of tiny url", help: "Just type in the URL!", takes: {"url to shorten": noun_arb_text}, modifiers: {"as": noun_arb_text}, preview: "Replaces the inputted URL with a Tr.im URL.", execute: function(urlToShorten, mods) { var baseUrl = "http://tr.im/api/trim_url.json"; var params = "?url=" + urlToShorten.text; var custom = mods["as"].text; if (custom) { params += "&custom=" + custom; } jQuery.getJSON(baseUrl + params, function(data) { CmdUtils.copyToClipboard(data.url); }) } });
This chap uses modifiers to allow me to pass in a custom url.
The following said that there will be a url following, and you can optionally say “as customname”:
takes: {"url to shorten": noun_arb_text}, modifiers: {"as": noun_arb_text},
I couldn’t find a way to just add to the takes hash, as it would be nice to say:
takes: {"url to shorten": noun_arb_text, custom: noun_optional_text },
After using Ubiquity for some time now, I am really impressed with how the team is accelerating, and I see this as a great way to extend the Web, and Firefox in 2009.
I find myself in a funny place with the key combos for bringing up Ubiquity and Quicksilver in my mind. I am using Quicksilver less and less (e.g. won’t use it to search the Web or do anything with email) and Ubiquity more and more. As the Open Web takes over the desktop (another prediction;) then Ubiquity will gain usage for me.
Atul has released a preview of Ubiquity 0.2 which has a new architecture and a new Locked-Down Feed Plugin (LDFP).


Valleywag writes about how she “married down”.


