jump to navigation

Basic Mozilla Ubiquity Commands September 5, 2008

Posted by B.J. Schone in eLearning.
Tags: , , , , , , , , , ,
trackback

Last week I discussed Mozilla’s new project, Ubiquity. Ubiquity is an add-on for Firefox that allows you to quickly perform tasks that would normally take several extra steps (and involve you having to access other web sites). It’s a great little tool that makes power-users giddy with excitement. Ok, maybe just me…🙂

I’ve been experimenting with the commands in Ubiquity, and I managed to create a few that will be pretty helpful at work. The three commands I’m sharing are:

  • lms
    Type in lms topic – and Ubiquity will take you to your LMS search results page for that topic.
  • cd
    Type in cd name to search for somebody in your company’s directory with that name.
  • q
    type in q searchTerm to search for information in your company’s intranet site.

(All three of these commands assume you can access these systems via the query string. If nothing else, the commands will help you understand how Ubiquity works, which may help you build your own custom commands.)

To get started, make sure you have installed Ubiquity in Firefox.

Next, go to this URL: chrome://ubiquity/content/editor.html (sorry, I couldn’t make this a link – WordPress wouldn’t let me).

Paste these code snippets into the editor:

CmdUtils.CreateCommand({
  name: "lms",
  takes: {"your search string": noun_arb_text},
  preview: "Search the LMS for courses.",
  execute: function(searchString) {
    Application.activeWindow.open(Utils.url("http://
www.INSERT_YOUR_LMS_URL_HERE.com?courseName=
"+searchString.text));
  }
})

CmdUtils.CreateCommand({
  name: "cd",
  takes: {"your search string": noun_arb_text},
  preview: "Search our company directory.",
  execute: function(searchString) {
    Application.activeWindow.open(Utils.url("http://
www.INSERT_YOUR_COMPANY_INTERNAL_DIRECTORY_
URL_HERE.com?query="+searchString.text));
  }
})

CmdUtils.CreateCommand({
  name: "q",
  takes: {"your search string": noun_arb_text},
  preview: "Search our company intranet.",
  execute: function(searchString) {
    Application.activeWindow.open(Utils.url("http://
www.INSERT_YOUR_COMPANY_INTRANET_URL_
HERE.com?query="+searchString.text));
  }
})

(Note that you’ll probably have to fix the line wrapping for the Application.activeWindow.open line of each command before they’ll work in Ubiquity.)

Finally, insert in your custom URLs in the 3 places where it says “http://www.INSERT_…”

Now you’ll be able to press Ctrl+Space to open Ubiquity, and then you can use the lms, cd, and q commands.

I used the Ubiquity Author Tutorial site to create these commands. I recommend that you start there if you’re interested in creating your own commands. Plus, it shows you how to package and share the commands with the rest of the world (or just your organization).

Happy command-writing!

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: