Mozilla Ubiquity

Mozilla announced a new labs project, Ubiquity, last week. It's intended to be a keyboard driven interface to advanced functionality in the web browser, similar to Gnome Do, which I've been using a lot recently, and the Mac application Quicksilver.

I decided to have a quick play by re-implementing part of my Use the new microformats API in your Firefox 3.0 Extensions tip as a Ubiquity command. Following the tutorial I was able to directly transplant the code, replacing only content.document with CmdUtils.getDocumentInsecure():

  name: "grab-hcard",
  homepage: "",
  author: { name: "Rob Crowther", email: ""},
  license: "MPL",

  execute: function() {
    var uFcount = Microformats.count('hCard', CmdUtils.getDocumentInsecure(), {recurseExternalFrames: true});
    if (uFcount > 0) {
        var uFlist = Microformats.get('hCard', CmdUtils.getDocumentInsecure(), {recurseExternalFrames: true});
    } else {
        displayMessage('None found');

Download grab-hcard.js Note: This command does not work in the current version of Ubiquity, a 'is not a function' error, not worked out what the problem is yet.