<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Satyr</id>
	<title>MozillaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Satyr"/>
	<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/Special:Contributions/Satyr"/>
	<updated>2026-11-20T20:16:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Skins_In_The_Wild&amp;diff=251658</id>
		<title>Labs/Ubiquity/Skins In The Wild</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Skins_In_The_Wild&amp;diff=251658"/>
		<updated>2010-09-08T08:04:47Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* 0.5.5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A simple list of installable Ubiquity skins.&lt;br /&gt;
==0.5.5==&lt;br /&gt;
* [http://gist.github.com/228271 eLasty] by satyr ([http://farm5.static.flickr.com/4103/4969908525_749d4185d3_b.jpg screenshot])&lt;br /&gt;
** optimized for 1280x800 screen + &amp;lt;code&amp;gt;extensions.ubiquity.openAt&amp;lt;/code&amp;gt;=0,0&lt;br /&gt;
* [http://gist.github.com/67270 SimpliPuity] by powchin&lt;br /&gt;
&lt;br /&gt;
==0.5==&lt;br /&gt;
* [http://gist.github.com/80593 elasty] by satyr ([http://img.f.hatena.ne.jp/images/fotolife/m/murky-satyr/20090319/20090319091335_original.png shot1] [http://img.f.hatena.ne.jp/images/fotolife/m/murky-satyr/20090319/20090319091336_original.png shot2])&lt;br /&gt;
** optimized for content size of about 960x720&lt;br /&gt;
&lt;br /&gt;
==0.1==&lt;br /&gt;
* [http://www.yatriksolanki.com/?p=24 Enso-like Skin by Yatrik Solanki]&lt;br /&gt;
* [http://www.yatriksolanki.com/?page_id=10 Simpliquity by Yatrik Solanki]&lt;br /&gt;
* [http://www.greenhousecreations.com/josh/ubiquity/ Kiwi by Joshua R. Johnson]&lt;br /&gt;
* [http://gist.github.com/43589 Enso 2.0 by Harry Wincup]&lt;br /&gt;
* [http://gist.github.com/110509 über by indie] [http://www.zentu.net/snaps/uberskin.png screenshot]&lt;br /&gt;
* [http://gist.github.com/113229 botslife by indie] [http://zentu.net/snaps/botlife.png screenshot] with [http://blog.cocoia.com/2009/ubiquibot-goodie/ ubiquibot graphic by cocoia]&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=241902</id>
		<title>Labs/Ubiquity/Ubiquity 0.5 Author Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=241902"/>
		<updated>2010-07-29T02:38:39Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* TinyURL: Network Calls and jQuery (and the URL noun type) */ arguments -&amp;gt; args&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]].&lt;br /&gt;
&lt;br /&gt;
Author: Aza Raskin, Blair McBride, Abimanyu Raja, Jono DiCarlo, Atul Varma&lt;br /&gt;
&lt;br /&gt;
= The Ubiquity version 0.5 Command Tutorial =&lt;br /&gt;
&lt;br /&gt;
The great power of Ubiquity&amp;amp;mdash;from a developer standpoint&amp;amp;mdash;is how easy it is to create commands. With only a couple of lines of Javascript, Ubiquity enables even casual web developers to drastically enhance the features of the browser. From an 8-line command to insert a contact&#039;s email address in any text field, to a 50-line Twitter integration, this tutorial walks you through the process of being generative with Ubiquity.&lt;br /&gt;
&lt;br /&gt;
The rest of this page documents the command developer API as it stands frozen in version 0.5.&lt;br /&gt;
&lt;br /&gt;
If you want the bleeding-edge command developer API (which includes any new features that may have been added to the Ubiquity source code in HG but not yet included in a release), then that&#039;s [[Labs/Ubiquity/Ubiquity_Source_Tip_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
If you want the old command developer API, as it stood in Ubiquity 0.1 (not recommended), that&#039;s [[Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
== Real Time Development ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity doesn&#039;t require you to restart Firefox as you develop. Restarting is a drastic measure, and we want none of it. Instead, Ubiquity reloads the commands every time it is summoned. When you are using the built-in editor then you don&#039;t even need to save!&lt;br /&gt;
&lt;br /&gt;
To open the Ubiquity command editor, summon Ubiquity (control/alt + space) and use the &amp;quot;open command editor&amp;quot; command. Throughout this tutorial, when we want you to run a command in Ubiquity, we&#039;ll say &#039;&#039;&#039;Ubiq&#039;&#039;&#039; it. For instance, to open the editor, just Ubiq &amp;quot;open command editor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the following examples, just type in this editor. Updates happen the next time you summon Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Choices, Choices... ==&lt;br /&gt;
&lt;br /&gt;
You may notice a drop-down menu mentioning something about a &amp;quot;feed type&amp;quot; just above the editing field in the command editor:&lt;br /&gt;
&lt;br /&gt;
http://www.toolness.com/images/20090318121423.jpg&lt;br /&gt;
&lt;br /&gt;
For now, just make sure this drop-down is set to &amp;quot;Regular&amp;quot;.  We&#039;ll tell you more about what this means later.&lt;br /&gt;
&lt;br /&gt;
== Hello World: The First Command ==&lt;br /&gt;
&lt;br /&gt;
=== Just a Message: As Simple as it Gets ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start with the standard programing trope: printing &amp;quot;Hello, World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the command editor type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try Ubiq-ing &amp;quot;say hello&amp;quot;. You&#039;ll see that &amp;quot;Hello, World!&amp;quot; is immediately displayed on the screen. If you are on Mac OSX with [http://en.wikipedia.org/wiki/Growl_(software) Growl] installed the message will appear as a Growl notification. If you are on Windows, then it will appears as a standard &amp;quot;toaster&amp;quot; notification in the bottom right-hand corner of the screen.&lt;br /&gt;
&lt;br /&gt;
http://farm3.static.flickr.com/2479/3651542339_022e4aa4c4.jpg&lt;br /&gt;
&lt;br /&gt;
http://img517.imageshack.us/img517/7726/picture2vx2.png&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 8.04 (Hardy Heron) this appears thus:&lt;br /&gt;
&lt;br /&gt;
http://img293.imageshack.us/img293/7746/ubiqubuntuhelloworldeq9.png&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have Growl installed on OSX, or aren&#039;t on a Windows XP/Vista or Ubuntu Hardy, then you won&#039;t get any sort of notification. That&#039;s something to be [http://labs.toolness.com/trac/ticket/19 worked on] in future releases of Ubiquity.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils.CreateCommand ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; is a namespace which contains all the functions you need to create commands.  Commands are created by making an object and passing it to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.  In Javascript, inline curly braces mean &amp;quot;new object&amp;quot;, so this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function () { //etc }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
means &amp;quot;Make an object with two attributes, &#039;names&#039; and &#039;execute&#039;.&amp;quot;  This object is then passed as the argument to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== names ===&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; and &#039;execute&#039; are the only two mandatory attributes for your command object.  &#039;names&#039; specifies what the command is called, and &#039;execute&#039; specifies what it does.  There are plenty of other attributes that you can specify, but they are all optional.&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; is always an array (thus the square brackets).  In the case of this command we provided only one name, &amp;quot;hello world&amp;quot;.  But we could have provided as many names as we wanted.  For instance, if we had said:&lt;br /&gt;
&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
then &amp;quot;say hello&amp;quot; would be the normal name of the command, but Ubiquity would also recognize &amp;quot;greet&amp;quot; as a synonym or alias for the command.&lt;br /&gt;
&lt;br /&gt;
=== execute ===&lt;br /&gt;
&lt;br /&gt;
&#039;execute&#039; is always a function.  When the user executes your command, this is the function that will be run.  It can do pretty much anything you want -- or at least, anything you know how to write in JavaScript.&lt;br /&gt;
&lt;br /&gt;
In the example above, we simply call &amp;lt;code&amp;gt;displayMessage()&amp;lt;/code&amp;gt;, which displays the given message in whichever way the operating system can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a number of other useful functions in the &amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; namespace. We don&#039;t yet have full documentation for these commands, but you&#039;ll get a sense of the useful ones in this tutorial. For more detailed information, take a look at [http://hg.toolness.com/ubiquity-firefox/file/9a6c9935da9f/ubiquity/chrome/content/cmdutils.js cmdutils.js].&lt;br /&gt;
&lt;br /&gt;
=== Making sure your command is localizable ===&lt;br /&gt;
&lt;br /&gt;
Ubiquity now supports multiple languages.  That means that hopefully someday someone will be translating your commands to the other languages that Ubiquity supports.  Making your command localizable is easy, and a good habit to get into!  You just have to locate all strings that appear in your &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; methods, that are intended for display to humans, and wrap them with:&lt;br /&gt;
&lt;br /&gt;
 _()&lt;br /&gt;
&lt;br /&gt;
This may look odd, but what it does is quite important: it makes your strings appear in the template files that localizers will be using.  So let&#039;s make our &amp;quot;Hello world!&amp;quot; command localizable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes it so that when a localization template is generated from your command feed, &amp;quot;Hello, World!&amp;quot; will be listed among the strings to be translated.&lt;br /&gt;
&lt;br /&gt;
Note that we don&#039;t need to wrap the names, or other strings that appear in the command metadata -- these are automatically wrapped for us.  We only need to wrap strings that appear inside the functions.&lt;br /&gt;
&lt;br /&gt;
=== Adding a Preview ===&lt;br /&gt;
&lt;br /&gt;
http://img352.imageshack.us/img352/1002/picture3ex0.png&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a preview to our new command. Previews give the user feedback about what a command does before it&#039;s executed. Previews are great for providing rich visual feedback like displaying a graphical representation of atmospheric conditions when using the weather command as shown above. Previews have the full expressive power of HTML, including animations, so there&#039;s a lot you can do with them.&lt;br /&gt;
&lt;br /&gt;
One point of design: Preview code should never have side-effects. That is, a preview should never (without user interaction) change the state of the system.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;say hello&amp;quot; command, we don&#039;t need anything fancy: just some help text that is more descriptive than the default &amp;quot;Executes the say hello command.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  preview: &amp;quot;Displays a &amp;lt;i&amp;gt;salutary&amp;lt;/i&amp;gt; greeting to the planet.&amp;quot;,&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the preview is an HTML-formatted string. The preview can also be a function. We&#039;ll get to that in the next section.&lt;br /&gt;
&lt;br /&gt;
== The Date Command: The Second Command ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the Selection ===&lt;br /&gt;
&lt;br /&gt;
I often forget what day it is. That may be because I need to go outside more often, but, like any programmer, I generally solve my problem&#039;s symptoms with technology rather then addressing the root cause. My solution is to create a command that inserts the date at the location of the cursor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(new Date().toLocaleDateString());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new function here is &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt;. This inserts the passed-in text onto the page at the location of the cursor. If the cursor is in an editable text or rich-text fields, the text gets dumped there. If the cursor isn&#039;t in an editable area, &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt; will still be able to insert the date. (Even when it isn&#039;t displayed, Firefox always keeps track of a cursor position. To see it, type F7.) Try going to a page, selecting some non-mutable text, and using the command. See, it works! This is particularly useful for commands like &amp;quot;translate&amp;quot;, where you want to replace non-editable text with its translation.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;toLocaleDateString()&amp;lt;/code&amp;gt; function is native to Javascript, so if you&#039;re not familiar with it check out the documentation for the Javascript [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date Date object].&lt;br /&gt;
&lt;br /&gt;
=== A Better Preview ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s time to add a better preview to the date command. Let&#039;s have the preview show the date, so that the user will know what to expect when they execute the command. (As a side benefit the user doesn&#039;t even need to execute the command to do a quick check of the day.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _date: function date__date() {&lt;br /&gt;
    return new Date().toLocaleDateString();&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = _(&#039;Inserts today\&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;);&lt;br /&gt;
    pblock.innerHTML = CmdUtils.renderTemplate(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(this._date());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve done three things here. The first was to factor out the code for getting the date into the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt; function. This way we don&#039;t break [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY] by repeating code across the preview and execute functions. Notice that to access the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt;, we use the &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
The second thing we&#039;ve done is to add a preview function. The first argument is the DOM element that gets displayed as the preview for your command. Modify &amp;lt;code&amp;gt;pblock&amp;lt;/code&amp;gt; and you modify the preview. In this case, we set the &amp;lt;code&amp;gt;innerHTML&amp;lt;/code&amp;gt; of the preview block to be the message we want.&lt;br /&gt;
&lt;br /&gt;
The third thing we&#039;ve done is to do some string formatting using the &amp;lt;code&amp;gt;renderTemplate()&amp;lt;/code&amp;gt; function. This takes a template string and performs the appropriate substitution given the passed-in JSON object. Templates can handle a wide range of functionality, as we are currently using TrimPath&#039;s [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavascriptTemplates]. You should read their site for more documentation. Although JavascriptTemplates has some nice properties, we are contemplating moving to [http://mjtemplate.org/ MJT] sometime soon.&lt;br /&gt;
&lt;br /&gt;
=== A shortcut for localization and rendering templates ===&lt;br /&gt;
&lt;br /&gt;
Note how in the code above, we used the localization wrapper &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; before passing the string to renderTemplate.  Because this is such a very common combination when displaying strings, we have a shortcut for it.  Calling _() with a JSON object as the second argument will automatically trigger &amp;lt;code&amp;gt;CmdUtils.renderTemplate()&amp;lt;/code&amp;gt; on the post-localization string.  So the above preview method could be rewritten more simply as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = &#039;Inserts today&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Networking calls and placeholder previews ===&lt;br /&gt;
&lt;br /&gt;
Previews display something meaningful to the user immediately. If you have a preview that requires an AJAX request&amp;amp;mdash;say, to fetch some search results&amp;amp;mdash;that call might take a while to return. In the meantime, your command should display a placeholder preview giving the user feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function(pblock) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;This will show until the AJAX request returns&amp;quot;);&lt;br /&gt;
    CmdUtils.previewGet(pblock, &amp;quot;http://example.com&amp;quot;, function (htm) {&lt;br /&gt;
      pblock.innerHTML = htm;&lt;br /&gt;
    });&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documentation and Metadata ==&lt;br /&gt;
&lt;br /&gt;
Before you share your command with the world, you should consider adding some attributions to the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you should &amp;lt;em&amp;gt;definitely&amp;lt;/em&amp;gt; add some documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Inserts today&#039;s date.&amp;quot;,&lt;br /&gt;
  help: &amp;quot;If you&#039;re in an editable text area, inserts today&#039;s date, formatted for the current locale.&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.description&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.help&amp;lt;/code&amp;gt; attributes are both automatically displayed alongside your command&#039;s name on the command-list page.  (The user can get to this page at any time by issuing the &amp;quot;list ubiquity commands&amp;quot; command.)  HTML tags can be used in both of these strings.&lt;br /&gt;
&lt;br /&gt;
Description is a one-line summary of what the command does, while Help is a longer description that can include examples, caveats, and so on. If your command is simple enough that all you have to say about it fits in one line, it&#039;s OK to use a description alone and leave out the help.&lt;br /&gt;
&lt;br /&gt;
== Sharing it with the World ==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve got our awesome new &amp;quot;date&amp;quot; command, let&#039;s share it with the world. All you have to do is put the javascript file on the web somewhere, and make an html page linking to it with &amp;quot;link rel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;&amp;lt;link rel=&amp;quot;commands&amp;quot; href=&amp;quot;http://path-to-js&amp;quot; name=&amp;quot;Title Goes Here&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anyone with Ubiquity who visits will get a message offering them the choice of subscribing to your command.&lt;br /&gt;
&lt;br /&gt;
[[Image:Subscribe.png]]&lt;br /&gt;
&lt;br /&gt;
If the user chooses to subscribe to a Regular command feed from an untrusted source, they will get a security warning message before they can install the command.  Because Regular Ubiquity command feeds can execute arbitrary javascript with chrome privileges, subscribing to a command from a website means allowing that site full access to do whatever it wants to your browser.  We want to make sure people understand the dangers before subscribing to commands, so we made the warning page pretty scary.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Feed Types ===&lt;br /&gt;
&lt;br /&gt;
Recall that back near the beginning of the tutorial, you set the &amp;quot;feed type&amp;quot; to &amp;quot;Regular&amp;quot;.  As you may have guessed, there&#039;s actually more than one way to write a command feed.  The advantage of Regular feeds is that they let you do whatever you want, so it&#039;s really easy to innovate, but the disadvantages lie in subscribing to misbehaving or malicious code.  You can alternatively write what&#039;s called a &#039;&#039;Locked-Down Feed&#039;&#039;, which is much safer and doesn&#039;t raise a warning page when a user subscribes to it&amp;amp;mdash;but the consequences are that you have less freedom of implementation as a command author.  If you&#039;re interested in learning more about Locked-Down Feeds, check out the [[Labs/Ubiquity/Locked-Down_Feed_Tutorial|Locked-Down Feed Tutorial]].&lt;br /&gt;
&lt;br /&gt;
=== Trust Networks ===&lt;br /&gt;
&lt;br /&gt;
In the future, we&#039;re going to have something set up that we call a &amp;quot;[[Labs/Ubiquity/TrustNetwork|trust network]]&amp;quot;.  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you&#039;ll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they&#039;ll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.&lt;br /&gt;
&lt;br /&gt;
By the way, the reason we call it &amp;quot;subscribing&amp;quot; to a command, rather than &amp;quot;installing&amp;quot; a command, is that if the javascript file changes -- if the site owner adds new commands, removes old commands, or updates existing commands -- all users subscribed to that URL will automatically get the updates.  This will be very convenient for both users and developers, but it will also introduce another type of security risk: just because you decided a command was safe at one point in time doesn&#039;t mean that the command will always remain safe.  For this reason, we&#039;ll need to make sure that the trust network keeps track of when commands have been modified, and notifies users of changes that may make a command unsafe.&lt;br /&gt;
&lt;br /&gt;
== Map Me! Location, Snapshots, and Inserting HTML ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;map&amp;quot; command that comes with Ubiquity is fairly powerful. It&#039;s also fairly complicated&amp;amp;mdash;well, comparatively. It&#039;s still only a couple hundred lines of code. The command, though, can get even more useful. Imagine being able to select some houses on Craigslist, or a list of restaurant names, and Ubiq &amp;quot;map these&amp;quot; to get just the map you want. The concept of &amp;quot;these&amp;quot; puts the power of mashups into the users hands. But I digress. Let&#039;s make a simple command that inserts a map of your current location.&lt;br /&gt;
&lt;br /&gt;
In this command, we use the Google [http://code.google.com/apis/maps/documentation/staticmaps/ static map API] and the Ubiquity function &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; to insert a map of your current location. Ubiquity currently uses the [http://www.maxmind.com/app/api MaxMind] API for trying to guess your location from your IP. That will probably change in the future.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll call this command &amp;lt;code&amp;gt;&amp;quot;map me&amp;quot;&amp;lt;/code&amp;gt; so that it won&#039;t be confused with the standard &amp;lt;code&amp;gt;&amp;quot;map&amp;quot;&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;map me&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _getMapUrl: function() {&lt;br /&gt;
    var loc = CmdUtils.getGeoLocation();&lt;br /&gt;
    var mapUrl = &amp;quot;http://maps.google.com/staticmap?&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var params = {&lt;br /&gt;
      center: loc.lat + &amp;quot;,&amp;quot; + loc.long,&lt;br /&gt;
      size: &amp;quot;500x400&amp;quot;,&lt;br /&gt;
      zoom: 14,&lt;br /&gt;
      key: &amp;quot;ABQIAAAAGZ11mh1LzgQ8-8LRW3wEShQeSuJunOpTb3RsLsk00-MAdzxmXhQoiCd940lo0KlfQM5PeNYEPLW-3w&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    return mapUrl + jQuery.param( params );&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function( pblock ) {&lt;br /&gt;
    var msg = &amp;quot;Inserts a map of your current location: &amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
              &amp;quot;&amp;lt;img src=&#039;${url}&#039;/&amp;gt;&amp;quot;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {url: this._getMapUrl()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function( ) {&lt;br /&gt;
    CmdUtils.getImageSnapshot( this._getMapUrl(), function(imgData) {&lt;br /&gt;
      CmdUtils.setSelection( &amp;quot;&amp;lt;img src=&#039;&amp;quot; + imgData +&amp;quot;&#039;/&amp;gt;&amp;quot;);&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three new things here: &amp;lt;code&amp;gt;CmdUtils.setSelection&amp;lt;/code&amp;gt; to set HTML (yep, it can do that); the use of &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt;; and using &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt; to capture the bits for the image.&lt;br /&gt;
&lt;br /&gt;
I find getting the location&amp;amp;mdash;as imprecise as IP-based location can be&amp;amp;mdash;useful for doing sensible defaults for location-based commands, like Yelp. &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; returns an object which has the following properties: city, state, country, lat, and long.&lt;br /&gt;
&lt;br /&gt;
Why do we need to use &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt;? Because the Google Maps API requires a key that is tied to a particular URL. If we naively inject the image tag into a random web page, the image won&#039;t load because the key doesn&#039;t match that random web page&#039;s URL. Thus, we use the &amp;lt;code&amp;gt;snapshotImage()&amp;lt;/code&amp;gt; function to convert the image into a [http://en.wikipedia.org/wiki/Data:_URI_scheme data url].&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a &amp;lt;code&amp;gt;CmdUtils.snapshotWindow&amp;lt;/code&amp;gt; function, which allows you to get the image data for any tab/window. The function takes a window as the first paramater, and a callback for the second.&lt;br /&gt;
&lt;br /&gt;
= Commands with Arguments =&lt;br /&gt;
&lt;br /&gt;
== Echo ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ll be working towards making some fun and useful commands&amp;amp;mdash;commands that let you control the seething tendrils of the internet with your little pinky. But, let&#039;s start by making a simple command to echo back whatever you type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;echo&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;your shout&amp;quot;}],&lt;br /&gt;
  preview: function previewEcho(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Will echo: &amp;quot;) + args.object.text;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function executeEcho(args) {&lt;br /&gt;
    var msg = args.object.text + &amp;quot;... &amp;quot; + args.object.text + &amp;quot;......&amp;quot;;&lt;br /&gt;
    displayMessage(msg);&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says that the command &amp;quot;echo&amp;quot; takes one argument which is arbitrary text. Whatever text the user enters will get wrapped in an input object and passed into both the preview and execute function.&lt;br /&gt;
&lt;br /&gt;
Try it!  Ubiq &amp;quot;echo hellooooo&amp;quot; and watch what happens.&lt;br /&gt;
&lt;br /&gt;
Ubiquity takes care of parsing the user&#039;s input, so you don&#039;t need to worry about handling prounoun substitution or any of the other natural-language-like features of the Ubiquity parser. Try selecting some text on a page, and Ubiq &amp;quot;echo this&amp;quot;. Ubiquity should now echo the selected text.  &lt;br /&gt;
&lt;br /&gt;
Note that we gave three pieces of information when defining our argument:  its role, its nountype, and its label.  The label is the easiest part: It&#039;s just whatever text you want to have appear in the Ubiquity interface as a prompt for the user.  E.g, if you ubiq &amp;quot;echo&amp;quot;, you will see the label for the argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  echo (your shout)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The roles and the nountypes require some more explanation.  We&#039;ll cover each of them in detail next.&lt;br /&gt;
&lt;br /&gt;
=== Argument Roles ===&lt;br /&gt;
&lt;br /&gt;
Your command can take multiple arguments.  Each one is identified by a &amp;quot;role&amp;quot;.  To understand roles, it helps to think of your command name as a verb, and each argument as a noun.  Remember that Ubiquity&#039;s command line is a pseudo-natural-language environment, so it attempts to be as close to natural language grammar as possible.&lt;br /&gt;
&lt;br /&gt;
For example, if you&#039;ve ever used the &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; command, you know that it takes up to two arguments: a message and a person.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  email message&lt;br /&gt;
  email to person&lt;br /&gt;
  email message to person&lt;br /&gt;
  email to person message&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In grammatical terms, the message argument is the &amp;quot;direct object&amp;quot; of the verb &amp;quot;email&amp;quot;.  The person argument is an indirect object.  We call it the &amp;quot;goal&amp;quot; of the verb.  So if we were writing the email command, we&#039;d define the arguments like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;message&amp;quot;},&lt;br /&gt;
              {role: &amp;quot;goal&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;recipient&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because we give the recipient argument the &amp;quot;goal&amp;quot; role, the Ubiquity parser knows to expect the user to type the word &amp;quot;to&amp;quot;.  When the user enters &amp;quot;email hello to Aza&amp;quot;, the parser knows that the word following &amp;quot;to&amp;quot; -- that is, &amp;quot;Aza&amp;quot; -- should be assigned to the recipient argument.&lt;br /&gt;
&lt;br /&gt;
In our simple &amp;quot;echo&amp;quot; command, we expect the user to type &amp;quot;echo hellooooo&amp;quot; or something like that.  The &amp;quot;hellooooo&amp;quot; is the direct object of the verb &amp;quot;echo&amp;quot;, so we give it the &amp;quot;object&amp;quot; role.  &lt;br /&gt;
&lt;br /&gt;
&amp;quot;Object&amp;quot; is the most common role.  If a command takes only one argument, that argument is usually an &amp;quot;object&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== What Roles Can I Use? ====&lt;br /&gt;
&lt;br /&gt;
* object   (in &amp;quot;echo helloooo&amp;quot;, hello is the object.)&lt;br /&gt;
* goal    (in &amp;quot;email this to brandon&amp;quot;, brandon is the goal.)&lt;br /&gt;
* source   (in &amp;quot;translate this from spanish&amp;quot;, spanish is the source.)&lt;br /&gt;
* location    (in &amp;quot;yelp pizza near boston&amp;quot;, boston is the location.)&lt;br /&gt;
* time    (in &amp;quot;book a flight on thursday&amp;quot;, thursday is the time.)&lt;br /&gt;
* instrument  (in &amp;quot;search monkeys with google&amp;quot;, google is the instrument.)&lt;br /&gt;
* format   (in &amp;quot;check weather in celsius&amp;quot;, celsius is the format.)&lt;br /&gt;
* modifier  (in &amp;quot;get email address for chris&amp;quot;, chris is the modifier.)&lt;br /&gt;
* alias   (in &amp;quot;twitter this as jono&amp;quot;, jono is the alias.)&lt;br /&gt;
&lt;br /&gt;
[https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles More information about these roles].&lt;br /&gt;
&lt;br /&gt;
=== The Arguments Object ===&lt;br /&gt;
&lt;br /&gt;
When your execute method is called, it is passed a single object that encapsulates the values for all arguments.&lt;br /&gt;
&lt;br /&gt;
When your preview method is called, it is passed this object, too.&lt;br /&gt;
&lt;br /&gt;
The object has one attribute corresponding to each role.  In our example above, the command accepts only an object-role argument, so the preview and execute methods get passed an argument with an &amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; attribute.&lt;br /&gt;
&lt;br /&gt;
If we made a command, like email, that takes an object-role argument and a goal-role argument, its preview and execute methods would get passed an argument with &amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;args.goal&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;args.goal&amp;lt;/code&amp;gt;) has several attributes of its own:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  args.object.text    // a string of the input in plain text, without formatting&lt;br /&gt;
  args.object.html    // a string of the input in formatted HTML, including tags&lt;br /&gt;
  args.object.data    // for non-text input types, an arbitrary data object&lt;br /&gt;
  args.object.summary // the HTML string displayed in the suggestion list, abbreviated if long&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our example command only cares about the &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; attribute of the input, because it simply wants plain text.  Often, when the user invokes your command by typing a few short words into the input box, &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.html&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;.summary&amp;lt;/code&amp;gt; will all have exactly the same value, and &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; will be null.  Many, if not most, commands that you write will only care about the text value.  Nevertheless, the other versions of the input data are provided to you in case they differ from &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; and in case your command has a use for them.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Noun Types ==&lt;br /&gt;
&lt;br /&gt;
Noun types specify what &#039;&#039;kind&#039;&#039; of input your command can accept for each one of its arguments.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;echo&amp;quot; command, we wanted the object-role argument to accept any text whatsoever, so for its nountype we passed in the predefined &amp;lt;code&amp;gt;noun_arb_text&amp;lt;/code&amp;gt; object.  This object accepts any arbitrary text as a valid argument and passes it to the command unchanged.&lt;br /&gt;
&lt;br /&gt;
This is OK for very simple commands, like echoing back the user&#039;s input.  But for commands that take structured data, you will want to use more specific nountypes.&lt;br /&gt;
&lt;br /&gt;
For example, if a command can take a date (like the &amp;quot;check calendar&amp;quot; command), you would want to use &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; as the nountype of the argument.  &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; provides several benefits to your command:  it does all of the date parsing for you; it suggests dates that the user might want to enter (for instance, it defaults to today&#039;s date).  And, it lets the parser know that your command takes a date.  This is useful because when the user selects a date on a page and invokes Ubiquity, your command -- along with &amp;quot;check calendar&amp;quot; -- will be one of the top suggestions.&lt;br /&gt;
&lt;br /&gt;
You can write your own noun types -- we&#039;ll get into that later.  For now, let&#039;s take a look at the built-in nountypes that your command can use.  These include:&lt;br /&gt;
&lt;br /&gt;
* noun_arb_text (Arbitrary text)&lt;br /&gt;
* noun_type_language (Name of a human language, e.g. &amp;quot;English&amp;quot;, &amp;quot;Japanese&amp;quot;)&lt;br /&gt;
* noun_type_url (A URL)&lt;br /&gt;
* noun_type_contact (An email address from your address book)&lt;br /&gt;
* noun_type_date (A date, in any format, or a word like &amp;quot;tomorrow&amp;quot;)&lt;br /&gt;
* noun_type_time (A time, in any format)&lt;br /&gt;
* noun_type_percentage&lt;br /&gt;
* noun_type_address&lt;br /&gt;
* noun_type_tab&lt;br /&gt;
* noun_type_searchengine&lt;br /&gt;
* noun_type_tag&lt;br /&gt;
* noun_type_geolocation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are familiar with writing commands, you should check out the [http://hg.toolness.com/ubiquity-firefox/file/6caa9d66b3bb/ubiquity/chrome/content/nlparser/en/nountypes.js nountypes.js], which has the implementation for most of the noun-types.  You can see what noun types are already available for your commands to use, what still needs to be written, and where the existing implementations could use improvement &amp;amp;mdash; and then come [[Labs/Ubiquity#Participation|get involved]] to help us improve them.&lt;br /&gt;
&lt;br /&gt;
=== Regexps as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
If none of the nountypes above is what you&#039;re looking for, there are several ways to define your own.  The simplest is to use a regular expression.  Suppose that (for whatever odd reason) you wanted your command to accept only arguments that begin with the letter N.  The following regexp matches words that start with N:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /^[nN]/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could use it as a noun type, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: /^[nN]/,&lt;br /&gt;
               label: &amp;quot;word that starts with n&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note that you do &#039;&#039;not&#039;&#039; put quotes around the regexp.)&lt;br /&gt;
&lt;br /&gt;
A regexp nountype will reject input that doesn&#039;t match, but it doesn&#039;t know how to help the user by suggesting appropriate input.&lt;br /&gt;
&lt;br /&gt;
=== Lists as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
Suppose you&#039;re writing a command that takes a color as an argument (perhaps it outputs a hexadecimal RGB representation of that color.)  To make a nountype that accepts colors, you can simply pass in an array of strings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  names: [&amp;quot;convert color&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: [&amp;quot;red&amp;quot;, &amp;quot;orange&amp;quot;, &amp;quot;yellow&amp;quot;, &amp;quot;green&amp;quot;, &lt;br /&gt;
                          &amp;quot;blue&amp;quot;, &amp;quot;violet&amp;quot;, &amp;quot;black&amp;quot;, &amp;quot;white&amp;quot;,&lt;br /&gt;
                          &amp;quot;grey&amp;quot;, &amp;quot;brown&amp;quot;, &amp;quot;beige&amp;quot;, &amp;quot;magenta&amp;quot;,&lt;br /&gt;
                          &amp;quot;cerulean&amp;quot;, &amp;quot;puce&amp;quot;],&lt;br /&gt;
               label: &amp;quot;color to convert&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One benefit of using a list is that the parser can use it offer the user suggestions.   If the user enters &amp;quot;get-color bl&amp;quot;, for instance, Ubiquity will be able to suggest &amp;quot;black&amp;quot; and &amp;quot;blue&amp;quot; as the two valid completions based on the input.  This makes list-based nountypes very useful for any command that can accept only a finite set of values.&lt;br /&gt;
&lt;br /&gt;
=== Writing a Noun Type Object ===&lt;br /&gt;
&lt;br /&gt;
Of course, not every type of noun you&#039;d be interested in can be represented&lt;br /&gt;
as a finite list or as a regexp.  If you want to be able to accept or reject input based on some algorithmic test, you can do so by writing a custom JavaScript object that implements a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method (and, optionally, a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; method.)&lt;br /&gt;
&lt;br /&gt;
There is an example of how to do this in the section on the tab commands, below.&lt;br /&gt;
&lt;br /&gt;
== Insert Email: the Contact noun type ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s take a look at one of the built-in noun-types: &amp;lt;code&amp;gt;noun_type_contact&amp;lt;/code&amp;gt;. This lets Ubiquity know to expect a person (either by name or email address). By using the noun-type, Ubiquity will also autocomplete to known people while the user is entering the command. This is what the built-in Ubiquity command &amp;quot;email&amp;quot; uses.&lt;br /&gt;
&lt;br /&gt;
At the moment, Ubiquity figures out what people you know through reading your Gmail contacts. In this prototyped version, you&#039;ll need to use Gmail and be logged in for for Ubiquity to know who you know. Eventually, we&#039;d like to be able to interface with all major web-mail sites, as well as desktop software like Thunderbird.&lt;br /&gt;
&lt;br /&gt;
Enough rambling. It&#039;s time for a command. I constantly find that I need to fetch someone&#039;s email address to paste into a text field because I don&#039;t know it off-hand. This command solves that by letting you insert someone&#039;s email address using autocomplete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;insert email&amp;quot;,&lt;br /&gt;
  arguments: {modifier: noun_type_contact},&lt;br /&gt;
  preview: &amp;quot;Inserts someone&#039;s email address by name.&amp;quot;,&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    CmdUtils.setSelection(args.modifier.html);&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To try this out, Ubiq &amp;quot;insert email for &amp;quot; and then the first few letters of someone you email often.&lt;br /&gt;
&lt;br /&gt;
=== Shorter Argument Declarations ===&lt;br /&gt;
&lt;br /&gt;
Notice that we used a shortcut for declaring the arguments.  In the long form, we would have had to say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;modifier&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;contact&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but if we don&#039;t care about specifying extra parameters for the argument, we can get away with using a single object for &amp;quot;arguments&amp;quot;, with the roles as the property names, and the nountypes as the property values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or with label using &amp;lt;code&amp;gt;&amp;quot;_&amp;quot;&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;&amp;quot; &amp;quot;&amp;lt;/code&amp;gt;) as separator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier_contact: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we had several arguments, we could say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {object: noun_arb_text, modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you only have &amp;quot;object&amp;quot; and don&#039;t need to specify a label...:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  argument: noun_arb_text&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aza writes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This one command sums up what I love about Ubiquity. In 8 lines of code, I can &lt;br /&gt;
fundamentally enhance the browser&#039;s functionality. Doing the same thing using &lt;br /&gt;
a normal Firefox extension methodology takes pages and pages of code&amp;amp;mdash;and  the interface would take more thought still. Doing the same thing using a bookmarklet would require a server-side component (to get around cross-site Ajax request ban) as well as forcing the user to give up their email password.&lt;br /&gt;
&lt;br /&gt;
Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TinyURL: Network Calls and jQuery (and the URL noun type)==&lt;br /&gt;
&lt;br /&gt;
Often while writing emails, I&#039;ll discover that I&#039;ve pasted in a URL long enough to be used for unfortunate analogies. I&#039;d like to be able to quickly turn that into a [http://en.wikipedia.org/wiki/Tinyurl TinyURL]&amp;amp;mdash;but the process of making a TinyURL involves lots of fiddly steps. Ubiquity to the rescue.&lt;br /&gt;
&lt;br /&gt;
Because we include [http://en.wikipedia.org/wiki/jQuery jQuery] with Ubiquity, it is simple to perform Ajax calls as well as parse returning data. TinyUrl.com provides an easy to use RESTful API where you pass a URL and it returns its shortened form. We use that API in this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;tinyurl&amp;quot;],&lt;br /&gt;
  description: &amp;quot;Replaces the selected URL with a TinyUrl.&amp;quot;,&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_type_url,&lt;br /&gt;
               label: &amp;quot;url to shorten&amp;quot;}],&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    var baseUrl = &amp;quot;http://tinyurl.com/api-create.php&amp;quot;;&lt;br /&gt;
    var params = {url: args.object.text};&lt;br /&gt;
    jQuery.get(baseUrl, params, function(tinyUrl) {&lt;br /&gt;
      CmdUtils.setSelection(tinyUrl);&lt;br /&gt;
    });&lt;br /&gt;
  },&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is a useful nountype because it defaults to the URL of the page that you are currently on.  If that is in fact the URL that the user wants, then they don&#039;t have to type it or even select it.&lt;br /&gt;
&lt;br /&gt;
jQuery is a powerful tool. With it, you can fairly effortlessly cherry-pick the data you need from RSS feeds, XML, and all sorts of other data formats. It also makes doing in-preview animations a breeze.&lt;br /&gt;
&lt;br /&gt;
= Twitter: Putting It All Together =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve now covered everything we need to cover in order to write a command that allows us to [http://en.wikipedia.org/wiki/Twitter Twitter] from Ubiquity.  The code below is the actual source code of the Twitter command as it appears in Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
Many thanks to [http://theunfocused.net/moz/ubiquity/verbs/ Blair McBride] for writing this command.  The source code is a bit more intricate than anything we&#039;ve seen so far, but it&#039;s built using exactly the same basic pieces -- and demonstrates nearly all of those pieces in action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const TWITTER_STATUS_MAXLEN = 140;&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;twitter&amp;quot;, &amp;quot;tweet&amp;quot;, &amp;quot;share using twitter&amp;quot;],&lt;br /&gt;
  arguments: [&lt;br /&gt;
    {role: &amp;quot;object&amp;quot;, label: &#039;status&#039;, nountype: noun_arb_text},&lt;br /&gt;
    {role: &amp;quot;alias&amp;quot;, nountype: noun_type_twitter_user}&lt;br /&gt;
  ],&lt;br /&gt;
  icon: &amp;quot;http://twitter.com/favicon.ico&amp;quot;,&lt;br /&gt;
  description:&lt;br /&gt;
  &amp;quot;Sets your Twitter status to a message of at most 160 characters.&amp;quot;,&lt;br /&gt;
  help: (&amp;quot;You&#039;ll need a &amp;lt;a href=\&amp;quot;http://twitter.com\&amp;quot;&amp;gt;Twitter account&amp;lt;/a&amp;gt;,&amp;quot; +&lt;br /&gt;
         &amp;quot; obviously.  If you&#039;re not already logged in&amp;quot; +&lt;br /&gt;
         &amp;quot; you&#039;ll be asked to log in.&amp;quot;),&lt;br /&gt;
  preview: function(previewBlock, args) {&lt;br /&gt;
    var statusText = (args.object ? args.object.text : &#039;&#039;);&lt;br /&gt;
    var usernameText = &amp;quot;&amp;quot;;&lt;br /&gt;
    if (args.alias) {&lt;br /&gt;
      usernameText = args.alias.text;&lt;br /&gt;
    } else if (args.as) {&lt;br /&gt;
      usernameText = args.as.text;&lt;br /&gt;
    }&lt;br /&gt;
    var previewTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;div class=&#039;twitter&#039;&amp;gt;&amp;quot;+_(&amp;quot;Updates your Twitter status ${username} to:&amp;quot;)+&amp;quot;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      &amp;quot;&amp;lt;b class=&#039;status&#039;&amp;gt;${status}&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      _(&amp;quot;Characters remaining: &amp;lt;b&amp;gt;${chars}&amp;lt;/b&amp;gt;&amp;quot;) +&lt;br /&gt;
      &amp;quot;&amp;lt;p&amp;gt;&amp;lt;small&amp;gt;&amp;quot;+_(&amp;quot;tip: tweet @mozillaubiquity for help&amp;quot;)+&amp;quot;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
    var truncateTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;strong&amp;gt;&amp;quot;+_(&amp;quot;The last &amp;lt;b&amp;gt;${truncate}&amp;lt;/b&amp;gt; characters will be truncated!&amp;quot;)+&amp;quot;&amp;lt;/strong&amp;gt;&amp;quot;);&lt;br /&gt;
    var previewData = {&lt;br /&gt;
      status: &amp;lt;&amp;gt;{statusText}&amp;lt;/&amp;gt;.toXMLString(),&lt;br /&gt;
      username: usernameText &amp;amp;&amp;amp; _(&amp;quot;(For user &amp;lt;b&amp;gt;${usernameText}&amp;lt;/b&amp;gt;)&amp;quot;),&lt;br /&gt;
      chars: TWITTER_STATUS_MAXLEN - statusText.length&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var previewHTML = CmdUtils.renderTemplate(&lt;br /&gt;
                        CmdUtils.renderTemplate(previewTemplate, previewData),&lt;br /&gt;
                        {usernameText:usernameText});&lt;br /&gt;
&lt;br /&gt;
    if (previewData.chars &amp;lt; 0) {&lt;br /&gt;
      var truncateData = {&lt;br /&gt;
        truncate: 0 - previewData.chars&lt;br /&gt;
      };&lt;br /&gt;
&lt;br /&gt;
      previewHTML += CmdUtils.renderTemplate(truncateTemplate, truncateData);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    previewBlock.innerHTML = previewHTML;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    var statusText = args.object.text;&lt;br /&gt;
    if(statusText.length &amp;lt; 1) {&lt;br /&gt;
      this._show(_(&amp;quot;requires a status to be entered&amp;quot;));&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var updateUrl = &amp;quot;https://twitter.com/statuses/update.json&amp;quot;;&lt;br /&gt;
    var updateParams = {&lt;br /&gt;
      source: &amp;quot;ubiquity&amp;quot;,&lt;br /&gt;
      status: statusText&lt;br /&gt;
      //dont cut the input since sometimes, the user selects a big url,&lt;br /&gt;
      //and the total lenght is more than 140, but tinyurl takes care of that&lt;br /&gt;
    };&lt;br /&gt;
    var me = this;&lt;br /&gt;
&lt;br /&gt;
    function sendMessage() {&lt;br /&gt;
      jQuery.ajax({&lt;br /&gt;
        type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
        url: updateUrl,&lt;br /&gt;
        data: updateParams,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        error: function() {&lt;br /&gt;
          me._show(_(&amp;quot;error - status not updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        success: function() {&lt;br /&gt;
          me._show(/^d /.test(statusText)&lt;br /&gt;
                   ? _(&amp;quot;direct message sent&amp;quot;)&lt;br /&gt;
                   : _(&amp;quot;status updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        username: login.username,&lt;br /&gt;
        password: login.password&lt;br /&gt;
      });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var login;&lt;br /&gt;
    var alias = args.alias;&lt;br /&gt;
    if (alias &amp;amp;&amp;amp; alias.text &amp;amp;&amp;amp; alias.data) {&lt;br /&gt;
      login = alias.data;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    } else {&lt;br /&gt;
      login = {username: null,&lt;br /&gt;
               password: null};&lt;br /&gt;
      if (alias &amp;amp;&amp;amp; alias.text)&lt;br /&gt;
        login.username = alias.text;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  _show: function(txt){&lt;br /&gt;
    displayMessage({icon: this.icon, title: this.name, text: txt});&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Switching Tabs =&lt;br /&gt;
&lt;br /&gt;
The final command in this tutorial is for switching between tabs. The end goal is this: type a few keys to that matches the title of an open tab (in any window), hit return, and you&#039;ve switched to that tab.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: Writing your own Noun-Types ===&lt;br /&gt;
&lt;br /&gt;
A noun-type needs to only have two things: A &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; function.  It can optionally also have a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
The label is what shows up when the command prompts for input. Suggest returns a list of input objects, each one containing the name of a matching tab. We&#039;re using [http://developer.mozilla.org/en/docs/FUEL FUEL] to interact with the browser, which is where the &amp;quot;Application&amp;quot; variable comes from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_tab = {&lt;br /&gt;
  label: &amp;quot;tab name&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
  // Returns all tabs from all windows.&lt;br /&gt;
  getTabs: function nt_tab_getTabs() {&lt;br /&gt;
    return [tab&lt;br /&gt;
            for each (win in Application.windows)&lt;br /&gt;
            for each (tab in win.tabs)];&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  suggest: function nt_tab_suggest(text, html, callback, selectionIndices) {&lt;br /&gt;
    var textLC = text.toLowerCase();&lt;br /&gt;
    return [CmdUtils.makeSugg(tab.document.title, null, tab)&lt;br /&gt;
            for each (tab in this.getTabs())&lt;br /&gt;
            if (~tab.document.title.toLowerCase().indexOf(textLC))];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The suggest method of a noun type always gets passed both text and html.  If the input is coming from a part of a web page that the user has selected, these&lt;br /&gt;
values can be different: they are both strings, but the html value contains markup tags while the text value does not. The Tab noun type only cares about the plain text of the tab name, so we ignore the value of html.&lt;br /&gt;
&lt;br /&gt;
The callback argument is for use by nountypes that need to run asynchronously, i.e. because they need to do network calls to generate suggestions.  The callback is a function; instead of returning a list of suggestions right away, an asynchronous noun type can call the callback with each suggestion it generates.  More on this later; the tab noun type generates all its suggestions right away, so it just returns them instead of using the callback.&lt;br /&gt;
&lt;br /&gt;
We use the convenience function &amp;lt;code&amp;gt;CmdUtils.makeSugg()&amp;lt;/code&amp;gt; to generate an&lt;br /&gt;
input object of the type that the Ubiquity parser expects.  The full signature of this function is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSugg(text, html, data, score, selectionIndices);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It requires at least one of &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; if you want to skip &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the text or html input is very long, &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; generates a summary for us, and puts it in the &amp;lt;code&amp;gt;summary&amp;lt;/code&amp;gt; attribute of the input object.&lt;br /&gt;
&lt;br /&gt;
We could have accomplished mostly the same thing without calling &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; by returning a list of anonymous objects like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ text: tabName,&lt;br /&gt;
  html: Utils.escapeHtml(tabName),&lt;br /&gt;
  data: tab,&lt;br /&gt;
  summary: Utils.escapeHtml(tabName) };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input objects that our &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method generates are the same objects that will eventually get passed in to the &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; methods of any commands that use this noun type.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: The Command ===&lt;br /&gt;
&lt;br /&gt;
Now that we are armed with the tab noun-type, it is easy to make the tab-switching command. Again, we use FUEL to focus the selected tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;switch tab&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_tab},&lt;br /&gt;
&lt;br /&gt;
  execute: function tab_execute(args) {&lt;br /&gt;
    // must be delayed because Ubiquity restores the focus on close&lt;br /&gt;
    Utils.setTimeout(function delayedFocus() {&lt;br /&gt;
      var tab = args.object.data;&lt;br /&gt;
      tab._window._window.focus();&lt;br /&gt;
      tab.focus();&lt;br /&gt;
    }, 99);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  preview: function tab_preview(pblock, args) {&lt;br /&gt;
    var tabName = args.object.text;&lt;br /&gt;
    if (tabName) {&lt;br /&gt;
      var msg = &amp;quot;Changes to &amp;lt;strong&amp;gt;${tab}&amp;lt;/strong&amp;gt; tab.&amp;quot;;&lt;br /&gt;
      pblock.innerHTML = _(msg, {tab: tabName});&lt;br /&gt;
    }&lt;br /&gt;
    else pblock.innerHTML = _(&amp;quot;Switch to a tab by name.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Development Hints =&lt;br /&gt;
&lt;br /&gt;
You now know all you need to know to get started developing useful Ubiquity commands of your own.&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous tips that didn&#039;t fit elsewhere on this page, that may make development easier for you.&lt;br /&gt;
&lt;br /&gt;
== The Source Code of Built-In Commands ==&lt;br /&gt;
&lt;br /&gt;
Looking at the source code of built-in commands and built-in noun types can be a very useful aid to development.  If you have the source checkout of Ubiquity (see [Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial | the development tutorial] to find out how to get this), the source code can be found in the files:&lt;br /&gt;
&lt;br /&gt;
 ubiquity/standard-feeds/&lt;br /&gt;
 ubiquity/builtin-feeds/builtincmds.js&lt;br /&gt;
 ubiquity/modules/nountypes.js&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a checkout of the source code, you can view the latest version on the web here:&lt;br /&gt;
&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/standard-feeds/ standard-feeds]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/builtin-feeds/builtincmds.js builtincmds.js]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/modules/nountypes.js nountypes.js]&lt;br /&gt;
&lt;br /&gt;
== Interacting with Other Extensions ==&lt;br /&gt;
&lt;br /&gt;
http://img363.imageshack.us/img363/1906/picture7cm5.png&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t much to say here besides that it&#039;s easy. For example, here&#039;s a command (thanks to [http://foyrek.com/lyrics.html Abimanyu Raja] for writing this code) that finds the lyrics for a song. You can simply Ubiq something like &amp;quot;get lyrics for wild international&amp;quot; but the command will also interface with the FoxyTunes extension (if it is installed) and add the currently playing song to the suggestion list. Interfacing with other extensions, too, is easy because you can view the source code for every Firefox extension.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_song = {&lt;br /&gt;
  label: &amp;quot;song name&amp;quot;,&lt;br /&gt;
  suggest: function nt_song_suggest(text) {&lt;br /&gt;
    var suggestions = [CmdUtils.makeSugg(text)];&lt;br /&gt;
    var win = Utils.currentChromeWindow;&lt;br /&gt;
    if (&amp;quot;foxytunesGetCurrentTrackTitle&amp;quot; in win)&lt;br /&gt;
      suggestions.push(CmdUtils.makeSugg(win.foxytunesGetCurrentTrackTitle()));&lt;br /&gt;
    return suggestions;&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;get lyrics&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_song},&lt;br /&gt;
  description: &amp;quot;Searches for lyrics of the song.&amp;quot;,&lt;br /&gt;
  preview: function gl_preview(pblock, {object: {text}}) {&lt;br /&gt;
    if (!text) {&lt;br /&gt;
      this.previewDefault(pblock);&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Searches for the lyrics of &amp;lt;b&amp;gt;${query}&amp;lt;/b&amp;gt;.&amp;quot;,&lt;br /&gt;
                         {query: Utils.escapeHtml(text)});&lt;br /&gt;
  },&lt;br /&gt;
  execute: function gl_execute(args) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      &amp;quot;http://www.google.com/search?q=&amp;quot; +&lt;br /&gt;
      encodeURIComponent(args.object.text + _(&amp;quot; lyrics&amp;quot;)));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing Asynchronous Noun Suggestions ==&lt;br /&gt;
&lt;br /&gt;
The noun types we&#039;ve seen so far in this tutorial have all worked synchronously, returning their suggestions right away. However, Ubiquity also supports asynchronous noun suggestions. These are useful for when a noun type needs to do some potentially time-consuming work before it can make suggestions &amp;amp;mdash; most commonly when it needs to call an external service.&lt;br /&gt;
&lt;br /&gt;
Implementing asynchronous suggestions is simple. Whenever the Ubiquity parser calls a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function, it includes a callback function that may be used to send suggestions back to the parser as they become available. In the most typical case, the noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function makes an AJAX request, invoking the parser&#039;s callback function from within the callback function for the AJAX request.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example: a noun type that suggests [http://www.freebase.com/ Freebase] topics based on the text the user has typed or selected, and a barebones &amp;lt;code&amp;gt;freebase-lookup&amp;lt;/code&amp;gt; command that uses the noun type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_freebase_topic = {&lt;br /&gt;
  name: &amp;quot;Freebase topic&amp;quot;,&lt;br /&gt;
  label: &amp;quot;topic&amp;quot;,&lt;br /&gt;
  suggest: function freebase_topic_suggest(text, html, callback) {&lt;br /&gt;
    return [&lt;br /&gt;
      CmdUtils.makeSugg(text),&lt;br /&gt;
      $.ajax({&lt;br /&gt;
        url: &amp;quot;http://www.freebase.com/api/service/search&amp;quot;,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        data: {prefix: text, limit: 5},&lt;br /&gt;
        success: function suggestTopics(response) {&lt;br /&gt;
          if (response.status === &amp;quot;200 OK&amp;quot;)&lt;br /&gt;
            callback([CmdUtils.makeSugg(result.name, result.name, result)&lt;br /&gt;
                      for each (result in response.result)]);&lt;br /&gt;
        },&lt;br /&gt;
      })];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;lookup on freebase&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_freebase_topic},&lt;br /&gt;
  preview: function preview(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _((&amp;quot;Go to the Freebase topic page for &amp;quot; +&lt;br /&gt;
                          &amp;quot;{if text}${text}{else}any topic{/if}.&amp;quot;),&lt;br /&gt;
                         args.object);&lt;br /&gt;
  },&lt;br /&gt;
  execute: function goToFreebase({object: {text, data}}) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      text&lt;br /&gt;
      ? (data&lt;br /&gt;
         ? &amp;quot;http://www.freebase.com/view&amp;quot; + data.id&lt;br /&gt;
         : (&amp;quot;http://www.freebase.com/search?query=&amp;quot; +&lt;br /&gt;
            encodeURIComponent(text)))&lt;br /&gt;
      : &amp;quot;http://www.freebase.com/&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few notes:&lt;br /&gt;
&lt;br /&gt;
* A noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function typically returns an empty array when it intends to make asynchronous suggestions, but it can return one or more suggestions synchronously if it has them available.&lt;br /&gt;
* Because the work being done to generate asynchronous suggestions is generally somewhat expensive, and because a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function may be called for every keystroke the user makes, you should probably consider implementing a delay before starting the work and/or caching the work at some level. Ubiquity currently leaves this up to each noun type individually.&lt;br /&gt;
* A much more robust implementation of Freebase-derived noun types can be found [http://graynorton.com/ubiquity/freebase-nouns.html here].&lt;br /&gt;
&lt;br /&gt;
== Running on page load, Ubiquity load and startup ==&lt;br /&gt;
&lt;br /&gt;
Commands aren&#039;t the only thing you can put in a command feed.  You can also include functions you want to be run automatically at page-load time and at Firefox startup time.&lt;br /&gt;
&lt;br /&gt;
In order to run some code on page load, you simply have to prefix your function with &amp;lt;code&amp;gt;pageLoad_&amp;lt;/code&amp;gt;. For example, if you want to say &amp;quot;Hi&amp;quot; every time a page is loaded, your code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pageLoad_hi() {&lt;br /&gt;
  displayMessage(&amp;quot;hi&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you modify the function and want to see the changes, remember to first invoke Ubiquity. Although your function like above, might not be a Ubiquity command, this is necessary to refresh the cached code.&lt;br /&gt;
&lt;br /&gt;
Similarly, functions prefixed by &amp;lt;code&amp;gt;ubiquityLoad_&amp;lt;/code&amp;gt; are called whenever Ubiquity is initialized for a main window of Firefox. This is useful when you want to interact with the Ubiquity interface itself, or run some code whenever a new window is opened.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function ubiquityLoad_googleAsDefaultEntry(gUbiquity, mainWindow) {&lt;br /&gt;
  gUbiquity.textBox.value = &amp;quot;google&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if you want to run some code everytime Firefox starts up, you just have to prefix the function with &amp;lt;code&amp;gt;startup_&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The awesome thing about these functions is the ability to develop whole Firefox extensions (that require minimal UI) as Ubiquity plugins in lesser lines of code. You don&#039;t need to worry about chrome.manifest or install.rdf. Another added benefit is that you never have to restart your Firefox during development unless of course, you are running code on Firefox startup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://img388.imageshack.us/img388/3086/picture5eo9.png&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code for [http://foyrek.com/keyscape.js Keyscape] which is a Ubiquity command that makes use of &amp;lt;code&amp;gt;pageLoad&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;startup&amp;lt;/code&amp;gt; to recreate the functionality of the [https://addons.mozilla.org/en-US/firefox/addon/339 Search Keys extension] by Jesse Ruderman. In line with Ubiquity&#039;s aim to let you do things quicker using your keyboard, this command lets you go to search results on Google by just pressing a number. It&#039;ll add hints to show the number of each link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//A lot of this code is borrowed from the Search Keys extension&lt;br /&gt;
//Many thanks to Jeese Ruderman&lt;br /&gt;
&lt;br /&gt;
function startup_keyscape() {&lt;br /&gt;
  window.addEventListener(&amp;quot;keydown&amp;quot;, keyscape_down, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function pageLoad_keyscape(doc){&lt;br /&gt;
&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
  //If we are on about: or chrome://, just return&lt;br /&gt;
  if(uri.scheme != &amp;quot;http&amp;quot;)&lt;br /&gt;
    return;&lt;br /&gt;
&lt;br /&gt;
  //Check if the page we are on is google&lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	      		    &lt;br /&gt;
    for(var num=1; num&amp;lt;=10; num++){&lt;br /&gt;
&lt;br /&gt;
      var link = jQuery(doc.body).find(&#039;a.l&#039;)[num-1];&lt;br /&gt;
      &lt;br /&gt;
      if( link ){&lt;br /&gt;
&lt;br /&gt;
        var hint = doc.createElementNS(&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;, &amp;quot;span&amp;quot;);&lt;br /&gt;
        hint.style.color = &amp;quot;blue&amp;quot;;&lt;br /&gt;
        hint.style.background = &amp;quot;white&amp;quot;;&lt;br /&gt;
        hint.style.padding = &amp;quot;1px 2px 1px 2px&amp;quot;;&lt;br /&gt;
        hint.style.marginLeft = &amp;quot;.5em&amp;quot;;&lt;br /&gt;
        hint.appendChild(doc.createTextNode(num == 10 ? 0 : num));&lt;br /&gt;
        link.parentNode.insertBefore(hint, link.nextSibling);&lt;br /&gt;
      }  		&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_isGoogle(uri){&lt;br /&gt;
  return uri.host.indexOf(&amp;quot;google&amp;quot;) != -1 &lt;br /&gt;
	 &amp;amp;&amp;amp; (uri.path.substr(0,8) == &amp;quot;/search?&amp;quot; &lt;br /&gt;
         || uri.path.substr(0,8) == &amp;quot;/custom?&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_down(event){&lt;br /&gt;
&lt;br /&gt;
  var doc =  Application.activeWindow.activeTab.document;	&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
 &lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	&lt;br /&gt;
   var key = parseInt(event.keyCode || event.charCode);	&lt;br /&gt;
   var num;&lt;br /&gt;
	&lt;br /&gt;
   if(48 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 57) //number keys&lt;br /&gt;
     num = key - 48;&lt;br /&gt;
   else if(96 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 105) //numeric keypad with numlock on&lt;br /&gt;
     num = key - 96;&lt;br /&gt;
   else&lt;br /&gt;
     return;&lt;br /&gt;
&lt;br /&gt;
   //Don&#039;t do anything if we are in a textbox&lt;br /&gt;
   //or some other related elements&lt;br /&gt;
   var elt = window.document.commandDispatcher.focusedElement;&lt;br /&gt;
   &lt;br /&gt;
   if (elt) {&lt;br /&gt;
     var ln = new String(elt.localName).toLowerCase();&lt;br /&gt;
     if (ln == &amp;quot;input&amp;quot; || ln == &amp;quot;textarea&amp;quot; || ln == &amp;quot;select&amp;quot; || ln == &amp;quot;isindex&amp;quot;)&lt;br /&gt;
        return;&lt;br /&gt;
   }&lt;br /&gt;
    &lt;br /&gt;
   //Get the link url from the search results page&lt;br /&gt;
   var url_dest = jQuery(doc.body).find(&#039;a.l&#039;).eq(num-1).attr(&#039;href&#039;);&lt;br /&gt;
   &lt;br /&gt;
   if(event.altKey){&lt;br /&gt;
     //Open in new tab&lt;br /&gt;
     Application.activeWindow.open(Utils.url(url_dest));&lt;br /&gt;
   }else{&lt;br /&gt;
     //Open in same tab&lt;br /&gt;
     doc.location.href = url_dest;&lt;br /&gt;
   }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Ubiquity does indeed become ubiquitous, a lot of extensions can be re-written as Ubiquity commands. This is much nicer for the end-user, as well, because the Ubiquity command installation process is a lot easier.&lt;br /&gt;
&lt;br /&gt;
In the future, Ubiquity is also likely to have the ability to convert your Ubiquity commands into proper Firefox extensions. Look [http://labs.toolness.com/trac/ticket/3 here] to check on the progress of this functionality.&lt;br /&gt;
&lt;br /&gt;
== Persistent Storage ==&lt;br /&gt;
Some commands may want to store data that persist even after closing Firefox. &lt;br /&gt;
Meet &amp;lt;code&amp;gt;Bin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var gId = 42; // used for avoiding needless preview updates when typing&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;memo&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Lets you jot a memo for the page.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  argument: noun_arb_text,&lt;br /&gt;
  execute: function memo_execute({object: {html}}) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]() || [];&lt;br /&gt;
    list.push(html);&lt;br /&gt;
    Bin[href](list);&lt;br /&gt;
    gId = +new Date;&lt;br /&gt;
  },&lt;br /&gt;
  preview: function memo_preview(pb) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]();&lt;br /&gt;
    if (!list) {&lt;br /&gt;
      pb.innerHTML =&lt;br /&gt;
        &amp;lt;&amp;gt;No memos taken for: &amp;lt;small&amp;gt;&amp;lt;code&amp;gt;{href}&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/&amp;gt;;&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    if (pb.ownerDocument.getElementById(gId)) return;&lt;br /&gt;
    var ol = CmdUtils.previewList(pb, list, function deleteMemo(i, ev) {&lt;br /&gt;
      $(ev.target).closest(&amp;quot;li&amp;quot;).slideUp();&lt;br /&gt;
      list.splice(i, 1);&lt;br /&gt;
      Bin[href](list.length ? list : null);&lt;br /&gt;
      gId = +new Date;&lt;br /&gt;
    });&lt;br /&gt;
    ol.id = gId;&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;list memos&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Opens all memos you&#039;ve taken in a new tab.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  execute: function list_memos_execute() {&lt;br /&gt;
    var htm = +Bin + &amp;quot; page(s)&amp;lt;dl&amp;gt;&amp;quot;, {escapeHtml} = Utils;&lt;br /&gt;
    for each (var [url, memos] in Bin) {&lt;br /&gt;
      htm += &amp;quot;&amp;lt;dt&amp;gt;&amp;quot; + escapeHtml(url) + &amp;quot;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;ol&amp;gt;&amp;quot;;&lt;br /&gt;
      for each (var memo in memos) htm += &amp;quot;&amp;lt;li&amp;gt;&amp;quot; + memo + &amp;quot;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
      htm += &amp;quot;&amp;lt;/ol&amp;gt;&amp;lt;/dd&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    Utils.openUrlInBrowser(&amp;quot;data:text/html,&amp;quot; + encodeURI(htm + &amp;quot;&amp;lt;/dl&amp;gt;&amp;quot;));&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details, see the bottom of [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/feedmanager.js FeedManager] documentation.&lt;br /&gt;
&lt;br /&gt;
== Firebug ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity automatically enables Chrome Errors and Warnings on startup so that errors in your code appear in the Firebug console. Just use &amp;lt;tt&amp;gt;CmdUtils.log()&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;console.log()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Where To Go From Here =&lt;br /&gt;
&lt;br /&gt;
Take a look at Ubiquity&#039;s reference documentation for the &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils]&amp;lt;/tt&amp;gt; namespaces.&lt;br /&gt;
&lt;br /&gt;
If you have any questions or comments, feel free to join us on IRC at &amp;lt;tt&amp;gt;#ubiquity&amp;lt;/tt&amp;gt; on &amp;lt;tt&amp;gt;irc.mozilla.org&amp;lt;/tt&amp;gt;, as well as the [http://groups.google.com/group/ubiquity-firefox Ubiquity Google Group].&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
To reiterate a point I made before: Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web. You are one of those agents.&lt;br /&gt;
&lt;br /&gt;
Now, go forth and create.&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=241901</id>
		<title>Labs/Ubiquity/Ubiquity 0.5 Author Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=241901"/>
		<updated>2010-07-29T02:35:16Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Insert Email: the Contact noun type */ args -&amp;gt; arguments | text -&amp;gt; html&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]].&lt;br /&gt;
&lt;br /&gt;
Author: Aza Raskin, Blair McBride, Abimanyu Raja, Jono DiCarlo, Atul Varma&lt;br /&gt;
&lt;br /&gt;
= The Ubiquity version 0.5 Command Tutorial =&lt;br /&gt;
&lt;br /&gt;
The great power of Ubiquity&amp;amp;mdash;from a developer standpoint&amp;amp;mdash;is how easy it is to create commands. With only a couple of lines of Javascript, Ubiquity enables even casual web developers to drastically enhance the features of the browser. From an 8-line command to insert a contact&#039;s email address in any text field, to a 50-line Twitter integration, this tutorial walks you through the process of being generative with Ubiquity.&lt;br /&gt;
&lt;br /&gt;
The rest of this page documents the command developer API as it stands frozen in version 0.5.&lt;br /&gt;
&lt;br /&gt;
If you want the bleeding-edge command developer API (which includes any new features that may have been added to the Ubiquity source code in HG but not yet included in a release), then that&#039;s [[Labs/Ubiquity/Ubiquity_Source_Tip_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
If you want the old command developer API, as it stood in Ubiquity 0.1 (not recommended), that&#039;s [[Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
== Real Time Development ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity doesn&#039;t require you to restart Firefox as you develop. Restarting is a drastic measure, and we want none of it. Instead, Ubiquity reloads the commands every time it is summoned. When you are using the built-in editor then you don&#039;t even need to save!&lt;br /&gt;
&lt;br /&gt;
To open the Ubiquity command editor, summon Ubiquity (control/alt + space) and use the &amp;quot;open command editor&amp;quot; command. Throughout this tutorial, when we want you to run a command in Ubiquity, we&#039;ll say &#039;&#039;&#039;Ubiq&#039;&#039;&#039; it. For instance, to open the editor, just Ubiq &amp;quot;open command editor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the following examples, just type in this editor. Updates happen the next time you summon Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Choices, Choices... ==&lt;br /&gt;
&lt;br /&gt;
You may notice a drop-down menu mentioning something about a &amp;quot;feed type&amp;quot; just above the editing field in the command editor:&lt;br /&gt;
&lt;br /&gt;
http://www.toolness.com/images/20090318121423.jpg&lt;br /&gt;
&lt;br /&gt;
For now, just make sure this drop-down is set to &amp;quot;Regular&amp;quot;.  We&#039;ll tell you more about what this means later.&lt;br /&gt;
&lt;br /&gt;
== Hello World: The First Command ==&lt;br /&gt;
&lt;br /&gt;
=== Just a Message: As Simple as it Gets ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start with the standard programing trope: printing &amp;quot;Hello, World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the command editor type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try Ubiq-ing &amp;quot;say hello&amp;quot;. You&#039;ll see that &amp;quot;Hello, World!&amp;quot; is immediately displayed on the screen. If you are on Mac OSX with [http://en.wikipedia.org/wiki/Growl_(software) Growl] installed the message will appear as a Growl notification. If you are on Windows, then it will appears as a standard &amp;quot;toaster&amp;quot; notification in the bottom right-hand corner of the screen.&lt;br /&gt;
&lt;br /&gt;
http://farm3.static.flickr.com/2479/3651542339_022e4aa4c4.jpg&lt;br /&gt;
&lt;br /&gt;
http://img517.imageshack.us/img517/7726/picture2vx2.png&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 8.04 (Hardy Heron) this appears thus:&lt;br /&gt;
&lt;br /&gt;
http://img293.imageshack.us/img293/7746/ubiqubuntuhelloworldeq9.png&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have Growl installed on OSX, or aren&#039;t on a Windows XP/Vista or Ubuntu Hardy, then you won&#039;t get any sort of notification. That&#039;s something to be [http://labs.toolness.com/trac/ticket/19 worked on] in future releases of Ubiquity.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils.CreateCommand ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; is a namespace which contains all the functions you need to create commands.  Commands are created by making an object and passing it to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.  In Javascript, inline curly braces mean &amp;quot;new object&amp;quot;, so this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function () { //etc }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
means &amp;quot;Make an object with two attributes, &#039;names&#039; and &#039;execute&#039;.&amp;quot;  This object is then passed as the argument to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== names ===&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; and &#039;execute&#039; are the only two mandatory attributes for your command object.  &#039;names&#039; specifies what the command is called, and &#039;execute&#039; specifies what it does.  There are plenty of other attributes that you can specify, but they are all optional.&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; is always an array (thus the square brackets).  In the case of this command we provided only one name, &amp;quot;hello world&amp;quot;.  But we could have provided as many names as we wanted.  For instance, if we had said:&lt;br /&gt;
&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
then &amp;quot;say hello&amp;quot; would be the normal name of the command, but Ubiquity would also recognize &amp;quot;greet&amp;quot; as a synonym or alias for the command.&lt;br /&gt;
&lt;br /&gt;
=== execute ===&lt;br /&gt;
&lt;br /&gt;
&#039;execute&#039; is always a function.  When the user executes your command, this is the function that will be run.  It can do pretty much anything you want -- or at least, anything you know how to write in JavaScript.&lt;br /&gt;
&lt;br /&gt;
In the example above, we simply call &amp;lt;code&amp;gt;displayMessage()&amp;lt;/code&amp;gt;, which displays the given message in whichever way the operating system can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a number of other useful functions in the &amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; namespace. We don&#039;t yet have full documentation for these commands, but you&#039;ll get a sense of the useful ones in this tutorial. For more detailed information, take a look at [http://hg.toolness.com/ubiquity-firefox/file/9a6c9935da9f/ubiquity/chrome/content/cmdutils.js cmdutils.js].&lt;br /&gt;
&lt;br /&gt;
=== Making sure your command is localizable ===&lt;br /&gt;
&lt;br /&gt;
Ubiquity now supports multiple languages.  That means that hopefully someday someone will be translating your commands to the other languages that Ubiquity supports.  Making your command localizable is easy, and a good habit to get into!  You just have to locate all strings that appear in your &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; methods, that are intended for display to humans, and wrap them with:&lt;br /&gt;
&lt;br /&gt;
 _()&lt;br /&gt;
&lt;br /&gt;
This may look odd, but what it does is quite important: it makes your strings appear in the template files that localizers will be using.  So let&#039;s make our &amp;quot;Hello world!&amp;quot; command localizable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes it so that when a localization template is generated from your command feed, &amp;quot;Hello, World!&amp;quot; will be listed among the strings to be translated.&lt;br /&gt;
&lt;br /&gt;
Note that we don&#039;t need to wrap the names, or other strings that appear in the command metadata -- these are automatically wrapped for us.  We only need to wrap strings that appear inside the functions.&lt;br /&gt;
&lt;br /&gt;
=== Adding a Preview ===&lt;br /&gt;
&lt;br /&gt;
http://img352.imageshack.us/img352/1002/picture3ex0.png&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a preview to our new command. Previews give the user feedback about what a command does before it&#039;s executed. Previews are great for providing rich visual feedback like displaying a graphical representation of atmospheric conditions when using the weather command as shown above. Previews have the full expressive power of HTML, including animations, so there&#039;s a lot you can do with them.&lt;br /&gt;
&lt;br /&gt;
One point of design: Preview code should never have side-effects. That is, a preview should never (without user interaction) change the state of the system.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;say hello&amp;quot; command, we don&#039;t need anything fancy: just some help text that is more descriptive than the default &amp;quot;Executes the say hello command.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  preview: &amp;quot;Displays a &amp;lt;i&amp;gt;salutary&amp;lt;/i&amp;gt; greeting to the planet.&amp;quot;,&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the preview is an HTML-formatted string. The preview can also be a function. We&#039;ll get to that in the next section.&lt;br /&gt;
&lt;br /&gt;
== The Date Command: The Second Command ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the Selection ===&lt;br /&gt;
&lt;br /&gt;
I often forget what day it is. That may be because I need to go outside more often, but, like any programmer, I generally solve my problem&#039;s symptoms with technology rather then addressing the root cause. My solution is to create a command that inserts the date at the location of the cursor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(new Date().toLocaleDateString());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new function here is &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt;. This inserts the passed-in text onto the page at the location of the cursor. If the cursor is in an editable text or rich-text fields, the text gets dumped there. If the cursor isn&#039;t in an editable area, &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt; will still be able to insert the date. (Even when it isn&#039;t displayed, Firefox always keeps track of a cursor position. To see it, type F7.) Try going to a page, selecting some non-mutable text, and using the command. See, it works! This is particularly useful for commands like &amp;quot;translate&amp;quot;, where you want to replace non-editable text with its translation.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;toLocaleDateString()&amp;lt;/code&amp;gt; function is native to Javascript, so if you&#039;re not familiar with it check out the documentation for the Javascript [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date Date object].&lt;br /&gt;
&lt;br /&gt;
=== A Better Preview ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s time to add a better preview to the date command. Let&#039;s have the preview show the date, so that the user will know what to expect when they execute the command. (As a side benefit the user doesn&#039;t even need to execute the command to do a quick check of the day.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _date: function date__date() {&lt;br /&gt;
    return new Date().toLocaleDateString();&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = _(&#039;Inserts today\&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;);&lt;br /&gt;
    pblock.innerHTML = CmdUtils.renderTemplate(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(this._date());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve done three things here. The first was to factor out the code for getting the date into the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt; function. This way we don&#039;t break [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY] by repeating code across the preview and execute functions. Notice that to access the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt;, we use the &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
The second thing we&#039;ve done is to add a preview function. The first argument is the DOM element that gets displayed as the preview for your command. Modify &amp;lt;code&amp;gt;pblock&amp;lt;/code&amp;gt; and you modify the preview. In this case, we set the &amp;lt;code&amp;gt;innerHTML&amp;lt;/code&amp;gt; of the preview block to be the message we want.&lt;br /&gt;
&lt;br /&gt;
The third thing we&#039;ve done is to do some string formatting using the &amp;lt;code&amp;gt;renderTemplate()&amp;lt;/code&amp;gt; function. This takes a template string and performs the appropriate substitution given the passed-in JSON object. Templates can handle a wide range of functionality, as we are currently using TrimPath&#039;s [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavascriptTemplates]. You should read their site for more documentation. Although JavascriptTemplates has some nice properties, we are contemplating moving to [http://mjtemplate.org/ MJT] sometime soon.&lt;br /&gt;
&lt;br /&gt;
=== A shortcut for localization and rendering templates ===&lt;br /&gt;
&lt;br /&gt;
Note how in the code above, we used the localization wrapper &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; before passing the string to renderTemplate.  Because this is such a very common combination when displaying strings, we have a shortcut for it.  Calling _() with a JSON object as the second argument will automatically trigger &amp;lt;code&amp;gt;CmdUtils.renderTemplate()&amp;lt;/code&amp;gt; on the post-localization string.  So the above preview method could be rewritten more simply as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = &#039;Inserts today&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Networking calls and placeholder previews ===&lt;br /&gt;
&lt;br /&gt;
Previews display something meaningful to the user immediately. If you have a preview that requires an AJAX request&amp;amp;mdash;say, to fetch some search results&amp;amp;mdash;that call might take a while to return. In the meantime, your command should display a placeholder preview giving the user feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function(pblock) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;This will show until the AJAX request returns&amp;quot;);&lt;br /&gt;
    CmdUtils.previewGet(pblock, &amp;quot;http://example.com&amp;quot;, function (htm) {&lt;br /&gt;
      pblock.innerHTML = htm;&lt;br /&gt;
    });&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documentation and Metadata ==&lt;br /&gt;
&lt;br /&gt;
Before you share your command with the world, you should consider adding some attributions to the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you should &amp;lt;em&amp;gt;definitely&amp;lt;/em&amp;gt; add some documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Inserts today&#039;s date.&amp;quot;,&lt;br /&gt;
  help: &amp;quot;If you&#039;re in an editable text area, inserts today&#039;s date, formatted for the current locale.&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.description&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.help&amp;lt;/code&amp;gt; attributes are both automatically displayed alongside your command&#039;s name on the command-list page.  (The user can get to this page at any time by issuing the &amp;quot;list ubiquity commands&amp;quot; command.)  HTML tags can be used in both of these strings.&lt;br /&gt;
&lt;br /&gt;
Description is a one-line summary of what the command does, while Help is a longer description that can include examples, caveats, and so on. If your command is simple enough that all you have to say about it fits in one line, it&#039;s OK to use a description alone and leave out the help.&lt;br /&gt;
&lt;br /&gt;
== Sharing it with the World ==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve got our awesome new &amp;quot;date&amp;quot; command, let&#039;s share it with the world. All you have to do is put the javascript file on the web somewhere, and make an html page linking to it with &amp;quot;link rel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;&amp;lt;link rel=&amp;quot;commands&amp;quot; href=&amp;quot;http://path-to-js&amp;quot; name=&amp;quot;Title Goes Here&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anyone with Ubiquity who visits will get a message offering them the choice of subscribing to your command.&lt;br /&gt;
&lt;br /&gt;
[[Image:Subscribe.png]]&lt;br /&gt;
&lt;br /&gt;
If the user chooses to subscribe to a Regular command feed from an untrusted source, they will get a security warning message before they can install the command.  Because Regular Ubiquity command feeds can execute arbitrary javascript with chrome privileges, subscribing to a command from a website means allowing that site full access to do whatever it wants to your browser.  We want to make sure people understand the dangers before subscribing to commands, so we made the warning page pretty scary.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Feed Types ===&lt;br /&gt;
&lt;br /&gt;
Recall that back near the beginning of the tutorial, you set the &amp;quot;feed type&amp;quot; to &amp;quot;Regular&amp;quot;.  As you may have guessed, there&#039;s actually more than one way to write a command feed.  The advantage of Regular feeds is that they let you do whatever you want, so it&#039;s really easy to innovate, but the disadvantages lie in subscribing to misbehaving or malicious code.  You can alternatively write what&#039;s called a &#039;&#039;Locked-Down Feed&#039;&#039;, which is much safer and doesn&#039;t raise a warning page when a user subscribes to it&amp;amp;mdash;but the consequences are that you have less freedom of implementation as a command author.  If you&#039;re interested in learning more about Locked-Down Feeds, check out the [[Labs/Ubiquity/Locked-Down_Feed_Tutorial|Locked-Down Feed Tutorial]].&lt;br /&gt;
&lt;br /&gt;
=== Trust Networks ===&lt;br /&gt;
&lt;br /&gt;
In the future, we&#039;re going to have something set up that we call a &amp;quot;[[Labs/Ubiquity/TrustNetwork|trust network]]&amp;quot;.  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you&#039;ll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they&#039;ll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.&lt;br /&gt;
&lt;br /&gt;
By the way, the reason we call it &amp;quot;subscribing&amp;quot; to a command, rather than &amp;quot;installing&amp;quot; a command, is that if the javascript file changes -- if the site owner adds new commands, removes old commands, or updates existing commands -- all users subscribed to that URL will automatically get the updates.  This will be very convenient for both users and developers, but it will also introduce another type of security risk: just because you decided a command was safe at one point in time doesn&#039;t mean that the command will always remain safe.  For this reason, we&#039;ll need to make sure that the trust network keeps track of when commands have been modified, and notifies users of changes that may make a command unsafe.&lt;br /&gt;
&lt;br /&gt;
== Map Me! Location, Snapshots, and Inserting HTML ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;map&amp;quot; command that comes with Ubiquity is fairly powerful. It&#039;s also fairly complicated&amp;amp;mdash;well, comparatively. It&#039;s still only a couple hundred lines of code. The command, though, can get even more useful. Imagine being able to select some houses on Craigslist, or a list of restaurant names, and Ubiq &amp;quot;map these&amp;quot; to get just the map you want. The concept of &amp;quot;these&amp;quot; puts the power of mashups into the users hands. But I digress. Let&#039;s make a simple command that inserts a map of your current location.&lt;br /&gt;
&lt;br /&gt;
In this command, we use the Google [http://code.google.com/apis/maps/documentation/staticmaps/ static map API] and the Ubiquity function &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; to insert a map of your current location. Ubiquity currently uses the [http://www.maxmind.com/app/api MaxMind] API for trying to guess your location from your IP. That will probably change in the future.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll call this command &amp;lt;code&amp;gt;&amp;quot;map me&amp;quot;&amp;lt;/code&amp;gt; so that it won&#039;t be confused with the standard &amp;lt;code&amp;gt;&amp;quot;map&amp;quot;&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;map me&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _getMapUrl: function() {&lt;br /&gt;
    var loc = CmdUtils.getGeoLocation();&lt;br /&gt;
    var mapUrl = &amp;quot;http://maps.google.com/staticmap?&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var params = {&lt;br /&gt;
      center: loc.lat + &amp;quot;,&amp;quot; + loc.long,&lt;br /&gt;
      size: &amp;quot;500x400&amp;quot;,&lt;br /&gt;
      zoom: 14,&lt;br /&gt;
      key: &amp;quot;ABQIAAAAGZ11mh1LzgQ8-8LRW3wEShQeSuJunOpTb3RsLsk00-MAdzxmXhQoiCd940lo0KlfQM5PeNYEPLW-3w&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    return mapUrl + jQuery.param( params );&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function( pblock ) {&lt;br /&gt;
    var msg = &amp;quot;Inserts a map of your current location: &amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
              &amp;quot;&amp;lt;img src=&#039;${url}&#039;/&amp;gt;&amp;quot;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {url: this._getMapUrl()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function( ) {&lt;br /&gt;
    CmdUtils.getImageSnapshot( this._getMapUrl(), function(imgData) {&lt;br /&gt;
      CmdUtils.setSelection( &amp;quot;&amp;lt;img src=&#039;&amp;quot; + imgData +&amp;quot;&#039;/&amp;gt;&amp;quot;);&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three new things here: &amp;lt;code&amp;gt;CmdUtils.setSelection&amp;lt;/code&amp;gt; to set HTML (yep, it can do that); the use of &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt;; and using &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt; to capture the bits for the image.&lt;br /&gt;
&lt;br /&gt;
I find getting the location&amp;amp;mdash;as imprecise as IP-based location can be&amp;amp;mdash;useful for doing sensible defaults for location-based commands, like Yelp. &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; returns an object which has the following properties: city, state, country, lat, and long.&lt;br /&gt;
&lt;br /&gt;
Why do we need to use &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt;? Because the Google Maps API requires a key that is tied to a particular URL. If we naively inject the image tag into a random web page, the image won&#039;t load because the key doesn&#039;t match that random web page&#039;s URL. Thus, we use the &amp;lt;code&amp;gt;snapshotImage()&amp;lt;/code&amp;gt; function to convert the image into a [http://en.wikipedia.org/wiki/Data:_URI_scheme data url].&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a &amp;lt;code&amp;gt;CmdUtils.snapshotWindow&amp;lt;/code&amp;gt; function, which allows you to get the image data for any tab/window. The function takes a window as the first paramater, and a callback for the second.&lt;br /&gt;
&lt;br /&gt;
= Commands with Arguments =&lt;br /&gt;
&lt;br /&gt;
== Echo ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ll be working towards making some fun and useful commands&amp;amp;mdash;commands that let you control the seething tendrils of the internet with your little pinky. But, let&#039;s start by making a simple command to echo back whatever you type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;echo&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;your shout&amp;quot;}],&lt;br /&gt;
  preview: function previewEcho(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Will echo: &amp;quot;) + args.object.text;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function executeEcho(args) {&lt;br /&gt;
    var msg = args.object.text + &amp;quot;... &amp;quot; + args.object.text + &amp;quot;......&amp;quot;;&lt;br /&gt;
    displayMessage(msg);&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says that the command &amp;quot;echo&amp;quot; takes one argument which is arbitrary text. Whatever text the user enters will get wrapped in an input object and passed into both the preview and execute function.&lt;br /&gt;
&lt;br /&gt;
Try it!  Ubiq &amp;quot;echo hellooooo&amp;quot; and watch what happens.&lt;br /&gt;
&lt;br /&gt;
Ubiquity takes care of parsing the user&#039;s input, so you don&#039;t need to worry about handling prounoun substitution or any of the other natural-language-like features of the Ubiquity parser. Try selecting some text on a page, and Ubiq &amp;quot;echo this&amp;quot;. Ubiquity should now echo the selected text.  &lt;br /&gt;
&lt;br /&gt;
Note that we gave three pieces of information when defining our argument:  its role, its nountype, and its label.  The label is the easiest part: It&#039;s just whatever text you want to have appear in the Ubiquity interface as a prompt for the user.  E.g, if you ubiq &amp;quot;echo&amp;quot;, you will see the label for the argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  echo (your shout)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The roles and the nountypes require some more explanation.  We&#039;ll cover each of them in detail next.&lt;br /&gt;
&lt;br /&gt;
=== Argument Roles ===&lt;br /&gt;
&lt;br /&gt;
Your command can take multiple arguments.  Each one is identified by a &amp;quot;role&amp;quot;.  To understand roles, it helps to think of your command name as a verb, and each argument as a noun.  Remember that Ubiquity&#039;s command line is a pseudo-natural-language environment, so it attempts to be as close to natural language grammar as possible.&lt;br /&gt;
&lt;br /&gt;
For example, if you&#039;ve ever used the &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; command, you know that it takes up to two arguments: a message and a person.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  email message&lt;br /&gt;
  email to person&lt;br /&gt;
  email message to person&lt;br /&gt;
  email to person message&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In grammatical terms, the message argument is the &amp;quot;direct object&amp;quot; of the verb &amp;quot;email&amp;quot;.  The person argument is an indirect object.  We call it the &amp;quot;goal&amp;quot; of the verb.  So if we were writing the email command, we&#039;d define the arguments like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;message&amp;quot;},&lt;br /&gt;
              {role: &amp;quot;goal&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;recipient&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because we give the recipient argument the &amp;quot;goal&amp;quot; role, the Ubiquity parser knows to expect the user to type the word &amp;quot;to&amp;quot;.  When the user enters &amp;quot;email hello to Aza&amp;quot;, the parser knows that the word following &amp;quot;to&amp;quot; -- that is, &amp;quot;Aza&amp;quot; -- should be assigned to the recipient argument.&lt;br /&gt;
&lt;br /&gt;
In our simple &amp;quot;echo&amp;quot; command, we expect the user to type &amp;quot;echo hellooooo&amp;quot; or something like that.  The &amp;quot;hellooooo&amp;quot; is the direct object of the verb &amp;quot;echo&amp;quot;, so we give it the &amp;quot;object&amp;quot; role.  &lt;br /&gt;
&lt;br /&gt;
&amp;quot;Object&amp;quot; is the most common role.  If a command takes only one argument, that argument is usually an &amp;quot;object&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== What Roles Can I Use? ====&lt;br /&gt;
&lt;br /&gt;
* object   (in &amp;quot;echo helloooo&amp;quot;, hello is the object.)&lt;br /&gt;
* goal    (in &amp;quot;email this to brandon&amp;quot;, brandon is the goal.)&lt;br /&gt;
* source   (in &amp;quot;translate this from spanish&amp;quot;, spanish is the source.)&lt;br /&gt;
* location    (in &amp;quot;yelp pizza near boston&amp;quot;, boston is the location.)&lt;br /&gt;
* time    (in &amp;quot;book a flight on thursday&amp;quot;, thursday is the time.)&lt;br /&gt;
* instrument  (in &amp;quot;search monkeys with google&amp;quot;, google is the instrument.)&lt;br /&gt;
* format   (in &amp;quot;check weather in celsius&amp;quot;, celsius is the format.)&lt;br /&gt;
* modifier  (in &amp;quot;get email address for chris&amp;quot;, chris is the modifier.)&lt;br /&gt;
* alias   (in &amp;quot;twitter this as jono&amp;quot;, jono is the alias.)&lt;br /&gt;
&lt;br /&gt;
[https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles More information about these roles].&lt;br /&gt;
&lt;br /&gt;
=== The Arguments Object ===&lt;br /&gt;
&lt;br /&gt;
When your execute method is called, it is passed a single object that encapsulates the values for all arguments.&lt;br /&gt;
&lt;br /&gt;
When your preview method is called, it is passed this object, too.&lt;br /&gt;
&lt;br /&gt;
The object has one attribute corresponding to each role.  In our example above, the command accepts only an object-role argument, so the preview and execute methods get passed an argument with an &amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; attribute.&lt;br /&gt;
&lt;br /&gt;
If we made a command, like email, that takes an object-role argument and a goal-role argument, its preview and execute methods would get passed an argument with &amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;args.goal&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;args.goal&amp;lt;/code&amp;gt;) has several attributes of its own:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  args.object.text    // a string of the input in plain text, without formatting&lt;br /&gt;
  args.object.html    // a string of the input in formatted HTML, including tags&lt;br /&gt;
  args.object.data    // for non-text input types, an arbitrary data object&lt;br /&gt;
  args.object.summary // the HTML string displayed in the suggestion list, abbreviated if long&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our example command only cares about the &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; attribute of the input, because it simply wants plain text.  Often, when the user invokes your command by typing a few short words into the input box, &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.html&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;.summary&amp;lt;/code&amp;gt; will all have exactly the same value, and &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; will be null.  Many, if not most, commands that you write will only care about the text value.  Nevertheless, the other versions of the input data are provided to you in case they differ from &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; and in case your command has a use for them.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Noun Types ==&lt;br /&gt;
&lt;br /&gt;
Noun types specify what &#039;&#039;kind&#039;&#039; of input your command can accept for each one of its arguments.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;echo&amp;quot; command, we wanted the object-role argument to accept any text whatsoever, so for its nountype we passed in the predefined &amp;lt;code&amp;gt;noun_arb_text&amp;lt;/code&amp;gt; object.  This object accepts any arbitrary text as a valid argument and passes it to the command unchanged.&lt;br /&gt;
&lt;br /&gt;
This is OK for very simple commands, like echoing back the user&#039;s input.  But for commands that take structured data, you will want to use more specific nountypes.&lt;br /&gt;
&lt;br /&gt;
For example, if a command can take a date (like the &amp;quot;check calendar&amp;quot; command), you would want to use &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; as the nountype of the argument.  &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; provides several benefits to your command:  it does all of the date parsing for you; it suggests dates that the user might want to enter (for instance, it defaults to today&#039;s date).  And, it lets the parser know that your command takes a date.  This is useful because when the user selects a date on a page and invokes Ubiquity, your command -- along with &amp;quot;check calendar&amp;quot; -- will be one of the top suggestions.&lt;br /&gt;
&lt;br /&gt;
You can write your own noun types -- we&#039;ll get into that later.  For now, let&#039;s take a look at the built-in nountypes that your command can use.  These include:&lt;br /&gt;
&lt;br /&gt;
* noun_arb_text (Arbitrary text)&lt;br /&gt;
* noun_type_language (Name of a human language, e.g. &amp;quot;English&amp;quot;, &amp;quot;Japanese&amp;quot;)&lt;br /&gt;
* noun_type_url (A URL)&lt;br /&gt;
* noun_type_contact (An email address from your address book)&lt;br /&gt;
* noun_type_date (A date, in any format, or a word like &amp;quot;tomorrow&amp;quot;)&lt;br /&gt;
* noun_type_time (A time, in any format)&lt;br /&gt;
* noun_type_percentage&lt;br /&gt;
* noun_type_address&lt;br /&gt;
* noun_type_tab&lt;br /&gt;
* noun_type_searchengine&lt;br /&gt;
* noun_type_tag&lt;br /&gt;
* noun_type_geolocation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are familiar with writing commands, you should check out the [http://hg.toolness.com/ubiquity-firefox/file/6caa9d66b3bb/ubiquity/chrome/content/nlparser/en/nountypes.js nountypes.js], which has the implementation for most of the noun-types.  You can see what noun types are already available for your commands to use, what still needs to be written, and where the existing implementations could use improvement &amp;amp;mdash; and then come [[Labs/Ubiquity#Participation|get involved]] to help us improve them.&lt;br /&gt;
&lt;br /&gt;
=== Regexps as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
If none of the nountypes above is what you&#039;re looking for, there are several ways to define your own.  The simplest is to use a regular expression.  Suppose that (for whatever odd reason) you wanted your command to accept only arguments that begin with the letter N.  The following regexp matches words that start with N:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /^[nN]/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could use it as a noun type, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: /^[nN]/,&lt;br /&gt;
               label: &amp;quot;word that starts with n&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note that you do &#039;&#039;not&#039;&#039; put quotes around the regexp.)&lt;br /&gt;
&lt;br /&gt;
A regexp nountype will reject input that doesn&#039;t match, but it doesn&#039;t know how to help the user by suggesting appropriate input.&lt;br /&gt;
&lt;br /&gt;
=== Lists as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
Suppose you&#039;re writing a command that takes a color as an argument (perhaps it outputs a hexadecimal RGB representation of that color.)  To make a nountype that accepts colors, you can simply pass in an array of strings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  names: [&amp;quot;convert color&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: [&amp;quot;red&amp;quot;, &amp;quot;orange&amp;quot;, &amp;quot;yellow&amp;quot;, &amp;quot;green&amp;quot;, &lt;br /&gt;
                          &amp;quot;blue&amp;quot;, &amp;quot;violet&amp;quot;, &amp;quot;black&amp;quot;, &amp;quot;white&amp;quot;,&lt;br /&gt;
                          &amp;quot;grey&amp;quot;, &amp;quot;brown&amp;quot;, &amp;quot;beige&amp;quot;, &amp;quot;magenta&amp;quot;,&lt;br /&gt;
                          &amp;quot;cerulean&amp;quot;, &amp;quot;puce&amp;quot;],&lt;br /&gt;
               label: &amp;quot;color to convert&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One benefit of using a list is that the parser can use it offer the user suggestions.   If the user enters &amp;quot;get-color bl&amp;quot;, for instance, Ubiquity will be able to suggest &amp;quot;black&amp;quot; and &amp;quot;blue&amp;quot; as the two valid completions based on the input.  This makes list-based nountypes very useful for any command that can accept only a finite set of values.&lt;br /&gt;
&lt;br /&gt;
=== Writing a Noun Type Object ===&lt;br /&gt;
&lt;br /&gt;
Of course, not every type of noun you&#039;d be interested in can be represented&lt;br /&gt;
as a finite list or as a regexp.  If you want to be able to accept or reject input based on some algorithmic test, you can do so by writing a custom JavaScript object that implements a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method (and, optionally, a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; method.)&lt;br /&gt;
&lt;br /&gt;
There is an example of how to do this in the section on the tab commands, below.&lt;br /&gt;
&lt;br /&gt;
== Insert Email: the Contact noun type ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s take a look at one of the built-in noun-types: &amp;lt;code&amp;gt;noun_type_contact&amp;lt;/code&amp;gt;. This lets Ubiquity know to expect a person (either by name or email address). By using the noun-type, Ubiquity will also autocomplete to known people while the user is entering the command. This is what the built-in Ubiquity command &amp;quot;email&amp;quot; uses.&lt;br /&gt;
&lt;br /&gt;
At the moment, Ubiquity figures out what people you know through reading your Gmail contacts. In this prototyped version, you&#039;ll need to use Gmail and be logged in for for Ubiquity to know who you know. Eventually, we&#039;d like to be able to interface with all major web-mail sites, as well as desktop software like Thunderbird.&lt;br /&gt;
&lt;br /&gt;
Enough rambling. It&#039;s time for a command. I constantly find that I need to fetch someone&#039;s email address to paste into a text field because I don&#039;t know it off-hand. This command solves that by letting you insert someone&#039;s email address using autocomplete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;insert email&amp;quot;,&lt;br /&gt;
  arguments: {modifier: noun_type_contact},&lt;br /&gt;
  preview: &amp;quot;Inserts someone&#039;s email address by name.&amp;quot;,&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    CmdUtils.setSelection(args.modifier.html);&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To try this out, Ubiq &amp;quot;insert email for &amp;quot; and then the first few letters of someone you email often.&lt;br /&gt;
&lt;br /&gt;
=== Shorter Argument Declarations ===&lt;br /&gt;
&lt;br /&gt;
Notice that we used a shortcut for declaring the arguments.  In the long form, we would have had to say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;modifier&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;contact&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but if we don&#039;t care about specifying extra parameters for the argument, we can get away with using a single object for &amp;quot;arguments&amp;quot;, with the roles as the property names, and the nountypes as the property values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or with label using &amp;lt;code&amp;gt;&amp;quot;_&amp;quot;&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;&amp;quot; &amp;quot;&amp;lt;/code&amp;gt;) as separator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier_contact: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we had several arguments, we could say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {object: noun_arb_text, modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you only have &amp;quot;object&amp;quot; and don&#039;t need to specify a label...:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  argument: noun_arb_text&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aza writes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This one command sums up what I love about Ubiquity. In 8 lines of code, I can &lt;br /&gt;
fundamentally enhance the browser&#039;s functionality. Doing the same thing using &lt;br /&gt;
a normal Firefox extension methodology takes pages and pages of code&amp;amp;mdash;and  the interface would take more thought still. Doing the same thing using a bookmarklet would require a server-side component (to get around cross-site Ajax request ban) as well as forcing the user to give up their email password.&lt;br /&gt;
&lt;br /&gt;
Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TinyURL: Network Calls and jQuery (and the URL noun type)==&lt;br /&gt;
&lt;br /&gt;
Often while writing emails, I&#039;ll discover that I&#039;ve pasted in a URL long enough to be used for unfortunate analogies. I&#039;d like to be able to quickly turn that into a [http://en.wikipedia.org/wiki/Tinyurl TinyURL]&amp;amp;mdash;but the process of making a TinyURL involves lots of fiddly steps. Ubiquity to the rescue.&lt;br /&gt;
&lt;br /&gt;
Because we include [http://en.wikipedia.org/wiki/jQuery jQuery] with Ubiquity, it is simple to perform Ajax calls as well as parse returning data. TinyUrl.com provides an easy to use RESTful API where you pass a URL and it returns its shortened form. We use that API in this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;tinyurl&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_type_url,&lt;br /&gt;
               label: &amp;quot;url to shorten&amp;quot;}],&lt;br /&gt;
  preview: &amp;quot;Replaces the selected URL with a TinyUrl.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var baseUrl = &amp;quot;http://tinyurl.com/api-create.php&amp;quot;;&lt;br /&gt;
    var params = {url: arguments.object.text};&lt;br /&gt;
    jQuery.get( baseUrl, params, function( tinyUrl ) {&lt;br /&gt;
      CmdUtils.setSelection( tinyUrl );&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is a useful nountype because it defaults to the URL of the page that you are currently on.  If that is in fact the URL that the user wants, then they don&#039;t have to type it or even select it.&lt;br /&gt;
&lt;br /&gt;
jQuery is a powerful tool. With it, you can fairly effortlessly cherry-pick the data you need from RSS feeds, XML, and all sorts of other data formats. It also makes doing in-preview animations a breeze.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Twitter: Putting It All Together =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve now covered everything we need to cover in order to write a command that allows us to [http://en.wikipedia.org/wiki/Twitter Twitter] from Ubiquity.  The code below is the actual source code of the Twitter command as it appears in Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
Many thanks to [http://theunfocused.net/moz/ubiquity/verbs/ Blair McBride] for writing this command.  The source code is a bit more intricate than anything we&#039;ve seen so far, but it&#039;s built using exactly the same basic pieces -- and demonstrates nearly all of those pieces in action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const TWITTER_STATUS_MAXLEN = 140;&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;twitter&amp;quot;, &amp;quot;tweet&amp;quot;, &amp;quot;share using twitter&amp;quot;],&lt;br /&gt;
  arguments: [&lt;br /&gt;
    {role: &amp;quot;object&amp;quot;, label: &#039;status&#039;, nountype: noun_arb_text},&lt;br /&gt;
    {role: &amp;quot;alias&amp;quot;, nountype: noun_type_twitter_user}&lt;br /&gt;
  ],&lt;br /&gt;
  icon: &amp;quot;http://twitter.com/favicon.ico&amp;quot;,&lt;br /&gt;
  description:&lt;br /&gt;
  &amp;quot;Sets your Twitter status to a message of at most 160 characters.&amp;quot;,&lt;br /&gt;
  help: (&amp;quot;You&#039;ll need a &amp;lt;a href=\&amp;quot;http://twitter.com\&amp;quot;&amp;gt;Twitter account&amp;lt;/a&amp;gt;,&amp;quot; +&lt;br /&gt;
         &amp;quot; obviously.  If you&#039;re not already logged in&amp;quot; +&lt;br /&gt;
         &amp;quot; you&#039;ll be asked to log in.&amp;quot;),&lt;br /&gt;
  preview: function(previewBlock, args) {&lt;br /&gt;
    var statusText = (args.object ? args.object.text : &#039;&#039;);&lt;br /&gt;
    var usernameText = &amp;quot;&amp;quot;;&lt;br /&gt;
    if (args.alias) {&lt;br /&gt;
      usernameText = args.alias.text;&lt;br /&gt;
    } else if (args.as) {&lt;br /&gt;
      usernameText = args.as.text;&lt;br /&gt;
    }&lt;br /&gt;
    var previewTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;div class=&#039;twitter&#039;&amp;gt;&amp;quot;+_(&amp;quot;Updates your Twitter status ${username} to:&amp;quot;)+&amp;quot;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      &amp;quot;&amp;lt;b class=&#039;status&#039;&amp;gt;${status}&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      _(&amp;quot;Characters remaining: &amp;lt;b&amp;gt;${chars}&amp;lt;/b&amp;gt;&amp;quot;) +&lt;br /&gt;
      &amp;quot;&amp;lt;p&amp;gt;&amp;lt;small&amp;gt;&amp;quot;+_(&amp;quot;tip: tweet @mozillaubiquity for help&amp;quot;)+&amp;quot;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
    var truncateTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;strong&amp;gt;&amp;quot;+_(&amp;quot;The last &amp;lt;b&amp;gt;${truncate}&amp;lt;/b&amp;gt; characters will be truncated!&amp;quot;)+&amp;quot;&amp;lt;/strong&amp;gt;&amp;quot;);&lt;br /&gt;
    var previewData = {&lt;br /&gt;
      status: &amp;lt;&amp;gt;{statusText}&amp;lt;/&amp;gt;.toXMLString(),&lt;br /&gt;
      username: usernameText &amp;amp;&amp;amp; _(&amp;quot;(For user &amp;lt;b&amp;gt;${usernameText}&amp;lt;/b&amp;gt;)&amp;quot;),&lt;br /&gt;
      chars: TWITTER_STATUS_MAXLEN - statusText.length&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var previewHTML = CmdUtils.renderTemplate(&lt;br /&gt;
                        CmdUtils.renderTemplate(previewTemplate, previewData),&lt;br /&gt;
                        {usernameText:usernameText});&lt;br /&gt;
&lt;br /&gt;
    if (previewData.chars &amp;lt; 0) {&lt;br /&gt;
      var truncateData = {&lt;br /&gt;
        truncate: 0 - previewData.chars&lt;br /&gt;
      };&lt;br /&gt;
&lt;br /&gt;
      previewHTML += CmdUtils.renderTemplate(truncateTemplate, truncateData);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    previewBlock.innerHTML = previewHTML;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    var statusText = args.object.text;&lt;br /&gt;
    if(statusText.length &amp;lt; 1) {&lt;br /&gt;
      this._show(_(&amp;quot;requires a status to be entered&amp;quot;));&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var updateUrl = &amp;quot;https://twitter.com/statuses/update.json&amp;quot;;&lt;br /&gt;
    var updateParams = {&lt;br /&gt;
      source: &amp;quot;ubiquity&amp;quot;,&lt;br /&gt;
      status: statusText&lt;br /&gt;
      //dont cut the input since sometimes, the user selects a big url,&lt;br /&gt;
      //and the total lenght is more than 140, but tinyurl takes care of that&lt;br /&gt;
    };&lt;br /&gt;
    var me = this;&lt;br /&gt;
&lt;br /&gt;
    function sendMessage() {&lt;br /&gt;
      jQuery.ajax({&lt;br /&gt;
        type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
        url: updateUrl,&lt;br /&gt;
        data: updateParams,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        error: function() {&lt;br /&gt;
          me._show(_(&amp;quot;error - status not updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        success: function() {&lt;br /&gt;
          me._show(/^d /.test(statusText)&lt;br /&gt;
                   ? _(&amp;quot;direct message sent&amp;quot;)&lt;br /&gt;
                   : _(&amp;quot;status updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        username: login.username,&lt;br /&gt;
        password: login.password&lt;br /&gt;
      });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var login;&lt;br /&gt;
    var alias = args.alias;&lt;br /&gt;
    if (alias &amp;amp;&amp;amp; alias.text &amp;amp;&amp;amp; alias.data) {&lt;br /&gt;
      login = alias.data;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    } else {&lt;br /&gt;
      login = {username: null,&lt;br /&gt;
               password: null};&lt;br /&gt;
      if (alias &amp;amp;&amp;amp; alias.text)&lt;br /&gt;
        login.username = alias.text;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  _show: function(txt){&lt;br /&gt;
    displayMessage({icon: this.icon, title: this.name, text: txt});&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Switching Tabs =&lt;br /&gt;
&lt;br /&gt;
The final command in this tutorial is for switching between tabs. The end goal is this: type a few keys to that matches the title of an open tab (in any window), hit return, and you&#039;ve switched to that tab.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: Writing your own Noun-Types ===&lt;br /&gt;
&lt;br /&gt;
A noun-type needs to only have two things: A &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; function.  It can optionally also have a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
The label is what shows up when the command prompts for input. Suggest returns a list of input objects, each one containing the name of a matching tab. We&#039;re using [http://developer.mozilla.org/en/docs/FUEL FUEL] to interact with the browser, which is where the &amp;quot;Application&amp;quot; variable comes from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_tab = {&lt;br /&gt;
  label: &amp;quot;tab name&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
  // Returns all tabs from all windows.&lt;br /&gt;
  getTabs: function nt_tab_getTabs() {&lt;br /&gt;
    return [tab&lt;br /&gt;
            for each (win in Application.windows)&lt;br /&gt;
            for each (tab in win.tabs)];&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  suggest: function nt_tab_suggest(text, html, callback, selectionIndices) {&lt;br /&gt;
    var textLC = text.toLowerCase();&lt;br /&gt;
    return [CmdUtils.makeSugg(tab.document.title, null, tab)&lt;br /&gt;
            for each (tab in this.getTabs())&lt;br /&gt;
            if (~tab.document.title.toLowerCase().indexOf(textLC))];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The suggest method of a noun type always gets passed both text and html.  If the input is coming from a part of a web page that the user has selected, these&lt;br /&gt;
values can be different: they are both strings, but the html value contains markup tags while the text value does not. The Tab noun type only cares about the plain text of the tab name, so we ignore the value of html.&lt;br /&gt;
&lt;br /&gt;
The callback argument is for use by nountypes that need to run asynchronously, i.e. because they need to do network calls to generate suggestions.  The callback is a function; instead of returning a list of suggestions right away, an asynchronous noun type can call the callback with each suggestion it generates.  More on this later; the tab noun type generates all its suggestions right away, so it just returns them instead of using the callback.&lt;br /&gt;
&lt;br /&gt;
We use the convenience function &amp;lt;code&amp;gt;CmdUtils.makeSugg()&amp;lt;/code&amp;gt; to generate an&lt;br /&gt;
input object of the type that the Ubiquity parser expects.  The full signature of this function is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSugg(text, html, data, score, selectionIndices);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It requires at least one of &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; if you want to skip &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the text or html input is very long, &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; generates a summary for us, and puts it in the &amp;lt;code&amp;gt;summary&amp;lt;/code&amp;gt; attribute of the input object.&lt;br /&gt;
&lt;br /&gt;
We could have accomplished mostly the same thing without calling &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; by returning a list of anonymous objects like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ text: tabName,&lt;br /&gt;
  html: Utils.escapeHtml(tabName),&lt;br /&gt;
  data: tab,&lt;br /&gt;
  summary: Utils.escapeHtml(tabName) };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input objects that our &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method generates are the same objects that will eventually get passed in to the &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; methods of any commands that use this noun type.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: The Command ===&lt;br /&gt;
&lt;br /&gt;
Now that we are armed with the tab noun-type, it is easy to make the tab-switching command. Again, we use FUEL to focus the selected tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;switch tab&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_tab},&lt;br /&gt;
&lt;br /&gt;
  execute: function tab_execute(args) {&lt;br /&gt;
    // must be delayed because Ubiquity restores the focus on close&lt;br /&gt;
    Utils.setTimeout(function delayedFocus() {&lt;br /&gt;
      var tab = args.object.data;&lt;br /&gt;
      tab._window._window.focus();&lt;br /&gt;
      tab.focus();&lt;br /&gt;
    }, 99);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  preview: function tab_preview(pblock, args) {&lt;br /&gt;
    var tabName = args.object.text;&lt;br /&gt;
    if (tabName) {&lt;br /&gt;
      var msg = &amp;quot;Changes to &amp;lt;strong&amp;gt;${tab}&amp;lt;/strong&amp;gt; tab.&amp;quot;;&lt;br /&gt;
      pblock.innerHTML = _(msg, {tab: tabName});&lt;br /&gt;
    }&lt;br /&gt;
    else pblock.innerHTML = _(&amp;quot;Switch to a tab by name.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Development Hints =&lt;br /&gt;
&lt;br /&gt;
You now know all you need to know to get started developing useful Ubiquity commands of your own.&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous tips that didn&#039;t fit elsewhere on this page, that may make development easier for you.&lt;br /&gt;
&lt;br /&gt;
== The Source Code of Built-In Commands ==&lt;br /&gt;
&lt;br /&gt;
Looking at the source code of built-in commands and built-in noun types can be a very useful aid to development.  If you have the source checkout of Ubiquity (see [Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial | the development tutorial] to find out how to get this), the source code can be found in the files:&lt;br /&gt;
&lt;br /&gt;
 ubiquity/standard-feeds/&lt;br /&gt;
 ubiquity/builtin-feeds/builtincmds.js&lt;br /&gt;
 ubiquity/modules/nountypes.js&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a checkout of the source code, you can view the latest version on the web here:&lt;br /&gt;
&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/standard-feeds/ standard-feeds]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/builtin-feeds/builtincmds.js builtincmds.js]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/modules/nountypes.js nountypes.js]&lt;br /&gt;
&lt;br /&gt;
== Interacting with Other Extensions ==&lt;br /&gt;
&lt;br /&gt;
http://img363.imageshack.us/img363/1906/picture7cm5.png&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t much to say here besides that it&#039;s easy. For example, here&#039;s a command (thanks to [http://foyrek.com/lyrics.html Abimanyu Raja] for writing this code) that finds the lyrics for a song. You can simply Ubiq something like &amp;quot;get lyrics for wild international&amp;quot; but the command will also interface with the FoxyTunes extension (if it is installed) and add the currently playing song to the suggestion list. Interfacing with other extensions, too, is easy because you can view the source code for every Firefox extension.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_song = {&lt;br /&gt;
  label: &amp;quot;song name&amp;quot;,&lt;br /&gt;
  suggest: function nt_song_suggest(text) {&lt;br /&gt;
    var suggestions = [CmdUtils.makeSugg(text)];&lt;br /&gt;
    var win = Utils.currentChromeWindow;&lt;br /&gt;
    if (&amp;quot;foxytunesGetCurrentTrackTitle&amp;quot; in win)&lt;br /&gt;
      suggestions.push(CmdUtils.makeSugg(win.foxytunesGetCurrentTrackTitle()));&lt;br /&gt;
    return suggestions;&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;get lyrics&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_song},&lt;br /&gt;
  description: &amp;quot;Searches for lyrics of the song.&amp;quot;,&lt;br /&gt;
  preview: function gl_preview(pblock, {object: {text}}) {&lt;br /&gt;
    if (!text) {&lt;br /&gt;
      this.previewDefault(pblock);&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Searches for the lyrics of &amp;lt;b&amp;gt;${query}&amp;lt;/b&amp;gt;.&amp;quot;,&lt;br /&gt;
                         {query: Utils.escapeHtml(text)});&lt;br /&gt;
  },&lt;br /&gt;
  execute: function gl_execute(args) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      &amp;quot;http://www.google.com/search?q=&amp;quot; +&lt;br /&gt;
      encodeURIComponent(args.object.text + _(&amp;quot; lyrics&amp;quot;)));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing Asynchronous Noun Suggestions ==&lt;br /&gt;
&lt;br /&gt;
The noun types we&#039;ve seen so far in this tutorial have all worked synchronously, returning their suggestions right away. However, Ubiquity also supports asynchronous noun suggestions. These are useful for when a noun type needs to do some potentially time-consuming work before it can make suggestions &amp;amp;mdash; most commonly when it needs to call an external service.&lt;br /&gt;
&lt;br /&gt;
Implementing asynchronous suggestions is simple. Whenever the Ubiquity parser calls a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function, it includes a callback function that may be used to send suggestions back to the parser as they become available. In the most typical case, the noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function makes an AJAX request, invoking the parser&#039;s callback function from within the callback function for the AJAX request.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example: a noun type that suggests [http://www.freebase.com/ Freebase] topics based on the text the user has typed or selected, and a barebones &amp;lt;code&amp;gt;freebase-lookup&amp;lt;/code&amp;gt; command that uses the noun type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_freebase_topic = {&lt;br /&gt;
  name: &amp;quot;Freebase topic&amp;quot;,&lt;br /&gt;
  label: &amp;quot;topic&amp;quot;,&lt;br /&gt;
  suggest: function freebase_topic_suggest(text, html, callback) {&lt;br /&gt;
    return [&lt;br /&gt;
      CmdUtils.makeSugg(text),&lt;br /&gt;
      $.ajax({&lt;br /&gt;
        url: &amp;quot;http://www.freebase.com/api/service/search&amp;quot;,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        data: {prefix: text, limit: 5},&lt;br /&gt;
        success: function suggestTopics(response) {&lt;br /&gt;
          if (response.status === &amp;quot;200 OK&amp;quot;)&lt;br /&gt;
            callback([CmdUtils.makeSugg(result.name, result.name, result)&lt;br /&gt;
                      for each (result in response.result)]);&lt;br /&gt;
        },&lt;br /&gt;
      })];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;lookup on freebase&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_freebase_topic},&lt;br /&gt;
  preview: function preview(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _((&amp;quot;Go to the Freebase topic page for &amp;quot; +&lt;br /&gt;
                          &amp;quot;{if text}${text}{else}any topic{/if}.&amp;quot;),&lt;br /&gt;
                         args.object);&lt;br /&gt;
  },&lt;br /&gt;
  execute: function goToFreebase({object: {text, data}}) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      text&lt;br /&gt;
      ? (data&lt;br /&gt;
         ? &amp;quot;http://www.freebase.com/view&amp;quot; + data.id&lt;br /&gt;
         : (&amp;quot;http://www.freebase.com/search?query=&amp;quot; +&lt;br /&gt;
            encodeURIComponent(text)))&lt;br /&gt;
      : &amp;quot;http://www.freebase.com/&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few notes:&lt;br /&gt;
&lt;br /&gt;
* A noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function typically returns an empty array when it intends to make asynchronous suggestions, but it can return one or more suggestions synchronously if it has them available.&lt;br /&gt;
* Because the work being done to generate asynchronous suggestions is generally somewhat expensive, and because a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function may be called for every keystroke the user makes, you should probably consider implementing a delay before starting the work and/or caching the work at some level. Ubiquity currently leaves this up to each noun type individually.&lt;br /&gt;
* A much more robust implementation of Freebase-derived noun types can be found [http://graynorton.com/ubiquity/freebase-nouns.html here].&lt;br /&gt;
&lt;br /&gt;
== Running on page load, Ubiquity load and startup ==&lt;br /&gt;
&lt;br /&gt;
Commands aren&#039;t the only thing you can put in a command feed.  You can also include functions you want to be run automatically at page-load time and at Firefox startup time.&lt;br /&gt;
&lt;br /&gt;
In order to run some code on page load, you simply have to prefix your function with &amp;lt;code&amp;gt;pageLoad_&amp;lt;/code&amp;gt;. For example, if you want to say &amp;quot;Hi&amp;quot; every time a page is loaded, your code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pageLoad_hi() {&lt;br /&gt;
  displayMessage(&amp;quot;hi&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you modify the function and want to see the changes, remember to first invoke Ubiquity. Although your function like above, might not be a Ubiquity command, this is necessary to refresh the cached code.&lt;br /&gt;
&lt;br /&gt;
Similarly, functions prefixed by &amp;lt;code&amp;gt;ubiquityLoad_&amp;lt;/code&amp;gt; are called whenever Ubiquity is initialized for a main window of Firefox. This is useful when you want to interact with the Ubiquity interface itself, or run some code whenever a new window is opened.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function ubiquityLoad_googleAsDefaultEntry(gUbiquity, mainWindow) {&lt;br /&gt;
  gUbiquity.textBox.value = &amp;quot;google&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if you want to run some code everytime Firefox starts up, you just have to prefix the function with &amp;lt;code&amp;gt;startup_&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The awesome thing about these functions is the ability to develop whole Firefox extensions (that require minimal UI) as Ubiquity plugins in lesser lines of code. You don&#039;t need to worry about chrome.manifest or install.rdf. Another added benefit is that you never have to restart your Firefox during development unless of course, you are running code on Firefox startup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://img388.imageshack.us/img388/3086/picture5eo9.png&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code for [http://foyrek.com/keyscape.js Keyscape] which is a Ubiquity command that makes use of &amp;lt;code&amp;gt;pageLoad&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;startup&amp;lt;/code&amp;gt; to recreate the functionality of the [https://addons.mozilla.org/en-US/firefox/addon/339 Search Keys extension] by Jesse Ruderman. In line with Ubiquity&#039;s aim to let you do things quicker using your keyboard, this command lets you go to search results on Google by just pressing a number. It&#039;ll add hints to show the number of each link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//A lot of this code is borrowed from the Search Keys extension&lt;br /&gt;
//Many thanks to Jeese Ruderman&lt;br /&gt;
&lt;br /&gt;
function startup_keyscape() {&lt;br /&gt;
  window.addEventListener(&amp;quot;keydown&amp;quot;, keyscape_down, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function pageLoad_keyscape(doc){&lt;br /&gt;
&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
  //If we are on about: or chrome://, just return&lt;br /&gt;
  if(uri.scheme != &amp;quot;http&amp;quot;)&lt;br /&gt;
    return;&lt;br /&gt;
&lt;br /&gt;
  //Check if the page we are on is google&lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	      		    &lt;br /&gt;
    for(var num=1; num&amp;lt;=10; num++){&lt;br /&gt;
&lt;br /&gt;
      var link = jQuery(doc.body).find(&#039;a.l&#039;)[num-1];&lt;br /&gt;
      &lt;br /&gt;
      if( link ){&lt;br /&gt;
&lt;br /&gt;
        var hint = doc.createElementNS(&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;, &amp;quot;span&amp;quot;);&lt;br /&gt;
        hint.style.color = &amp;quot;blue&amp;quot;;&lt;br /&gt;
        hint.style.background = &amp;quot;white&amp;quot;;&lt;br /&gt;
        hint.style.padding = &amp;quot;1px 2px 1px 2px&amp;quot;;&lt;br /&gt;
        hint.style.marginLeft = &amp;quot;.5em&amp;quot;;&lt;br /&gt;
        hint.appendChild(doc.createTextNode(num == 10 ? 0 : num));&lt;br /&gt;
        link.parentNode.insertBefore(hint, link.nextSibling);&lt;br /&gt;
      }  		&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_isGoogle(uri){&lt;br /&gt;
  return uri.host.indexOf(&amp;quot;google&amp;quot;) != -1 &lt;br /&gt;
	 &amp;amp;&amp;amp; (uri.path.substr(0,8) == &amp;quot;/search?&amp;quot; &lt;br /&gt;
         || uri.path.substr(0,8) == &amp;quot;/custom?&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_down(event){&lt;br /&gt;
&lt;br /&gt;
  var doc =  Application.activeWindow.activeTab.document;	&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
 &lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	&lt;br /&gt;
   var key = parseInt(event.keyCode || event.charCode);	&lt;br /&gt;
   var num;&lt;br /&gt;
	&lt;br /&gt;
   if(48 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 57) //number keys&lt;br /&gt;
     num = key - 48;&lt;br /&gt;
   else if(96 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 105) //numeric keypad with numlock on&lt;br /&gt;
     num = key - 96;&lt;br /&gt;
   else&lt;br /&gt;
     return;&lt;br /&gt;
&lt;br /&gt;
   //Don&#039;t do anything if we are in a textbox&lt;br /&gt;
   //or some other related elements&lt;br /&gt;
   var elt = window.document.commandDispatcher.focusedElement;&lt;br /&gt;
   &lt;br /&gt;
   if (elt) {&lt;br /&gt;
     var ln = new String(elt.localName).toLowerCase();&lt;br /&gt;
     if (ln == &amp;quot;input&amp;quot; || ln == &amp;quot;textarea&amp;quot; || ln == &amp;quot;select&amp;quot; || ln == &amp;quot;isindex&amp;quot;)&lt;br /&gt;
        return;&lt;br /&gt;
   }&lt;br /&gt;
    &lt;br /&gt;
   //Get the link url from the search results page&lt;br /&gt;
   var url_dest = jQuery(doc.body).find(&#039;a.l&#039;).eq(num-1).attr(&#039;href&#039;);&lt;br /&gt;
   &lt;br /&gt;
   if(event.altKey){&lt;br /&gt;
     //Open in new tab&lt;br /&gt;
     Application.activeWindow.open(Utils.url(url_dest));&lt;br /&gt;
   }else{&lt;br /&gt;
     //Open in same tab&lt;br /&gt;
     doc.location.href = url_dest;&lt;br /&gt;
   }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Ubiquity does indeed become ubiquitous, a lot of extensions can be re-written as Ubiquity commands. This is much nicer for the end-user, as well, because the Ubiquity command installation process is a lot easier.&lt;br /&gt;
&lt;br /&gt;
In the future, Ubiquity is also likely to have the ability to convert your Ubiquity commands into proper Firefox extensions. Look [http://labs.toolness.com/trac/ticket/3 here] to check on the progress of this functionality.&lt;br /&gt;
&lt;br /&gt;
== Persistent Storage ==&lt;br /&gt;
Some commands may want to store data that persist even after closing Firefox. &lt;br /&gt;
Meet &amp;lt;code&amp;gt;Bin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var gId = 42; // used for avoiding needless preview updates when typing&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;memo&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Lets you jot a memo for the page.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  argument: noun_arb_text,&lt;br /&gt;
  execute: function memo_execute({object: {html}}) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]() || [];&lt;br /&gt;
    list.push(html);&lt;br /&gt;
    Bin[href](list);&lt;br /&gt;
    gId = +new Date;&lt;br /&gt;
  },&lt;br /&gt;
  preview: function memo_preview(pb) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]();&lt;br /&gt;
    if (!list) {&lt;br /&gt;
      pb.innerHTML =&lt;br /&gt;
        &amp;lt;&amp;gt;No memos taken for: &amp;lt;small&amp;gt;&amp;lt;code&amp;gt;{href}&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/&amp;gt;;&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    if (pb.ownerDocument.getElementById(gId)) return;&lt;br /&gt;
    var ol = CmdUtils.previewList(pb, list, function deleteMemo(i, ev) {&lt;br /&gt;
      $(ev.target).closest(&amp;quot;li&amp;quot;).slideUp();&lt;br /&gt;
      list.splice(i, 1);&lt;br /&gt;
      Bin[href](list.length ? list : null);&lt;br /&gt;
      gId = +new Date;&lt;br /&gt;
    });&lt;br /&gt;
    ol.id = gId;&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;list memos&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Opens all memos you&#039;ve taken in a new tab.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  execute: function list_memos_execute() {&lt;br /&gt;
    var htm = +Bin + &amp;quot; page(s)&amp;lt;dl&amp;gt;&amp;quot;, {escapeHtml} = Utils;&lt;br /&gt;
    for each (var [url, memos] in Bin) {&lt;br /&gt;
      htm += &amp;quot;&amp;lt;dt&amp;gt;&amp;quot; + escapeHtml(url) + &amp;quot;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;ol&amp;gt;&amp;quot;;&lt;br /&gt;
      for each (var memo in memos) htm += &amp;quot;&amp;lt;li&amp;gt;&amp;quot; + memo + &amp;quot;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
      htm += &amp;quot;&amp;lt;/ol&amp;gt;&amp;lt;/dd&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    Utils.openUrlInBrowser(&amp;quot;data:text/html,&amp;quot; + encodeURI(htm + &amp;quot;&amp;lt;/dl&amp;gt;&amp;quot;));&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details, see the bottom of [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/feedmanager.js FeedManager] documentation.&lt;br /&gt;
&lt;br /&gt;
== Firebug ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity automatically enables Chrome Errors and Warnings on startup so that errors in your code appear in the Firebug console. Just use &amp;lt;tt&amp;gt;CmdUtils.log()&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;console.log()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Where To Go From Here =&lt;br /&gt;
&lt;br /&gt;
Take a look at Ubiquity&#039;s reference documentation for the &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils]&amp;lt;/tt&amp;gt; namespaces.&lt;br /&gt;
&lt;br /&gt;
If you have any questions or comments, feel free to join us on IRC at &amp;lt;tt&amp;gt;#ubiquity&amp;lt;/tt&amp;gt; on &amp;lt;tt&amp;gt;irc.mozilla.org&amp;lt;/tt&amp;gt;, as well as the [http://groups.google.com/group/ubiquity-firefox Ubiquity Google Group].&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
To reiterate a point I made before: Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web. You are one of those agents.&lt;br /&gt;
&lt;br /&gt;
Now, go forth and create.&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=241900</id>
		<title>Labs/Ubiquity/Ubiquity 0.5 Author Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=241900"/>
		<updated>2010-07-29T02:27:46Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Echo */ arguments -&amp;gt; args&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]].&lt;br /&gt;
&lt;br /&gt;
Author: Aza Raskin, Blair McBride, Abimanyu Raja, Jono DiCarlo, Atul Varma&lt;br /&gt;
&lt;br /&gt;
= The Ubiquity version 0.5 Command Tutorial =&lt;br /&gt;
&lt;br /&gt;
The great power of Ubiquity&amp;amp;mdash;from a developer standpoint&amp;amp;mdash;is how easy it is to create commands. With only a couple of lines of Javascript, Ubiquity enables even casual web developers to drastically enhance the features of the browser. From an 8-line command to insert a contact&#039;s email address in any text field, to a 50-line Twitter integration, this tutorial walks you through the process of being generative with Ubiquity.&lt;br /&gt;
&lt;br /&gt;
The rest of this page documents the command developer API as it stands frozen in version 0.5.&lt;br /&gt;
&lt;br /&gt;
If you want the bleeding-edge command developer API (which includes any new features that may have been added to the Ubiquity source code in HG but not yet included in a release), then that&#039;s [[Labs/Ubiquity/Ubiquity_Source_Tip_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
If you want the old command developer API, as it stood in Ubiquity 0.1 (not recommended), that&#039;s [[Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
== Real Time Development ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity doesn&#039;t require you to restart Firefox as you develop. Restarting is a drastic measure, and we want none of it. Instead, Ubiquity reloads the commands every time it is summoned. When you are using the built-in editor then you don&#039;t even need to save!&lt;br /&gt;
&lt;br /&gt;
To open the Ubiquity command editor, summon Ubiquity (control/alt + space) and use the &amp;quot;open command editor&amp;quot; command. Throughout this tutorial, when we want you to run a command in Ubiquity, we&#039;ll say &#039;&#039;&#039;Ubiq&#039;&#039;&#039; it. For instance, to open the editor, just Ubiq &amp;quot;open command editor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the following examples, just type in this editor. Updates happen the next time you summon Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Choices, Choices... ==&lt;br /&gt;
&lt;br /&gt;
You may notice a drop-down menu mentioning something about a &amp;quot;feed type&amp;quot; just above the editing field in the command editor:&lt;br /&gt;
&lt;br /&gt;
http://www.toolness.com/images/20090318121423.jpg&lt;br /&gt;
&lt;br /&gt;
For now, just make sure this drop-down is set to &amp;quot;Regular&amp;quot;.  We&#039;ll tell you more about what this means later.&lt;br /&gt;
&lt;br /&gt;
== Hello World: The First Command ==&lt;br /&gt;
&lt;br /&gt;
=== Just a Message: As Simple as it Gets ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start with the standard programing trope: printing &amp;quot;Hello, World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the command editor type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try Ubiq-ing &amp;quot;say hello&amp;quot;. You&#039;ll see that &amp;quot;Hello, World!&amp;quot; is immediately displayed on the screen. If you are on Mac OSX with [http://en.wikipedia.org/wiki/Growl_(software) Growl] installed the message will appear as a Growl notification. If you are on Windows, then it will appears as a standard &amp;quot;toaster&amp;quot; notification in the bottom right-hand corner of the screen.&lt;br /&gt;
&lt;br /&gt;
http://farm3.static.flickr.com/2479/3651542339_022e4aa4c4.jpg&lt;br /&gt;
&lt;br /&gt;
http://img517.imageshack.us/img517/7726/picture2vx2.png&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 8.04 (Hardy Heron) this appears thus:&lt;br /&gt;
&lt;br /&gt;
http://img293.imageshack.us/img293/7746/ubiqubuntuhelloworldeq9.png&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have Growl installed on OSX, or aren&#039;t on a Windows XP/Vista or Ubuntu Hardy, then you won&#039;t get any sort of notification. That&#039;s something to be [http://labs.toolness.com/trac/ticket/19 worked on] in future releases of Ubiquity.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils.CreateCommand ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; is a namespace which contains all the functions you need to create commands.  Commands are created by making an object and passing it to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.  In Javascript, inline curly braces mean &amp;quot;new object&amp;quot;, so this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function () { //etc }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
means &amp;quot;Make an object with two attributes, &#039;names&#039; and &#039;execute&#039;.&amp;quot;  This object is then passed as the argument to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== names ===&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; and &#039;execute&#039; are the only two mandatory attributes for your command object.  &#039;names&#039; specifies what the command is called, and &#039;execute&#039; specifies what it does.  There are plenty of other attributes that you can specify, but they are all optional.&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; is always an array (thus the square brackets).  In the case of this command we provided only one name, &amp;quot;hello world&amp;quot;.  But we could have provided as many names as we wanted.  For instance, if we had said:&lt;br /&gt;
&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
then &amp;quot;say hello&amp;quot; would be the normal name of the command, but Ubiquity would also recognize &amp;quot;greet&amp;quot; as a synonym or alias for the command.&lt;br /&gt;
&lt;br /&gt;
=== execute ===&lt;br /&gt;
&lt;br /&gt;
&#039;execute&#039; is always a function.  When the user executes your command, this is the function that will be run.  It can do pretty much anything you want -- or at least, anything you know how to write in JavaScript.&lt;br /&gt;
&lt;br /&gt;
In the example above, we simply call &amp;lt;code&amp;gt;displayMessage()&amp;lt;/code&amp;gt;, which displays the given message in whichever way the operating system can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a number of other useful functions in the &amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; namespace. We don&#039;t yet have full documentation for these commands, but you&#039;ll get a sense of the useful ones in this tutorial. For more detailed information, take a look at [http://hg.toolness.com/ubiquity-firefox/file/9a6c9935da9f/ubiquity/chrome/content/cmdutils.js cmdutils.js].&lt;br /&gt;
&lt;br /&gt;
=== Making sure your command is localizable ===&lt;br /&gt;
&lt;br /&gt;
Ubiquity now supports multiple languages.  That means that hopefully someday someone will be translating your commands to the other languages that Ubiquity supports.  Making your command localizable is easy, and a good habit to get into!  You just have to locate all strings that appear in your &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; methods, that are intended for display to humans, and wrap them with:&lt;br /&gt;
&lt;br /&gt;
 _()&lt;br /&gt;
&lt;br /&gt;
This may look odd, but what it does is quite important: it makes your strings appear in the template files that localizers will be using.  So let&#039;s make our &amp;quot;Hello world!&amp;quot; command localizable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes it so that when a localization template is generated from your command feed, &amp;quot;Hello, World!&amp;quot; will be listed among the strings to be translated.&lt;br /&gt;
&lt;br /&gt;
Note that we don&#039;t need to wrap the names, or other strings that appear in the command metadata -- these are automatically wrapped for us.  We only need to wrap strings that appear inside the functions.&lt;br /&gt;
&lt;br /&gt;
=== Adding a Preview ===&lt;br /&gt;
&lt;br /&gt;
http://img352.imageshack.us/img352/1002/picture3ex0.png&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a preview to our new command. Previews give the user feedback about what a command does before it&#039;s executed. Previews are great for providing rich visual feedback like displaying a graphical representation of atmospheric conditions when using the weather command as shown above. Previews have the full expressive power of HTML, including animations, so there&#039;s a lot you can do with them.&lt;br /&gt;
&lt;br /&gt;
One point of design: Preview code should never have side-effects. That is, a preview should never (without user interaction) change the state of the system.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;say hello&amp;quot; command, we don&#039;t need anything fancy: just some help text that is more descriptive than the default &amp;quot;Executes the say hello command.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  preview: &amp;quot;Displays a &amp;lt;i&amp;gt;salutary&amp;lt;/i&amp;gt; greeting to the planet.&amp;quot;,&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the preview is an HTML-formatted string. The preview can also be a function. We&#039;ll get to that in the next section.&lt;br /&gt;
&lt;br /&gt;
== The Date Command: The Second Command ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the Selection ===&lt;br /&gt;
&lt;br /&gt;
I often forget what day it is. That may be because I need to go outside more often, but, like any programmer, I generally solve my problem&#039;s symptoms with technology rather then addressing the root cause. My solution is to create a command that inserts the date at the location of the cursor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(new Date().toLocaleDateString());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new function here is &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt;. This inserts the passed-in text onto the page at the location of the cursor. If the cursor is in an editable text or rich-text fields, the text gets dumped there. If the cursor isn&#039;t in an editable area, &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt; will still be able to insert the date. (Even when it isn&#039;t displayed, Firefox always keeps track of a cursor position. To see it, type F7.) Try going to a page, selecting some non-mutable text, and using the command. See, it works! This is particularly useful for commands like &amp;quot;translate&amp;quot;, where you want to replace non-editable text with its translation.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;toLocaleDateString()&amp;lt;/code&amp;gt; function is native to Javascript, so if you&#039;re not familiar with it check out the documentation for the Javascript [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date Date object].&lt;br /&gt;
&lt;br /&gt;
=== A Better Preview ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s time to add a better preview to the date command. Let&#039;s have the preview show the date, so that the user will know what to expect when they execute the command. (As a side benefit the user doesn&#039;t even need to execute the command to do a quick check of the day.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _date: function date__date() {&lt;br /&gt;
    return new Date().toLocaleDateString();&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = _(&#039;Inserts today\&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;);&lt;br /&gt;
    pblock.innerHTML = CmdUtils.renderTemplate(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(this._date());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve done three things here. The first was to factor out the code for getting the date into the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt; function. This way we don&#039;t break [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY] by repeating code across the preview and execute functions. Notice that to access the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt;, we use the &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
The second thing we&#039;ve done is to add a preview function. The first argument is the DOM element that gets displayed as the preview for your command. Modify &amp;lt;code&amp;gt;pblock&amp;lt;/code&amp;gt; and you modify the preview. In this case, we set the &amp;lt;code&amp;gt;innerHTML&amp;lt;/code&amp;gt; of the preview block to be the message we want.&lt;br /&gt;
&lt;br /&gt;
The third thing we&#039;ve done is to do some string formatting using the &amp;lt;code&amp;gt;renderTemplate()&amp;lt;/code&amp;gt; function. This takes a template string and performs the appropriate substitution given the passed-in JSON object. Templates can handle a wide range of functionality, as we are currently using TrimPath&#039;s [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavascriptTemplates]. You should read their site for more documentation. Although JavascriptTemplates has some nice properties, we are contemplating moving to [http://mjtemplate.org/ MJT] sometime soon.&lt;br /&gt;
&lt;br /&gt;
=== A shortcut for localization and rendering templates ===&lt;br /&gt;
&lt;br /&gt;
Note how in the code above, we used the localization wrapper &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; before passing the string to renderTemplate.  Because this is such a very common combination when displaying strings, we have a shortcut for it.  Calling _() with a JSON object as the second argument will automatically trigger &amp;lt;code&amp;gt;CmdUtils.renderTemplate()&amp;lt;/code&amp;gt; on the post-localization string.  So the above preview method could be rewritten more simply as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = &#039;Inserts today&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Networking calls and placeholder previews ===&lt;br /&gt;
&lt;br /&gt;
Previews display something meaningful to the user immediately. If you have a preview that requires an AJAX request&amp;amp;mdash;say, to fetch some search results&amp;amp;mdash;that call might take a while to return. In the meantime, your command should display a placeholder preview giving the user feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function(pblock) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;This will show until the AJAX request returns&amp;quot;);&lt;br /&gt;
    CmdUtils.previewGet(pblock, &amp;quot;http://example.com&amp;quot;, function (htm) {&lt;br /&gt;
      pblock.innerHTML = htm;&lt;br /&gt;
    });&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documentation and Metadata ==&lt;br /&gt;
&lt;br /&gt;
Before you share your command with the world, you should consider adding some attributions to the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you should &amp;lt;em&amp;gt;definitely&amp;lt;/em&amp;gt; add some documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Inserts today&#039;s date.&amp;quot;,&lt;br /&gt;
  help: &amp;quot;If you&#039;re in an editable text area, inserts today&#039;s date, formatted for the current locale.&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.description&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.help&amp;lt;/code&amp;gt; attributes are both automatically displayed alongside your command&#039;s name on the command-list page.  (The user can get to this page at any time by issuing the &amp;quot;list ubiquity commands&amp;quot; command.)  HTML tags can be used in both of these strings.&lt;br /&gt;
&lt;br /&gt;
Description is a one-line summary of what the command does, while Help is a longer description that can include examples, caveats, and so on. If your command is simple enough that all you have to say about it fits in one line, it&#039;s OK to use a description alone and leave out the help.&lt;br /&gt;
&lt;br /&gt;
== Sharing it with the World ==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve got our awesome new &amp;quot;date&amp;quot; command, let&#039;s share it with the world. All you have to do is put the javascript file on the web somewhere, and make an html page linking to it with &amp;quot;link rel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;&amp;lt;link rel=&amp;quot;commands&amp;quot; href=&amp;quot;http://path-to-js&amp;quot; name=&amp;quot;Title Goes Here&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anyone with Ubiquity who visits will get a message offering them the choice of subscribing to your command.&lt;br /&gt;
&lt;br /&gt;
[[Image:Subscribe.png]]&lt;br /&gt;
&lt;br /&gt;
If the user chooses to subscribe to a Regular command feed from an untrusted source, they will get a security warning message before they can install the command.  Because Regular Ubiquity command feeds can execute arbitrary javascript with chrome privileges, subscribing to a command from a website means allowing that site full access to do whatever it wants to your browser.  We want to make sure people understand the dangers before subscribing to commands, so we made the warning page pretty scary.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Feed Types ===&lt;br /&gt;
&lt;br /&gt;
Recall that back near the beginning of the tutorial, you set the &amp;quot;feed type&amp;quot; to &amp;quot;Regular&amp;quot;.  As you may have guessed, there&#039;s actually more than one way to write a command feed.  The advantage of Regular feeds is that they let you do whatever you want, so it&#039;s really easy to innovate, but the disadvantages lie in subscribing to misbehaving or malicious code.  You can alternatively write what&#039;s called a &#039;&#039;Locked-Down Feed&#039;&#039;, which is much safer and doesn&#039;t raise a warning page when a user subscribes to it&amp;amp;mdash;but the consequences are that you have less freedom of implementation as a command author.  If you&#039;re interested in learning more about Locked-Down Feeds, check out the [[Labs/Ubiquity/Locked-Down_Feed_Tutorial|Locked-Down Feed Tutorial]].&lt;br /&gt;
&lt;br /&gt;
=== Trust Networks ===&lt;br /&gt;
&lt;br /&gt;
In the future, we&#039;re going to have something set up that we call a &amp;quot;[[Labs/Ubiquity/TrustNetwork|trust network]]&amp;quot;.  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you&#039;ll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they&#039;ll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.&lt;br /&gt;
&lt;br /&gt;
By the way, the reason we call it &amp;quot;subscribing&amp;quot; to a command, rather than &amp;quot;installing&amp;quot; a command, is that if the javascript file changes -- if the site owner adds new commands, removes old commands, or updates existing commands -- all users subscribed to that URL will automatically get the updates.  This will be very convenient for both users and developers, but it will also introduce another type of security risk: just because you decided a command was safe at one point in time doesn&#039;t mean that the command will always remain safe.  For this reason, we&#039;ll need to make sure that the trust network keeps track of when commands have been modified, and notifies users of changes that may make a command unsafe.&lt;br /&gt;
&lt;br /&gt;
== Map Me! Location, Snapshots, and Inserting HTML ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;map&amp;quot; command that comes with Ubiquity is fairly powerful. It&#039;s also fairly complicated&amp;amp;mdash;well, comparatively. It&#039;s still only a couple hundred lines of code. The command, though, can get even more useful. Imagine being able to select some houses on Craigslist, or a list of restaurant names, and Ubiq &amp;quot;map these&amp;quot; to get just the map you want. The concept of &amp;quot;these&amp;quot; puts the power of mashups into the users hands. But I digress. Let&#039;s make a simple command that inserts a map of your current location.&lt;br /&gt;
&lt;br /&gt;
In this command, we use the Google [http://code.google.com/apis/maps/documentation/staticmaps/ static map API] and the Ubiquity function &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; to insert a map of your current location. Ubiquity currently uses the [http://www.maxmind.com/app/api MaxMind] API for trying to guess your location from your IP. That will probably change in the future.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll call this command &amp;lt;code&amp;gt;&amp;quot;map me&amp;quot;&amp;lt;/code&amp;gt; so that it won&#039;t be confused with the standard &amp;lt;code&amp;gt;&amp;quot;map&amp;quot;&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;map me&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _getMapUrl: function() {&lt;br /&gt;
    var loc = CmdUtils.getGeoLocation();&lt;br /&gt;
    var mapUrl = &amp;quot;http://maps.google.com/staticmap?&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var params = {&lt;br /&gt;
      center: loc.lat + &amp;quot;,&amp;quot; + loc.long,&lt;br /&gt;
      size: &amp;quot;500x400&amp;quot;,&lt;br /&gt;
      zoom: 14,&lt;br /&gt;
      key: &amp;quot;ABQIAAAAGZ11mh1LzgQ8-8LRW3wEShQeSuJunOpTb3RsLsk00-MAdzxmXhQoiCd940lo0KlfQM5PeNYEPLW-3w&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    return mapUrl + jQuery.param( params );&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function( pblock ) {&lt;br /&gt;
    var msg = &amp;quot;Inserts a map of your current location: &amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
              &amp;quot;&amp;lt;img src=&#039;${url}&#039;/&amp;gt;&amp;quot;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {url: this._getMapUrl()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function( ) {&lt;br /&gt;
    CmdUtils.getImageSnapshot( this._getMapUrl(), function(imgData) {&lt;br /&gt;
      CmdUtils.setSelection( &amp;quot;&amp;lt;img src=&#039;&amp;quot; + imgData +&amp;quot;&#039;/&amp;gt;&amp;quot;);&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three new things here: &amp;lt;code&amp;gt;CmdUtils.setSelection&amp;lt;/code&amp;gt; to set HTML (yep, it can do that); the use of &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt;; and using &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt; to capture the bits for the image.&lt;br /&gt;
&lt;br /&gt;
I find getting the location&amp;amp;mdash;as imprecise as IP-based location can be&amp;amp;mdash;useful for doing sensible defaults for location-based commands, like Yelp. &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; returns an object which has the following properties: city, state, country, lat, and long.&lt;br /&gt;
&lt;br /&gt;
Why do we need to use &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt;? Because the Google Maps API requires a key that is tied to a particular URL. If we naively inject the image tag into a random web page, the image won&#039;t load because the key doesn&#039;t match that random web page&#039;s URL. Thus, we use the &amp;lt;code&amp;gt;snapshotImage()&amp;lt;/code&amp;gt; function to convert the image into a [http://en.wikipedia.org/wiki/Data:_URI_scheme data url].&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a &amp;lt;code&amp;gt;CmdUtils.snapshotWindow&amp;lt;/code&amp;gt; function, which allows you to get the image data for any tab/window. The function takes a window as the first paramater, and a callback for the second.&lt;br /&gt;
&lt;br /&gt;
= Commands with Arguments =&lt;br /&gt;
&lt;br /&gt;
== Echo ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ll be working towards making some fun and useful commands&amp;amp;mdash;commands that let you control the seething tendrils of the internet with your little pinky. But, let&#039;s start by making a simple command to echo back whatever you type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;echo&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;your shout&amp;quot;}],&lt;br /&gt;
  preview: function previewEcho(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Will echo: &amp;quot;) + args.object.text;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function executeEcho(args) {&lt;br /&gt;
    var msg = args.object.text + &amp;quot;... &amp;quot; + args.object.text + &amp;quot;......&amp;quot;;&lt;br /&gt;
    displayMessage(msg);&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says that the command &amp;quot;echo&amp;quot; takes one argument which is arbitrary text. Whatever text the user enters will get wrapped in an input object and passed into both the preview and execute function.&lt;br /&gt;
&lt;br /&gt;
Try it!  Ubiq &amp;quot;echo hellooooo&amp;quot; and watch what happens.&lt;br /&gt;
&lt;br /&gt;
Ubiquity takes care of parsing the user&#039;s input, so you don&#039;t need to worry about handling prounoun substitution or any of the other natural-language-like features of the Ubiquity parser. Try selecting some text on a page, and Ubiq &amp;quot;echo this&amp;quot;. Ubiquity should now echo the selected text.  &lt;br /&gt;
&lt;br /&gt;
Note that we gave three pieces of information when defining our argument:  its role, its nountype, and its label.  The label is the easiest part: It&#039;s just whatever text you want to have appear in the Ubiquity interface as a prompt for the user.  E.g, if you ubiq &amp;quot;echo&amp;quot;, you will see the label for the argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  echo (your shout)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The roles and the nountypes require some more explanation.  We&#039;ll cover each of them in detail next.&lt;br /&gt;
&lt;br /&gt;
=== Argument Roles ===&lt;br /&gt;
&lt;br /&gt;
Your command can take multiple arguments.  Each one is identified by a &amp;quot;role&amp;quot;.  To understand roles, it helps to think of your command name as a verb, and each argument as a noun.  Remember that Ubiquity&#039;s command line is a pseudo-natural-language environment, so it attempts to be as close to natural language grammar as possible.&lt;br /&gt;
&lt;br /&gt;
For example, if you&#039;ve ever used the &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; command, you know that it takes up to two arguments: a message and a person.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  email message&lt;br /&gt;
  email to person&lt;br /&gt;
  email message to person&lt;br /&gt;
  email to person message&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In grammatical terms, the message argument is the &amp;quot;direct object&amp;quot; of the verb &amp;quot;email&amp;quot;.  The person argument is an indirect object.  We call it the &amp;quot;goal&amp;quot; of the verb.  So if we were writing the email command, we&#039;d define the arguments like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;message&amp;quot;},&lt;br /&gt;
              {role: &amp;quot;goal&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;recipient&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because we give the recipient argument the &amp;quot;goal&amp;quot; role, the Ubiquity parser knows to expect the user to type the word &amp;quot;to&amp;quot;.  When the user enters &amp;quot;email hello to Aza&amp;quot;, the parser knows that the word following &amp;quot;to&amp;quot; -- that is, &amp;quot;Aza&amp;quot; -- should be assigned to the recipient argument.&lt;br /&gt;
&lt;br /&gt;
In our simple &amp;quot;echo&amp;quot; command, we expect the user to type &amp;quot;echo hellooooo&amp;quot; or something like that.  The &amp;quot;hellooooo&amp;quot; is the direct object of the verb &amp;quot;echo&amp;quot;, so we give it the &amp;quot;object&amp;quot; role.  &lt;br /&gt;
&lt;br /&gt;
&amp;quot;Object&amp;quot; is the most common role.  If a command takes only one argument, that argument is usually an &amp;quot;object&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== What Roles Can I Use? ====&lt;br /&gt;
&lt;br /&gt;
* object   (in &amp;quot;echo helloooo&amp;quot;, hello is the object.)&lt;br /&gt;
* goal    (in &amp;quot;email this to brandon&amp;quot;, brandon is the goal.)&lt;br /&gt;
* source   (in &amp;quot;translate this from spanish&amp;quot;, spanish is the source.)&lt;br /&gt;
* location    (in &amp;quot;yelp pizza near boston&amp;quot;, boston is the location.)&lt;br /&gt;
* time    (in &amp;quot;book a flight on thursday&amp;quot;, thursday is the time.)&lt;br /&gt;
* instrument  (in &amp;quot;search monkeys with google&amp;quot;, google is the instrument.)&lt;br /&gt;
* format   (in &amp;quot;check weather in celsius&amp;quot;, celsius is the format.)&lt;br /&gt;
* modifier  (in &amp;quot;get email address for chris&amp;quot;, chris is the modifier.)&lt;br /&gt;
* alias   (in &amp;quot;twitter this as jono&amp;quot;, jono is the alias.)&lt;br /&gt;
&lt;br /&gt;
[https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles More information about these roles].&lt;br /&gt;
&lt;br /&gt;
=== The Arguments Object ===&lt;br /&gt;
&lt;br /&gt;
When your execute method is called, it is passed a single object that encapsulates the values for all arguments.&lt;br /&gt;
&lt;br /&gt;
When your preview method is called, it is passed this object, too.&lt;br /&gt;
&lt;br /&gt;
The object has one attribute corresponding to each role.  In our example above, the command accepts only an object-role argument, so the preview and execute methods get passed an argument with an &amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; attribute.&lt;br /&gt;
&lt;br /&gt;
If we made a command, like email, that takes an object-role argument and a goal-role argument, its preview and execute methods would get passed an argument with &amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;args.goal&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;args.object&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;args.goal&amp;lt;/code&amp;gt;) has several attributes of its own:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  args.object.text    // a string of the input in plain text, without formatting&lt;br /&gt;
  args.object.html    // a string of the input in formatted HTML, including tags&lt;br /&gt;
  args.object.data    // for non-text input types, an arbitrary data object&lt;br /&gt;
  args.object.summary // the HTML string displayed in the suggestion list, abbreviated if long&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our example command only cares about the &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; attribute of the input, because it simply wants plain text.  Often, when the user invokes your command by typing a few short words into the input box, &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.html&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;.summary&amp;lt;/code&amp;gt; will all have exactly the same value, and &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; will be null.  Many, if not most, commands that you write will only care about the text value.  Nevertheless, the other versions of the input data are provided to you in case they differ from &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; and in case your command has a use for them.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Noun Types ==&lt;br /&gt;
&lt;br /&gt;
Noun types specify what &#039;&#039;kind&#039;&#039; of input your command can accept for each one of its arguments.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;echo&amp;quot; command, we wanted the object-role argument to accept any text whatsoever, so for its nountype we passed in the predefined &amp;lt;code&amp;gt;noun_arb_text&amp;lt;/code&amp;gt; object.  This object accepts any arbitrary text as a valid argument and passes it to the command unchanged.&lt;br /&gt;
&lt;br /&gt;
This is OK for very simple commands, like echoing back the user&#039;s input.  But for commands that take structured data, you will want to use more specific nountypes.&lt;br /&gt;
&lt;br /&gt;
For example, if a command can take a date (like the &amp;quot;check calendar&amp;quot; command), you would want to use &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; as the nountype of the argument.  &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; provides several benefits to your command:  it does all of the date parsing for you; it suggests dates that the user might want to enter (for instance, it defaults to today&#039;s date).  And, it lets the parser know that your command takes a date.  This is useful because when the user selects a date on a page and invokes Ubiquity, your command -- along with &amp;quot;check calendar&amp;quot; -- will be one of the top suggestions.&lt;br /&gt;
&lt;br /&gt;
You can write your own noun types -- we&#039;ll get into that later.  For now, let&#039;s take a look at the built-in nountypes that your command can use.  These include:&lt;br /&gt;
&lt;br /&gt;
* noun_arb_text (Arbitrary text)&lt;br /&gt;
* noun_type_language (Name of a human language, e.g. &amp;quot;English&amp;quot;, &amp;quot;Japanese&amp;quot;)&lt;br /&gt;
* noun_type_url (A URL)&lt;br /&gt;
* noun_type_contact (An email address from your address book)&lt;br /&gt;
* noun_type_date (A date, in any format, or a word like &amp;quot;tomorrow&amp;quot;)&lt;br /&gt;
* noun_type_time (A time, in any format)&lt;br /&gt;
* noun_type_percentage&lt;br /&gt;
* noun_type_address&lt;br /&gt;
* noun_type_tab&lt;br /&gt;
* noun_type_searchengine&lt;br /&gt;
* noun_type_tag&lt;br /&gt;
* noun_type_geolocation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are familiar with writing commands, you should check out the [http://hg.toolness.com/ubiquity-firefox/file/6caa9d66b3bb/ubiquity/chrome/content/nlparser/en/nountypes.js nountypes.js], which has the implementation for most of the noun-types.  You can see what noun types are already available for your commands to use, what still needs to be written, and where the existing implementations could use improvement &amp;amp;mdash; and then come [[Labs/Ubiquity#Participation|get involved]] to help us improve them.&lt;br /&gt;
&lt;br /&gt;
=== Regexps as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
If none of the nountypes above is what you&#039;re looking for, there are several ways to define your own.  The simplest is to use a regular expression.  Suppose that (for whatever odd reason) you wanted your command to accept only arguments that begin with the letter N.  The following regexp matches words that start with N:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /^[nN]/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could use it as a noun type, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: /^[nN]/,&lt;br /&gt;
               label: &amp;quot;word that starts with n&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note that you do &#039;&#039;not&#039;&#039; put quotes around the regexp.)&lt;br /&gt;
&lt;br /&gt;
A regexp nountype will reject input that doesn&#039;t match, but it doesn&#039;t know how to help the user by suggesting appropriate input.&lt;br /&gt;
&lt;br /&gt;
=== Lists as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
Suppose you&#039;re writing a command that takes a color as an argument (perhaps it outputs a hexadecimal RGB representation of that color.)  To make a nountype that accepts colors, you can simply pass in an array of strings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  names: [&amp;quot;convert color&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: [&amp;quot;red&amp;quot;, &amp;quot;orange&amp;quot;, &amp;quot;yellow&amp;quot;, &amp;quot;green&amp;quot;, &lt;br /&gt;
                          &amp;quot;blue&amp;quot;, &amp;quot;violet&amp;quot;, &amp;quot;black&amp;quot;, &amp;quot;white&amp;quot;,&lt;br /&gt;
                          &amp;quot;grey&amp;quot;, &amp;quot;brown&amp;quot;, &amp;quot;beige&amp;quot;, &amp;quot;magenta&amp;quot;,&lt;br /&gt;
                          &amp;quot;cerulean&amp;quot;, &amp;quot;puce&amp;quot;],&lt;br /&gt;
               label: &amp;quot;color to convert&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One benefit of using a list is that the parser can use it offer the user suggestions.   If the user enters &amp;quot;get-color bl&amp;quot;, for instance, Ubiquity will be able to suggest &amp;quot;black&amp;quot; and &amp;quot;blue&amp;quot; as the two valid completions based on the input.  This makes list-based nountypes very useful for any command that can accept only a finite set of values.&lt;br /&gt;
&lt;br /&gt;
=== Writing a Noun Type Object ===&lt;br /&gt;
&lt;br /&gt;
Of course, not every type of noun you&#039;d be interested in can be represented&lt;br /&gt;
as a finite list or as a regexp.  If you want to be able to accept or reject input based on some algorithmic test, you can do so by writing a custom JavaScript object that implements a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method (and, optionally, a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; method.)&lt;br /&gt;
&lt;br /&gt;
There is an example of how to do this in the section on the tab commands, below.&lt;br /&gt;
&lt;br /&gt;
== Insert Email: the Contact noun type ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s take a look at one of the built-in noun-types: &amp;lt;code&amp;gt;noun_type_contact&amp;lt;/code&amp;gt;. This lets Ubiquity know to expect a person (either by name or email address). By using the noun-type, Ubiquity will also autocomplete to known people while the user is entering the command. This is what the built-in Ubiquity command &amp;quot;email&amp;quot; uses.&lt;br /&gt;
&lt;br /&gt;
At the moment, Ubiquity figures out what people you know through reading your Gmail contacts. In this prototyped version, you&#039;ll need to use Gmail and be logged in for for Ubiquity to know who you know. Eventually, we&#039;d like to be able to interface with all major web-mail sites, as well as desktop software like Thunderbird.&lt;br /&gt;
&lt;br /&gt;
Enough rambling. It&#039;s time for a command. I constantly find that I need to fetch someone&#039;s email address to paste into a text field because I don&#039;t know it off-hand. This command solves that by letting you insert someone&#039;s email address using autocomplete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert email&amp;quot;],&lt;br /&gt;
  arguments: {modifier: noun_type_contact},&lt;br /&gt;
  preview: &amp;quot;Inserts someone&#039;s email address by name.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    CmdUtils.setSelection( arguments.modifier.text );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To try this out, Ubiq &amp;quot;insert email for &amp;quot; and then the first few letters of someone you email often.&lt;br /&gt;
&lt;br /&gt;
=== Shorter Argument Declarations ===&lt;br /&gt;
&lt;br /&gt;
Notice that we used a shortcut for declaring the arguments.  In the long form, we would have had to say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;modifier&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;contact&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but if we don&#039;t care about specifying extra parameters for the argument, we can get away with using a single object for &amp;quot;arguments&amp;quot;, with the roles as the property names, and the nountypes as the property values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or with label using &amp;lt;code&amp;gt;&amp;quot;_&amp;quot;&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;&amp;quot; &amp;quot;&amp;lt;/code&amp;gt;) as separator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier_contact: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we had several arguments, we could say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {object: noun_arb_text, modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you only have &amp;quot;object&amp;quot; and don&#039;t need to specify a label...:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  argument: noun_arb_text&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aza writes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This one command sums up what I love about Ubiquity. In 8 lines of code, I can &lt;br /&gt;
fundamentally enhance the browser&#039;s functionality. Doing the same thing using &lt;br /&gt;
a normal Firefox extension methodology takes pages and pages of code&amp;amp;mdash;and  the interface would take more thought still. Doing the same thing using a bookmarklet would require a server-side component (to get around cross-site Ajax request ban) as well as forcing the user to give up their email password.&lt;br /&gt;
&lt;br /&gt;
Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TinyURL: Network Calls and jQuery (and the URL noun type)==&lt;br /&gt;
&lt;br /&gt;
Often while writing emails, I&#039;ll discover that I&#039;ve pasted in a URL long enough to be used for unfortunate analogies. I&#039;d like to be able to quickly turn that into a [http://en.wikipedia.org/wiki/Tinyurl TinyURL]&amp;amp;mdash;but the process of making a TinyURL involves lots of fiddly steps. Ubiquity to the rescue.&lt;br /&gt;
&lt;br /&gt;
Because we include [http://en.wikipedia.org/wiki/jQuery jQuery] with Ubiquity, it is simple to perform Ajax calls as well as parse returning data. TinyUrl.com provides an easy to use RESTful API where you pass a URL and it returns its shortened form. We use that API in this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;tinyurl&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_type_url,&lt;br /&gt;
               label: &amp;quot;url to shorten&amp;quot;}],&lt;br /&gt;
  preview: &amp;quot;Replaces the selected URL with a TinyUrl.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var baseUrl = &amp;quot;http://tinyurl.com/api-create.php&amp;quot;;&lt;br /&gt;
    var params = {url: arguments.object.text};&lt;br /&gt;
    jQuery.get( baseUrl, params, function( tinyUrl ) {&lt;br /&gt;
      CmdUtils.setSelection( tinyUrl );&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is a useful nountype because it defaults to the URL of the page that you are currently on.  If that is in fact the URL that the user wants, then they don&#039;t have to type it or even select it.&lt;br /&gt;
&lt;br /&gt;
jQuery is a powerful tool. With it, you can fairly effortlessly cherry-pick the data you need from RSS feeds, XML, and all sorts of other data formats. It also makes doing in-preview animations a breeze.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Twitter: Putting It All Together =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve now covered everything we need to cover in order to write a command that allows us to [http://en.wikipedia.org/wiki/Twitter Twitter] from Ubiquity.  The code below is the actual source code of the Twitter command as it appears in Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
Many thanks to [http://theunfocused.net/moz/ubiquity/verbs/ Blair McBride] for writing this command.  The source code is a bit more intricate than anything we&#039;ve seen so far, but it&#039;s built using exactly the same basic pieces -- and demonstrates nearly all of those pieces in action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const TWITTER_STATUS_MAXLEN = 140;&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;twitter&amp;quot;, &amp;quot;tweet&amp;quot;, &amp;quot;share using twitter&amp;quot;],&lt;br /&gt;
  arguments: [&lt;br /&gt;
    {role: &amp;quot;object&amp;quot;, label: &#039;status&#039;, nountype: noun_arb_text},&lt;br /&gt;
    {role: &amp;quot;alias&amp;quot;, nountype: noun_type_twitter_user}&lt;br /&gt;
  ],&lt;br /&gt;
  icon: &amp;quot;http://twitter.com/favicon.ico&amp;quot;,&lt;br /&gt;
  description:&lt;br /&gt;
  &amp;quot;Sets your Twitter status to a message of at most 160 characters.&amp;quot;,&lt;br /&gt;
  help: (&amp;quot;You&#039;ll need a &amp;lt;a href=\&amp;quot;http://twitter.com\&amp;quot;&amp;gt;Twitter account&amp;lt;/a&amp;gt;,&amp;quot; +&lt;br /&gt;
         &amp;quot; obviously.  If you&#039;re not already logged in&amp;quot; +&lt;br /&gt;
         &amp;quot; you&#039;ll be asked to log in.&amp;quot;),&lt;br /&gt;
  preview: function(previewBlock, args) {&lt;br /&gt;
    var statusText = (args.object ? args.object.text : &#039;&#039;);&lt;br /&gt;
    var usernameText = &amp;quot;&amp;quot;;&lt;br /&gt;
    if (args.alias) {&lt;br /&gt;
      usernameText = args.alias.text;&lt;br /&gt;
    } else if (args.as) {&lt;br /&gt;
      usernameText = args.as.text;&lt;br /&gt;
    }&lt;br /&gt;
    var previewTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;div class=&#039;twitter&#039;&amp;gt;&amp;quot;+_(&amp;quot;Updates your Twitter status ${username} to:&amp;quot;)+&amp;quot;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      &amp;quot;&amp;lt;b class=&#039;status&#039;&amp;gt;${status}&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      _(&amp;quot;Characters remaining: &amp;lt;b&amp;gt;${chars}&amp;lt;/b&amp;gt;&amp;quot;) +&lt;br /&gt;
      &amp;quot;&amp;lt;p&amp;gt;&amp;lt;small&amp;gt;&amp;quot;+_(&amp;quot;tip: tweet @mozillaubiquity for help&amp;quot;)+&amp;quot;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
    var truncateTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;strong&amp;gt;&amp;quot;+_(&amp;quot;The last &amp;lt;b&amp;gt;${truncate}&amp;lt;/b&amp;gt; characters will be truncated!&amp;quot;)+&amp;quot;&amp;lt;/strong&amp;gt;&amp;quot;);&lt;br /&gt;
    var previewData = {&lt;br /&gt;
      status: &amp;lt;&amp;gt;{statusText}&amp;lt;/&amp;gt;.toXMLString(),&lt;br /&gt;
      username: usernameText &amp;amp;&amp;amp; _(&amp;quot;(For user &amp;lt;b&amp;gt;${usernameText}&amp;lt;/b&amp;gt;)&amp;quot;),&lt;br /&gt;
      chars: TWITTER_STATUS_MAXLEN - statusText.length&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var previewHTML = CmdUtils.renderTemplate(&lt;br /&gt;
                        CmdUtils.renderTemplate(previewTemplate, previewData),&lt;br /&gt;
                        {usernameText:usernameText});&lt;br /&gt;
&lt;br /&gt;
    if (previewData.chars &amp;lt; 0) {&lt;br /&gt;
      var truncateData = {&lt;br /&gt;
        truncate: 0 - previewData.chars&lt;br /&gt;
      };&lt;br /&gt;
&lt;br /&gt;
      previewHTML += CmdUtils.renderTemplate(truncateTemplate, truncateData);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    previewBlock.innerHTML = previewHTML;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    var statusText = args.object.text;&lt;br /&gt;
    if(statusText.length &amp;lt; 1) {&lt;br /&gt;
      this._show(_(&amp;quot;requires a status to be entered&amp;quot;));&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var updateUrl = &amp;quot;https://twitter.com/statuses/update.json&amp;quot;;&lt;br /&gt;
    var updateParams = {&lt;br /&gt;
      source: &amp;quot;ubiquity&amp;quot;,&lt;br /&gt;
      status: statusText&lt;br /&gt;
      //dont cut the input since sometimes, the user selects a big url,&lt;br /&gt;
      //and the total lenght is more than 140, but tinyurl takes care of that&lt;br /&gt;
    };&lt;br /&gt;
    var me = this;&lt;br /&gt;
&lt;br /&gt;
    function sendMessage() {&lt;br /&gt;
      jQuery.ajax({&lt;br /&gt;
        type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
        url: updateUrl,&lt;br /&gt;
        data: updateParams,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        error: function() {&lt;br /&gt;
          me._show(_(&amp;quot;error - status not updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        success: function() {&lt;br /&gt;
          me._show(/^d /.test(statusText)&lt;br /&gt;
                   ? _(&amp;quot;direct message sent&amp;quot;)&lt;br /&gt;
                   : _(&amp;quot;status updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        username: login.username,&lt;br /&gt;
        password: login.password&lt;br /&gt;
      });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var login;&lt;br /&gt;
    var alias = args.alias;&lt;br /&gt;
    if (alias &amp;amp;&amp;amp; alias.text &amp;amp;&amp;amp; alias.data) {&lt;br /&gt;
      login = alias.data;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    } else {&lt;br /&gt;
      login = {username: null,&lt;br /&gt;
               password: null};&lt;br /&gt;
      if (alias &amp;amp;&amp;amp; alias.text)&lt;br /&gt;
        login.username = alias.text;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  _show: function(txt){&lt;br /&gt;
    displayMessage({icon: this.icon, title: this.name, text: txt});&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Switching Tabs =&lt;br /&gt;
&lt;br /&gt;
The final command in this tutorial is for switching between tabs. The end goal is this: type a few keys to that matches the title of an open tab (in any window), hit return, and you&#039;ve switched to that tab.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: Writing your own Noun-Types ===&lt;br /&gt;
&lt;br /&gt;
A noun-type needs to only have two things: A &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; function.  It can optionally also have a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
The label is what shows up when the command prompts for input. Suggest returns a list of input objects, each one containing the name of a matching tab. We&#039;re using [http://developer.mozilla.org/en/docs/FUEL FUEL] to interact with the browser, which is where the &amp;quot;Application&amp;quot; variable comes from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_tab = {&lt;br /&gt;
  label: &amp;quot;tab name&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
  // Returns all tabs from all windows.&lt;br /&gt;
  getTabs: function nt_tab_getTabs() {&lt;br /&gt;
    return [tab&lt;br /&gt;
            for each (win in Application.windows)&lt;br /&gt;
            for each (tab in win.tabs)];&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  suggest: function nt_tab_suggest(text, html, callback, selectionIndices) {&lt;br /&gt;
    var textLC = text.toLowerCase();&lt;br /&gt;
    return [CmdUtils.makeSugg(tab.document.title, null, tab)&lt;br /&gt;
            for each (tab in this.getTabs())&lt;br /&gt;
            if (~tab.document.title.toLowerCase().indexOf(textLC))];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The suggest method of a noun type always gets passed both text and html.  If the input is coming from a part of a web page that the user has selected, these&lt;br /&gt;
values can be different: they are both strings, but the html value contains markup tags while the text value does not. The Tab noun type only cares about the plain text of the tab name, so we ignore the value of html.&lt;br /&gt;
&lt;br /&gt;
The callback argument is for use by nountypes that need to run asynchronously, i.e. because they need to do network calls to generate suggestions.  The callback is a function; instead of returning a list of suggestions right away, an asynchronous noun type can call the callback with each suggestion it generates.  More on this later; the tab noun type generates all its suggestions right away, so it just returns them instead of using the callback.&lt;br /&gt;
&lt;br /&gt;
We use the convenience function &amp;lt;code&amp;gt;CmdUtils.makeSugg()&amp;lt;/code&amp;gt; to generate an&lt;br /&gt;
input object of the type that the Ubiquity parser expects.  The full signature of this function is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSugg(text, html, data, score, selectionIndices);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It requires at least one of &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; if you want to skip &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the text or html input is very long, &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; generates a summary for us, and puts it in the &amp;lt;code&amp;gt;summary&amp;lt;/code&amp;gt; attribute of the input object.&lt;br /&gt;
&lt;br /&gt;
We could have accomplished mostly the same thing without calling &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; by returning a list of anonymous objects like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ text: tabName,&lt;br /&gt;
  html: Utils.escapeHtml(tabName),&lt;br /&gt;
  data: tab,&lt;br /&gt;
  summary: Utils.escapeHtml(tabName) };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input objects that our &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method generates are the same objects that will eventually get passed in to the &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; methods of any commands that use this noun type.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: The Command ===&lt;br /&gt;
&lt;br /&gt;
Now that we are armed with the tab noun-type, it is easy to make the tab-switching command. Again, we use FUEL to focus the selected tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;switch tab&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_tab},&lt;br /&gt;
&lt;br /&gt;
  execute: function tab_execute(args) {&lt;br /&gt;
    // must be delayed because Ubiquity restores the focus on close&lt;br /&gt;
    Utils.setTimeout(function delayedFocus() {&lt;br /&gt;
      var tab = args.object.data;&lt;br /&gt;
      tab._window._window.focus();&lt;br /&gt;
      tab.focus();&lt;br /&gt;
    }, 99);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  preview: function tab_preview(pblock, args) {&lt;br /&gt;
    var tabName = args.object.text;&lt;br /&gt;
    if (tabName) {&lt;br /&gt;
      var msg = &amp;quot;Changes to &amp;lt;strong&amp;gt;${tab}&amp;lt;/strong&amp;gt; tab.&amp;quot;;&lt;br /&gt;
      pblock.innerHTML = _(msg, {tab: tabName});&lt;br /&gt;
    }&lt;br /&gt;
    else pblock.innerHTML = _(&amp;quot;Switch to a tab by name.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Development Hints =&lt;br /&gt;
&lt;br /&gt;
You now know all you need to know to get started developing useful Ubiquity commands of your own.&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous tips that didn&#039;t fit elsewhere on this page, that may make development easier for you.&lt;br /&gt;
&lt;br /&gt;
== The Source Code of Built-In Commands ==&lt;br /&gt;
&lt;br /&gt;
Looking at the source code of built-in commands and built-in noun types can be a very useful aid to development.  If you have the source checkout of Ubiquity (see [Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial | the development tutorial] to find out how to get this), the source code can be found in the files:&lt;br /&gt;
&lt;br /&gt;
 ubiquity/standard-feeds/&lt;br /&gt;
 ubiquity/builtin-feeds/builtincmds.js&lt;br /&gt;
 ubiquity/modules/nountypes.js&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a checkout of the source code, you can view the latest version on the web here:&lt;br /&gt;
&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/standard-feeds/ standard-feeds]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/builtin-feeds/builtincmds.js builtincmds.js]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/modules/nountypes.js nountypes.js]&lt;br /&gt;
&lt;br /&gt;
== Interacting with Other Extensions ==&lt;br /&gt;
&lt;br /&gt;
http://img363.imageshack.us/img363/1906/picture7cm5.png&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t much to say here besides that it&#039;s easy. For example, here&#039;s a command (thanks to [http://foyrek.com/lyrics.html Abimanyu Raja] for writing this code) that finds the lyrics for a song. You can simply Ubiq something like &amp;quot;get lyrics for wild international&amp;quot; but the command will also interface with the FoxyTunes extension (if it is installed) and add the currently playing song to the suggestion list. Interfacing with other extensions, too, is easy because you can view the source code for every Firefox extension.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_song = {&lt;br /&gt;
  label: &amp;quot;song name&amp;quot;,&lt;br /&gt;
  suggest: function nt_song_suggest(text) {&lt;br /&gt;
    var suggestions = [CmdUtils.makeSugg(text)];&lt;br /&gt;
    var win = Utils.currentChromeWindow;&lt;br /&gt;
    if (&amp;quot;foxytunesGetCurrentTrackTitle&amp;quot; in win)&lt;br /&gt;
      suggestions.push(CmdUtils.makeSugg(win.foxytunesGetCurrentTrackTitle()));&lt;br /&gt;
    return suggestions;&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;get lyrics&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_song},&lt;br /&gt;
  description: &amp;quot;Searches for lyrics of the song.&amp;quot;,&lt;br /&gt;
  preview: function gl_preview(pblock, {object: {text}}) {&lt;br /&gt;
    if (!text) {&lt;br /&gt;
      this.previewDefault(pblock);&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Searches for the lyrics of &amp;lt;b&amp;gt;${query}&amp;lt;/b&amp;gt;.&amp;quot;,&lt;br /&gt;
                         {query: Utils.escapeHtml(text)});&lt;br /&gt;
  },&lt;br /&gt;
  execute: function gl_execute(args) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      &amp;quot;http://www.google.com/search?q=&amp;quot; +&lt;br /&gt;
      encodeURIComponent(args.object.text + _(&amp;quot; lyrics&amp;quot;)));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing Asynchronous Noun Suggestions ==&lt;br /&gt;
&lt;br /&gt;
The noun types we&#039;ve seen so far in this tutorial have all worked synchronously, returning their suggestions right away. However, Ubiquity also supports asynchronous noun suggestions. These are useful for when a noun type needs to do some potentially time-consuming work before it can make suggestions &amp;amp;mdash; most commonly when it needs to call an external service.&lt;br /&gt;
&lt;br /&gt;
Implementing asynchronous suggestions is simple. Whenever the Ubiquity parser calls a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function, it includes a callback function that may be used to send suggestions back to the parser as they become available. In the most typical case, the noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function makes an AJAX request, invoking the parser&#039;s callback function from within the callback function for the AJAX request.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example: a noun type that suggests [http://www.freebase.com/ Freebase] topics based on the text the user has typed or selected, and a barebones &amp;lt;code&amp;gt;freebase-lookup&amp;lt;/code&amp;gt; command that uses the noun type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_freebase_topic = {&lt;br /&gt;
  name: &amp;quot;Freebase topic&amp;quot;,&lt;br /&gt;
  label: &amp;quot;topic&amp;quot;,&lt;br /&gt;
  suggest: function freebase_topic_suggest(text, html, callback) {&lt;br /&gt;
    return [&lt;br /&gt;
      CmdUtils.makeSugg(text),&lt;br /&gt;
      $.ajax({&lt;br /&gt;
        url: &amp;quot;http://www.freebase.com/api/service/search&amp;quot;,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        data: {prefix: text, limit: 5},&lt;br /&gt;
        success: function suggestTopics(response) {&lt;br /&gt;
          if (response.status === &amp;quot;200 OK&amp;quot;)&lt;br /&gt;
            callback([CmdUtils.makeSugg(result.name, result.name, result)&lt;br /&gt;
                      for each (result in response.result)]);&lt;br /&gt;
        },&lt;br /&gt;
      })];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;lookup on freebase&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_freebase_topic},&lt;br /&gt;
  preview: function preview(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _((&amp;quot;Go to the Freebase topic page for &amp;quot; +&lt;br /&gt;
                          &amp;quot;{if text}${text}{else}any topic{/if}.&amp;quot;),&lt;br /&gt;
                         args.object);&lt;br /&gt;
  },&lt;br /&gt;
  execute: function goToFreebase({object: {text, data}}) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      text&lt;br /&gt;
      ? (data&lt;br /&gt;
         ? &amp;quot;http://www.freebase.com/view&amp;quot; + data.id&lt;br /&gt;
         : (&amp;quot;http://www.freebase.com/search?query=&amp;quot; +&lt;br /&gt;
            encodeURIComponent(text)))&lt;br /&gt;
      : &amp;quot;http://www.freebase.com/&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few notes:&lt;br /&gt;
&lt;br /&gt;
* A noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function typically returns an empty array when it intends to make asynchronous suggestions, but it can return one or more suggestions synchronously if it has them available.&lt;br /&gt;
* Because the work being done to generate asynchronous suggestions is generally somewhat expensive, and because a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function may be called for every keystroke the user makes, you should probably consider implementing a delay before starting the work and/or caching the work at some level. Ubiquity currently leaves this up to each noun type individually.&lt;br /&gt;
* A much more robust implementation of Freebase-derived noun types can be found [http://graynorton.com/ubiquity/freebase-nouns.html here].&lt;br /&gt;
&lt;br /&gt;
== Running on page load, Ubiquity load and startup ==&lt;br /&gt;
&lt;br /&gt;
Commands aren&#039;t the only thing you can put in a command feed.  You can also include functions you want to be run automatically at page-load time and at Firefox startup time.&lt;br /&gt;
&lt;br /&gt;
In order to run some code on page load, you simply have to prefix your function with &amp;lt;code&amp;gt;pageLoad_&amp;lt;/code&amp;gt;. For example, if you want to say &amp;quot;Hi&amp;quot; every time a page is loaded, your code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pageLoad_hi() {&lt;br /&gt;
  displayMessage(&amp;quot;hi&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you modify the function and want to see the changes, remember to first invoke Ubiquity. Although your function like above, might not be a Ubiquity command, this is necessary to refresh the cached code.&lt;br /&gt;
&lt;br /&gt;
Similarly, functions prefixed by &amp;lt;code&amp;gt;ubiquityLoad_&amp;lt;/code&amp;gt; are called whenever Ubiquity is initialized for a main window of Firefox. This is useful when you want to interact with the Ubiquity interface itself, or run some code whenever a new window is opened.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function ubiquityLoad_googleAsDefaultEntry(gUbiquity, mainWindow) {&lt;br /&gt;
  gUbiquity.textBox.value = &amp;quot;google&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if you want to run some code everytime Firefox starts up, you just have to prefix the function with &amp;lt;code&amp;gt;startup_&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The awesome thing about these functions is the ability to develop whole Firefox extensions (that require minimal UI) as Ubiquity plugins in lesser lines of code. You don&#039;t need to worry about chrome.manifest or install.rdf. Another added benefit is that you never have to restart your Firefox during development unless of course, you are running code on Firefox startup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://img388.imageshack.us/img388/3086/picture5eo9.png&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code for [http://foyrek.com/keyscape.js Keyscape] which is a Ubiquity command that makes use of &amp;lt;code&amp;gt;pageLoad&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;startup&amp;lt;/code&amp;gt; to recreate the functionality of the [https://addons.mozilla.org/en-US/firefox/addon/339 Search Keys extension] by Jesse Ruderman. In line with Ubiquity&#039;s aim to let you do things quicker using your keyboard, this command lets you go to search results on Google by just pressing a number. It&#039;ll add hints to show the number of each link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//A lot of this code is borrowed from the Search Keys extension&lt;br /&gt;
//Many thanks to Jeese Ruderman&lt;br /&gt;
&lt;br /&gt;
function startup_keyscape() {&lt;br /&gt;
  window.addEventListener(&amp;quot;keydown&amp;quot;, keyscape_down, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function pageLoad_keyscape(doc){&lt;br /&gt;
&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
  //If we are on about: or chrome://, just return&lt;br /&gt;
  if(uri.scheme != &amp;quot;http&amp;quot;)&lt;br /&gt;
    return;&lt;br /&gt;
&lt;br /&gt;
  //Check if the page we are on is google&lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	      		    &lt;br /&gt;
    for(var num=1; num&amp;lt;=10; num++){&lt;br /&gt;
&lt;br /&gt;
      var link = jQuery(doc.body).find(&#039;a.l&#039;)[num-1];&lt;br /&gt;
      &lt;br /&gt;
      if( link ){&lt;br /&gt;
&lt;br /&gt;
        var hint = doc.createElementNS(&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;, &amp;quot;span&amp;quot;);&lt;br /&gt;
        hint.style.color = &amp;quot;blue&amp;quot;;&lt;br /&gt;
        hint.style.background = &amp;quot;white&amp;quot;;&lt;br /&gt;
        hint.style.padding = &amp;quot;1px 2px 1px 2px&amp;quot;;&lt;br /&gt;
        hint.style.marginLeft = &amp;quot;.5em&amp;quot;;&lt;br /&gt;
        hint.appendChild(doc.createTextNode(num == 10 ? 0 : num));&lt;br /&gt;
        link.parentNode.insertBefore(hint, link.nextSibling);&lt;br /&gt;
      }  		&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_isGoogle(uri){&lt;br /&gt;
  return uri.host.indexOf(&amp;quot;google&amp;quot;) != -1 &lt;br /&gt;
	 &amp;amp;&amp;amp; (uri.path.substr(0,8) == &amp;quot;/search?&amp;quot; &lt;br /&gt;
         || uri.path.substr(0,8) == &amp;quot;/custom?&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_down(event){&lt;br /&gt;
&lt;br /&gt;
  var doc =  Application.activeWindow.activeTab.document;	&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
 &lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	&lt;br /&gt;
   var key = parseInt(event.keyCode || event.charCode);	&lt;br /&gt;
   var num;&lt;br /&gt;
	&lt;br /&gt;
   if(48 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 57) //number keys&lt;br /&gt;
     num = key - 48;&lt;br /&gt;
   else if(96 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 105) //numeric keypad with numlock on&lt;br /&gt;
     num = key - 96;&lt;br /&gt;
   else&lt;br /&gt;
     return;&lt;br /&gt;
&lt;br /&gt;
   //Don&#039;t do anything if we are in a textbox&lt;br /&gt;
   //or some other related elements&lt;br /&gt;
   var elt = window.document.commandDispatcher.focusedElement;&lt;br /&gt;
   &lt;br /&gt;
   if (elt) {&lt;br /&gt;
     var ln = new String(elt.localName).toLowerCase();&lt;br /&gt;
     if (ln == &amp;quot;input&amp;quot; || ln == &amp;quot;textarea&amp;quot; || ln == &amp;quot;select&amp;quot; || ln == &amp;quot;isindex&amp;quot;)&lt;br /&gt;
        return;&lt;br /&gt;
   }&lt;br /&gt;
    &lt;br /&gt;
   //Get the link url from the search results page&lt;br /&gt;
   var url_dest = jQuery(doc.body).find(&#039;a.l&#039;).eq(num-1).attr(&#039;href&#039;);&lt;br /&gt;
   &lt;br /&gt;
   if(event.altKey){&lt;br /&gt;
     //Open in new tab&lt;br /&gt;
     Application.activeWindow.open(Utils.url(url_dest));&lt;br /&gt;
   }else{&lt;br /&gt;
     //Open in same tab&lt;br /&gt;
     doc.location.href = url_dest;&lt;br /&gt;
   }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Ubiquity does indeed become ubiquitous, a lot of extensions can be re-written as Ubiquity commands. This is much nicer for the end-user, as well, because the Ubiquity command installation process is a lot easier.&lt;br /&gt;
&lt;br /&gt;
In the future, Ubiquity is also likely to have the ability to convert your Ubiquity commands into proper Firefox extensions. Look [http://labs.toolness.com/trac/ticket/3 here] to check on the progress of this functionality.&lt;br /&gt;
&lt;br /&gt;
== Persistent Storage ==&lt;br /&gt;
Some commands may want to store data that persist even after closing Firefox. &lt;br /&gt;
Meet &amp;lt;code&amp;gt;Bin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var gId = 42; // used for avoiding needless preview updates when typing&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;memo&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Lets you jot a memo for the page.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  argument: noun_arb_text,&lt;br /&gt;
  execute: function memo_execute({object: {html}}) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]() || [];&lt;br /&gt;
    list.push(html);&lt;br /&gt;
    Bin[href](list);&lt;br /&gt;
    gId = +new Date;&lt;br /&gt;
  },&lt;br /&gt;
  preview: function memo_preview(pb) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]();&lt;br /&gt;
    if (!list) {&lt;br /&gt;
      pb.innerHTML =&lt;br /&gt;
        &amp;lt;&amp;gt;No memos taken for: &amp;lt;small&amp;gt;&amp;lt;code&amp;gt;{href}&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/&amp;gt;;&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    if (pb.ownerDocument.getElementById(gId)) return;&lt;br /&gt;
    var ol = CmdUtils.previewList(pb, list, function deleteMemo(i, ev) {&lt;br /&gt;
      $(ev.target).closest(&amp;quot;li&amp;quot;).slideUp();&lt;br /&gt;
      list.splice(i, 1);&lt;br /&gt;
      Bin[href](list.length ? list : null);&lt;br /&gt;
      gId = +new Date;&lt;br /&gt;
    });&lt;br /&gt;
    ol.id = gId;&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;list memos&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Opens all memos you&#039;ve taken in a new tab.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  execute: function list_memos_execute() {&lt;br /&gt;
    var htm = +Bin + &amp;quot; page(s)&amp;lt;dl&amp;gt;&amp;quot;, {escapeHtml} = Utils;&lt;br /&gt;
    for each (var [url, memos] in Bin) {&lt;br /&gt;
      htm += &amp;quot;&amp;lt;dt&amp;gt;&amp;quot; + escapeHtml(url) + &amp;quot;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;ol&amp;gt;&amp;quot;;&lt;br /&gt;
      for each (var memo in memos) htm += &amp;quot;&amp;lt;li&amp;gt;&amp;quot; + memo + &amp;quot;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
      htm += &amp;quot;&amp;lt;/ol&amp;gt;&amp;lt;/dd&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    Utils.openUrlInBrowser(&amp;quot;data:text/html,&amp;quot; + encodeURI(htm + &amp;quot;&amp;lt;/dl&amp;gt;&amp;quot;));&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details, see the bottom of [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/feedmanager.js FeedManager] documentation.&lt;br /&gt;
&lt;br /&gt;
== Firebug ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity automatically enables Chrome Errors and Warnings on startup so that errors in your code appear in the Firebug console. Just use &amp;lt;tt&amp;gt;CmdUtils.log()&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;console.log()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Where To Go From Here =&lt;br /&gt;
&lt;br /&gt;
Take a look at Ubiquity&#039;s reference documentation for the &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils]&amp;lt;/tt&amp;gt; namespaces.&lt;br /&gt;
&lt;br /&gt;
If you have any questions or comments, feel free to join us on IRC at &amp;lt;tt&amp;gt;#ubiquity&amp;lt;/tt&amp;gt; on &amp;lt;tt&amp;gt;irc.mozilla.org&amp;lt;/tt&amp;gt;, as well as the [http://groups.google.com/group/ubiquity-firefox Ubiquity Google Group].&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
To reiterate a point I made before: Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web. You are one of those agents.&lt;br /&gt;
&lt;br /&gt;
Now, go forth and create.&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231880</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231880"/>
		<updated>2010-06-19T06:38:53Z</updated>

		<summary type="html">&lt;p&gt;Satyr: clipboard.image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [http://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a6pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now [http://mozillalabs.com/bespin/ Bespin] thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
* Right click on command entry or preview browser opens context menu.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** change skin&lt;br /&gt;
* Firefox&lt;br /&gt;
** view extension&lt;br /&gt;
** stop&lt;br /&gt;
** print preview&lt;br /&gt;
** open error console&lt;br /&gt;
* Developer&lt;br /&gt;
** unescape HTML entities&lt;br /&gt;
** view selection source&lt;br /&gt;
** jQuery API&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to translate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/themitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* &amp;quot;zoom&amp;quot; zooms the current tab.&lt;br /&gt;
* &amp;quot;highlight syntax&amp;quot; uses [http://code.google.com/p/google-code-prettify/ google-code-prettify].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of a security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
* More globals: &amp;lt;code&amp;gt;atob btoa Audio Image DOMParser NodeFilter XMLSerializer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() tabs.length BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sort() uniq() seq() count() extend() regexp() defineLazyProperty() unescapeHtml()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.image clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;notify() listenOnce() parseHtml() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changed ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadDivertedInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;ellipsify()&amp;lt;/code&amp;gt; accepts plain string.&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
* &amp;lt;code&amp;gt;trim() encodeJson() decodeJson() json&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() getCommand() executeCommand() previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;isSelected getSelectedNodes() getSelectedRanges()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changed ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; is improved in a number of ways. See [[Labs/Ubiquity/Writing_A_Search_Command]].&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports [http://wiki.greasespot.net/Metadata_Block Greasemonkey style page filters].&lt;br /&gt;
* &amp;lt;code&amp;gt;injectCss()/injectHtml()/injectJs()/loadJQuery()&amp;lt;/code&amp;gt; can specify target document.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* noun_type_skin&lt;br /&gt;
* noun_type_extension&lt;br /&gt;
==== changed ====&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231385</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231385"/>
		<updated>2010-06-16T23:47:10Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* added */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [http://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a6pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now [http://mozillalabs.com/bespin/ Bespin] thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
* Right click on command entry or preview browser opens context menu.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** change skin&lt;br /&gt;
* Firefox&lt;br /&gt;
** view extension&lt;br /&gt;
** stop&lt;br /&gt;
** print preview&lt;br /&gt;
** open error console&lt;br /&gt;
* Developer&lt;br /&gt;
** unescape HTML entities&lt;br /&gt;
** view selection source&lt;br /&gt;
** jQuery API&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to translate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/themitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* &amp;quot;zoom&amp;quot; zooms the current tab.&lt;br /&gt;
* &amp;quot;highlight syntax&amp;quot; uses [http://code.google.com/p/google-code-prettify/ google-code-prettify].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of a security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
* More globals: &amp;lt;code&amp;gt;atob btoa Audio Image DOMParser NodeFilter XMLSerializer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() tabs.length BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sort() uniq() seq() count() extend() regexp() defineLazyProperty() unescapeHtml()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;notify() listenOnce() parseHtml() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changed ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadDivertedInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;ellipsify()&amp;lt;/code&amp;gt; accepts plain string.&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
* &amp;lt;code&amp;gt;trim() encodeJson() decodeJson() json&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() getCommand() executeCommand() previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;isSelected getSelectedNodes() getSelectedRanges()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changed ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; is improved in a number of ways. See [[Labs/Ubiquity/Writing_A_Search_Command]].&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports [http://wiki.greasespot.net/Metadata_Block Greasemonkey style page filters].&lt;br /&gt;
* &amp;lt;code&amp;gt;injectCss()/injectHtml()/injectJs()/loadJQuery()&amp;lt;/code&amp;gt; can specify target document.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* noun_type_skin&lt;br /&gt;
* noun_type_extension&lt;br /&gt;
==== changed ====&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231286</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231286"/>
		<updated>2010-06-16T19:47:23Z</updated>

		<summary type="html">&lt;p&gt;Satyr: added nouns / 3.7a6pre&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [http://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a6pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now [http://mozillalabs.com/bespin/ Bespin] thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
* Right click on command entry or preview browser opens context menu.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** change skin&lt;br /&gt;
* Firefox&lt;br /&gt;
** view extension&lt;br /&gt;
** stop&lt;br /&gt;
** print preview&lt;br /&gt;
** open error console&lt;br /&gt;
* Developer&lt;br /&gt;
** unescape HTML entities&lt;br /&gt;
** view selection source&lt;br /&gt;
** jQuery API&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to translate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/themitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* &amp;quot;zoom&amp;quot; zooms the current tab.&lt;br /&gt;
* &amp;quot;highlight syntax&amp;quot; uses [http://code.google.com/p/google-code-prettify/ google-code-prettify].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of a security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
* More globals: &amp;lt;code&amp;gt;atob btoa Audio Image DOMParser NodeFilter XMLSerializer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() tabs.length BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq() count() extend() regexp() defineLazyProperty() unescapeHtml()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;notify() listenOnce() parseHtml() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changed ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadDivertedInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;ellipsify()&amp;lt;/code&amp;gt; accepts plain string.&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
* &amp;lt;code&amp;gt;trim() encodeJson() decodeJson() json&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() getCommand() executeCommand() previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;isSelected getSelectedNodes() getSelectedRanges()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changed ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; is improved in a number of ways. See [[Labs/Ubiquity/Writing_A_Search_Command]].&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports [http://wiki.greasespot.net/Metadata_Block Greasemonkey style page filters].&lt;br /&gt;
* &amp;lt;code&amp;gt;injectCss()/injectHtml()/injectJs()/loadJQuery()&amp;lt;/code&amp;gt; can specify target document.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
==== added ====&lt;br /&gt;
* noun_type_skin&lt;br /&gt;
* noun_type_extension&lt;br /&gt;
==== changed ====&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231269</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231269"/>
		<updated>2010-06-16T18:59:14Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [http://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a5pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now [http://mozillalabs.com/bespin/ Bespin] thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
* Right click on command entry or preview browser opens context menu.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** change skin&lt;br /&gt;
* Firefox&lt;br /&gt;
** view extension&lt;br /&gt;
** stop&lt;br /&gt;
** print preview&lt;br /&gt;
** open error console&lt;br /&gt;
* Developer&lt;br /&gt;
** unescape HTML entities&lt;br /&gt;
** view selection source&lt;br /&gt;
** jQuery API&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to translate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/themitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* &amp;quot;zoom&amp;quot; zooms the current tab.&lt;br /&gt;
* &amp;quot;highlight syntax&amp;quot; uses [http://code.google.com/p/google-code-prettify/ google-code-prettify].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
* More globals: &amp;lt;code&amp;gt;atob btoa Audio Image DOMParser NodeFilter XMLSerializer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() tabs.length BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq() count() extend() regexp() defineLazyProperty() unescapeHtml()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;notify() listenOnce() parseHtml() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadDivertedInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;ellipsify()&amp;lt;/code&amp;gt; accepts plain string.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() getCommand() executeCommand() previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;isSelected getSelectedNodes() getSelectedRanges()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; is improved in a number of ways. See [[Labs/Ubiquity/Writing_A_Search_Command]].&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports [http://wiki.greasespot.net/Metadata_Block Greasemonkey style page filters].&lt;br /&gt;
* &amp;lt;code&amp;gt;injectCss()/injectHtml()/injectJs()/loadJQuery()&amp;lt;/code&amp;gt; can specify target document.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231265</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=231265"/>
		<updated>2010-06-16T18:55:33Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [http://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a5pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now [http://mozillalabs.com/bespin/ Bespin] thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
* Right click on command entry or preview browser opens context menu.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** change skin&lt;br /&gt;
* Firefox&lt;br /&gt;
** view extension&lt;br /&gt;
** stop&lt;br /&gt;
** print preview&lt;br /&gt;
** open error console&lt;br /&gt;
* Developer&lt;br /&gt;
** unescape HTML entities&lt;br /&gt;
** view selection source&lt;br /&gt;
** jQuery API&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to translate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitchoyoshitaka mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* &amp;quot;zoom&amp;quot; zooms the current tab.&lt;br /&gt;
* &amp;quot;highlight syntax&amp;quot; uses [http://code.google.com/p/google-code-prettify/ google-code-prettify].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
* More globals: &amp;lt;code&amp;gt;atob btoa Audio Image DOMParser NodeFilter XMLSerializer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() tabs.length BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq() count() extend() regexp() defineLazyProperty() unescapeHtml()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;notify() listenOnce() parseHtml() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadDivertedInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;ellipsify()&amp;lt;/code&amp;gt; accepts plain string.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() getCommand() executeCommand() previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;isSelected getSelectedNodes() getSelectedRanges()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; is improved in a number of ways. See [[Labs/Ubiquity/Writing_A_Search_Command]].&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports [http://wiki.greasespot.net/Metadata_Block Greasemonkey style page filters].&lt;br /&gt;
* &amp;lt;code&amp;gt;injectCss()/injectHtml()/injectJs()/loadJQuery()&amp;lt;/code&amp;gt; can specify target document.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Jetpack/Reboot/JEP/111&amp;diff=219821</id>
		<title>Labs/Jetpack/Reboot/JEP/111</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Jetpack/Reboot/JEP/111&amp;diff=219821"/>
		<updated>2010-05-01T00:23:48Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= JEP 111 - Selection =&lt;br /&gt;
&lt;br /&gt;
* Champion: Myk Melez &amp;lt;myk@mozilla.org&amp;gt;&lt;br /&gt;
* Status: Under Review&lt;br /&gt;
* Bug Ticket: {{bug|547092}}&lt;br /&gt;
* Type: API&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Jetpack extensions should be able to get and set the current text selection and observe select events.&lt;br /&gt;
&lt;br /&gt;
= Use Cases =&lt;br /&gt;
* Look-up information depending on what is selected&lt;br /&gt;
** onSelect or sometime afterward&lt;br /&gt;
* Retrieving selected content&lt;br /&gt;
* Applying changes to the selection&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
&lt;br /&gt;
== Module ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;selection&amp;lt;/code&amp;gt; module gives extensions access to the selection. Importing the module returns a singleton.&lt;br /&gt;
&lt;br /&gt;
 let selection = require(&amp;quot;selection&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
=== Properties ===&lt;br /&gt;
&lt;br /&gt;
; text: String; the text version of the selection, if any&lt;br /&gt;
; html: String; the HTML version of the selection, if any&lt;br /&gt;
; onSelect: Function; a callback function to call when some text is selected&lt;br /&gt;
; contiguous: Boolean; whether or not the selection is contiguous (see [[#Discontiguous Selections]])&lt;br /&gt;
&lt;br /&gt;
If there is a selection:&lt;br /&gt;
* getting the &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; property returns the text value of the selection;&lt;br /&gt;
* getting the &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt; property returns the HTML value of the selection, if any, otherwise &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt;;&lt;br /&gt;
* setting the &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; property replaces the selection with the value to which the property is set and sets the &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt; property to the same value to which the &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; property is being set;&lt;br /&gt;
* setting the &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt; property replaces the selection with the value to which the property is set and sets the &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; property to the text version of the HTML value.&lt;br /&gt;
&lt;br /&gt;
If there is not a selection:&lt;br /&gt;
* getting either property returns &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt;;&lt;br /&gt;
* setting either property has no effect.&lt;br /&gt;
&lt;br /&gt;
=== Discontiguous Selections ===&lt;br /&gt;
&lt;br /&gt;
Discontiguous selections can be accessed by iterating the selection singleton, which returns Selection objects with the same properties as the selection singleton:&lt;br /&gt;
&lt;br /&gt;
 let selection = require(&amp;quot;selection&amp;quot;);&lt;br /&gt;
 for each (let subselection in selection) {&lt;br /&gt;
   console.log(subselection.text);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
To determine whether or not the selection is discontiguous, check its contiguous property, e.g.:&lt;br /&gt;
&lt;br /&gt;
 let sel = require(&amp;quot;selection&amp;quot;);&lt;br /&gt;
 if (sel.contiguous)&lt;br /&gt;
   console.log(&amp;quot;The selection is: &amp;quot; + sel.text);&lt;br /&gt;
 else&lt;br /&gt;
   console.log(&amp;quot;The selections are: &amp;quot; + [s.text for each (s in sel)].join(&amp;quot;,&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
Log the current selection:&lt;br /&gt;
&lt;br /&gt;
 let selection = require(&amp;quot;selection&amp;quot;);&lt;br /&gt;
 if (selection.text)&lt;br /&gt;
   console.log(selection.text);&lt;br /&gt;
&lt;br /&gt;
Surround HTML selections with delimiters:&lt;br /&gt;
&lt;br /&gt;
 let selection = require(&amp;quot;selection&amp;quot;);&lt;br /&gt;
 selection.onSelect = function() {&lt;br /&gt;
   if (selection.html)&lt;br /&gt;
     selection.html = &amp;quot;\\\\\\&amp;quot; + selection.html + &amp;quot;///&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
= Issues =&lt;br /&gt;
&lt;br /&gt;
* What happens when the selection changes programmatically? Does onSelect still get called?&lt;br /&gt;
* If there is no selection, what should the contiguous property return--false, undefined, something else?&lt;br /&gt;
* If contiguous is true but the API user calls the text and html getter properties, what is returned? The text or html of the first selection? undefined?&lt;br /&gt;
* What happens if the contiguous selections change while they are being iterated? In java-land, we would throw a [http://java.sun.com/j2se/1.5.0/docs/api/java/util/ConcurrentModificationException.html ConcurrentModificationException].&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
* [[Labs/Jetpack/JEP/12]]&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=219692</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=219692"/>
		<updated>2010-04-30T16:01:59Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [http://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a5pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now [http://mozillalabs.com/bespin/ Bespin] thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
* Right click on command entry or preview browser opens context menu.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** change skin&lt;br /&gt;
* Firefox&lt;br /&gt;
** view extension&lt;br /&gt;
** stop&lt;br /&gt;
** print preview&lt;br /&gt;
** open error console&lt;br /&gt;
* Developer&lt;br /&gt;
** unescape HTML entities&lt;br /&gt;
** view selection source&lt;br /&gt;
** jQuery API&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to translate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitchoyoshitaka mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* &amp;quot;zoom&amp;quot; zooms the current tab.&lt;br /&gt;
* &amp;quot;highlight syntax&amp;quot; uses [http://code.google.com/p/google-code-prettify/ google-code-prettify].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
* More globals: &amp;lt;code&amp;gt;atob btoa Audio Image DOMParser NodeFilter XMLSerializer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() tabs.length BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq() count() extend() regexp() defineLazyProperty() unescapeHtml()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;notify() listenOnce() parseHtml() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadDivertedInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;ellipsify()&amp;lt;/code&amp;gt; accepts plain string.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() getCommand() executeCommand() previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;isSelected getSelectedNodes() getSelectedRanges()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; is improved in a number of ways. See &amp;lt;code&amp;gt;[[Labs/Ubiquity/Writing_A_Search_Command]].&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
* &amp;lt;code&amp;gt;injectCss()/injectHtml()/injectJs()/loadJQuery()&amp;lt;/code&amp;gt; can specify target document.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=218932</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=218932"/>
		<updated>2010-04-28T09:20:12Z</updated>

		<summary type="html">&lt;p&gt;Satyr: reflected changes up to https://ubiquity.mozilla.com/hg/ubiquity-firefox/rev/1705a34fd7de&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [http://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a5pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now [http://mozillalabs.com/bespin/ Bespin] thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
* Right click on command entry or preview browser opens context menu.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** change skin&lt;br /&gt;
* Firefox&lt;br /&gt;
** view extension&lt;br /&gt;
** stop&lt;br /&gt;
** print preview&lt;br /&gt;
** open error console&lt;br /&gt;
* Developer&lt;br /&gt;
** unescape HTML entities&lt;br /&gt;
** view selection source&lt;br /&gt;
** jQuery API&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* &amp;quot;zoom&amp;quot; zooms the current tab.&lt;br /&gt;
* &amp;quot;hilight syntax&amp;quot; uses [http://code.google.com/p/google-code-prettify/ google-code-prettify].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
* More globals: &amp;lt;code&amp;gt;atob btoa Audio Image DOMParser NodeFilter XMLSerializer&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() tabs.length BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq() count() extend() regexp() defineLazyProperty() unescapeHtml()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;notify() listenOnce() parseHtml() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadDivertedInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;ellipsify()&amp;lt;/code&amp;gt; accepts plain string.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() getCommand() executeCommand() previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;isSelected getSelectedNodes() getSelectedRanges()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; is improved in a number of ways. See &amp;lt;code&amp;gt;[[Labs/Ubiquity/Writing_A_Search_Command]].&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
* &amp;lt;code&amp;gt;injectCss()/injectHtml()/injectJs()/loadJQuery()&amp;lt;/code&amp;gt; can specify target document.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Commands_In_The_Wild&amp;diff=211455</id>
		<title>Labs/Ubiquity/Commands In The Wild</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Commands_In_The_Wild&amp;diff=211455"/>
		<updated>2010-03-29T04:49:23Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* JA */ jamazon&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LEGAL NOTICE: Mozilla is providing links to these third-party Ubiquity commands as a courtesy, and makes no representations regarding the commands or any information related there to. Any questions, complaints or claims regarding the commands must be directed to the appropriate developer or software vendor.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Commands in the Wild &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Please note that the main way we&#039;d like commands to be distributed and shared in the future is via [http://ubiquity.mozilla.com/herd/ The Ubiquity Herd]. Right now there isn&#039;t any social functionality on the Herd, though, which is why we&#039;re using this page to allow for user-contributed commentary and discussion. At some point in the near future we&#039;ll be adding this kind of functionality to the Herd and will migrate the content on this page there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;There Be Dragons Here &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Pioneering can be crazy fun, but also a bit dangerous. The commands referenced here have not been reviewed by Mozilla. They may contain malicious code, so use them only at your own risk. Until Ubiquity becomes more mature, we recommend only adding commands that come from people you trust, or if you&#039;ve read the code and know that they are safe. &lt;br /&gt;
&lt;br /&gt;
Beware that even if you review the code before subscribing, the code may be subject to change from the publisher, and your copy will automatically update on firefox restart. This problem will be remedied in later versions of Ubiquity. &lt;br /&gt;
&lt;br /&gt;
= Country specific Commands  =&lt;br /&gt;
&lt;br /&gt;
== AR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://kontrolakka.tumblr.com/post/143086887/ubiquity-google-search-argentina Google Argentina]: Searches only in Google Argentina (www.google.com.ar) for your words and sets the search to &amp;quot;páginas de Argentina&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== AT  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/25096 gist.github.com/25096]: ÖBB Railway time table search &lt;br /&gt;
*[http://www.oststrom.com/ubiquity oebb railway time table search]: *updated* OEBB Railway time table search, parser2 compatible, preview and geolocation&lt;br /&gt;
&lt;br /&gt;
== BG  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/179119 .BG search] - you can use this command to search some of bulgarian portals such as Dnevnik, dir.bg and gbg (more comming soon). Just install and try &amp;quot;търси&amp;quot; command.There is Ajax function inside for handling different encodings (utf8 and windows-1251)&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/182349 Smali.me] - you can use smali.me short url service from your ubiquity app. Just wtite &#039;smali&#039; or &#039;смали&#039; and see the result.&lt;br /&gt;
&lt;br /&gt;
== BR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://minhavidaorientadaaobjetos.blogspot.com/2009/01/buscap-ubiquity-compare-produtos.html Buscape Command]: Compare products quickly in Buscapé &lt;br /&gt;
*[http://minhavidaorientadaaobjetos.blogspot.com/2009/01/americanascom-para-ubiquity-facilitando.html Americanas.com Command]: Search for products at Americanas.com &lt;br /&gt;
*[http://gist.github.com/65907 lyrics a.k.a. letras]: Search for lyrics at letras.mus.br &lt;br /&gt;
*[http://gist.github.com/65903 whois-br]: Whois search for brazilian hosts (registro.br) &lt;br /&gt;
*[http://gist.github.com/127358 cardapio-ceset]: Shows the menu of the University Restaurant of FATEL-UNICAMP (College of Technology of the State University of Campinas) &lt;br /&gt;
*[http://gist.github.com/159208 MercadoLivre Command]: Search for products at mercadolivre.com.br &lt;br /&gt;
*[http://gist.github.com/194535 ESPN Brasil Command]: Search for news about sport at ESPN Brazil web site&lt;br /&gt;
&lt;br /&gt;
== CA  ==&lt;br /&gt;
&lt;br /&gt;
*[http://mricon.com/ubi/ Montréal Transit]: Look up STM bus and AMT train schedules&lt;br /&gt;
&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/barrie.html Barrie Ontario Library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/biblio.html Montreal library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/calgary.html Calgary Library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/hamilton.html Hamilton library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/victoria.html Victoria BC Library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/vpl.html Vancouver Library]&lt;br /&gt;
&lt;br /&gt;
== CH  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;SBB CFF FFS&#039;&#039;&#039;]: Swiss Railway time table search for [http://www.sbb.ch SBB CFF FFS]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Tel.Search.ch&#039;&#039;&#039;]: Swiss Phone Book search from [http://tel.search.ch tel.search.ch] &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swiss Teletext&#039;&#039;&#039;]: Swiss Teletext page browser. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Rete 3&#039;&#039;&#039;]: visualizza le ultime canzoni in onda su [http://rete3.rtsi.ch/ Rete 3]. Puoi trovare degli screen shot [http://frigi.ch/ubiquity/screenshot qui]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Meteo-local&#039;&#039;&#039;]: show the calculated meteo for a location. Information from [http://www.meteosvizzera.admin.ch Federal Office of Meteorology and Climatology]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Meteo-radar&#039;&#039;&#039;]: show the last radar image from [http://www.meteosvizzera.admin.ch Federal Office of Meteorology and Climatology]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Slf&#039;&#039;&#039;]: show the latest avalanche bulletin from [http://www.slf.ch Institute for Snow and Avalanche Research SLF]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swisswebcams&#039;&#039;&#039;]: show a random webcam image from the site [http://www.swisswebcams.ch Swisswebcams]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swiss News&#039;&#039;&#039;]: show the last 10 news titles from the most popular swiss web site&#039;s. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
&lt;br /&gt;
== CN  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/51784 jiwai]: Command for posting to jiwai.de, a microblogging service in China. For information [http://damienh.org/2009/01/25/ubiquity%e5%8f%bd%e6%ad%aa%e5%91%bd%e4%bb%a4%e5%8a%a0%e5%bc%ba%e7%89%88/ check here]. &lt;br /&gt;
*[http://ubidu.sourceforge.net/ ubidu]: Search Baidu.com, the No.1 search engine in China. &lt;br /&gt;
*[http://17th.name/wp-content/uploads/2008/09/fanfou.html Fanfou Command] - post to Fanfou.com (??) &lt;br /&gt;
*[http://gist.github.com/293592 Translate word with Youdao Dict] - Translate english to chinese and vice versa through dict.youdao.com service. Support eng2chn and chn2eng. Support Long text translate.&lt;br /&gt;
*[http://gist.github.com/25703 Translate word with dict.cn ] - Translate word with dict.cn, both English to Chinese or Chinese to English. (Please re-insatll it for supporting of new API.) &lt;br /&gt;
*[http://gist.github.com/31480 Search in douban] - Search douban items for movie/music/book/generic. With live preview of search results. See a screen shot [http://desktable.blogbus.com/logs/32090698.html here]. &lt;br /&gt;
*[http://gist.github.com/49305 Search in Jukuu] - Retrive a word’s pronounce and example sentences from www.jukuu.com, supports English-Chinese and Chinese-English translations. See a screen shot [http://sealence.x10hosting.com/wordpress/?p=61 here]. &lt;br /&gt;
*[http://gist.github.com/49422 Recite word everyday on iciba.com] - Retrieving 5 words from the every day recite word lists from www.iciba.com. None input for today’s word, input date string like “2009-1-19″ to retrieve previous day. See a screen shot [http://sealence.x10hosting.com/wordpress/?p=63 here]. &lt;br /&gt;
*[http://gist.github.com/88796 Show Chinese Stock] - Show the current price and chart of Chinese Stock, usage: &amp;quot;cnstock jlad in daily&amp;quot; or &amp;quot;cnstock 000623&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== CZ  ==&lt;br /&gt;
&lt;br /&gt;
*[http://ubiquity.wegguy.cz/idos/ idos]: Search Czech public transport connections&lt;br /&gt;
&lt;br /&gt;
== DE  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.tomsgutscheine.de/ Tom&#039;s Gutscheine]: Calls the search engine of Tom&#039;s Gutscheine&lt;br /&gt;
*[http://synapsos.kilu.de/ubiquity/dynastree/command.html verwandt.de]: Searches verwandt.de for profiles (with preview map for Germany). &lt;br /&gt;
*[http://www.gutegutscheine.de/blog/gutegutscheine-de-ubiquity-command/ gutegutscheine.de]: Searches www.gutegutscheine.de for coupons. &lt;br /&gt;
*[http://gist.github.com/174663 bahn.de]: Searches for train connection and current arrival / departure tables for all train stations in Europe. Live data about delays is only available for Deutsche Bahn (Zugauskunft der DB AG wird genutzt). &lt;br /&gt;
*[http://daniel.lomm.es/projects/ubiquity-vrr vrr]: Searches for timetables for trains, trams and buses in the Rhein-Ruhr region. &lt;br /&gt;
*[http://synapsos.kilu.de/ubiquity/openclosed/command.html openclosed]: Searches for opening times of shops and offices in Germany via openclosed.de &lt;br /&gt;
*[http://digioso.org/cgi-bin/ubiquity/amazonde.pl Amazon-DE]: Searches Amazon Germany &lt;br /&gt;
*[http://digioso.org/cgi-bin/ubiquity/googlede.pl Google-DE]: Searches Google Germany &lt;br /&gt;
*[http://digioso.org/cgi-bin/ubiquity/ebayde.pl eBay-DE]: Search for an item on eBay Germany &lt;br /&gt;
*[http://digioso.org/cgi-bin/ubiquity/leo.pl Leo Translation]: Translates a word with Leo English &amp;amp;lt;&amp;amp;gt; German or with all languages with this command: http://frigi.ch/ubiquity &lt;br /&gt;
*[http://gist.github.com/180334 heise.de Preisvergleich]: Searches on heise.de Preisvergleich for price comparisons.&lt;br /&gt;
&lt;br /&gt;
== DK  ==&lt;br /&gt;
&lt;br /&gt;
*[http://u.ter.dk/mitkbh mitkbh]: search locations and reviews in Copenhagen &lt;br /&gt;
*[http://u.ter.dk/tv tv]: Danish tv guide&lt;br /&gt;
&lt;br /&gt;
== FI  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/eat/ eat]: twelve city specific (e.g. eat-helsinki) finnish restaurant searches from eat.fi &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/vapaa-aikavirasto/vapaa-aikavirasto.htm vapaa-aikavirasto]: fi-nationwide restaurant/bar search from vapaa-aikavirasto.com &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/viini/viini.htm viini]: wine review search from viiniweb.net &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/jalkapallo/suomencup.htm suomencup]: search material related to finnish cup football from suomencup.net wiki &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/jalkapallo/veikkausliiga.htm veikkausliiga]: rss news feeds from veikkausliiga football teams&lt;br /&gt;
&lt;br /&gt;
== FR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://baruchel.free.fr/~thomas/code/ubiquity/amazon/ amazon.fr]: Search books on Amazon.fr. &lt;br /&gt;
*[http://gist.github.com/97132 cnrtl.fr/synonymie/]: Search for synonymy.&lt;br /&gt;
&lt;br /&gt;
== KR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://dotnet.pe.kr/ubiquity/me2day_ubiquity.html me2day] - Enables ubiquity to send posts to me2DAY(http://me2day.net) a Korean microblogging site. setme2daykey command sets the username and userkey that is required for posting. &lt;br /&gt;
*[http://sites.google.com/site/coosgadgets/east-asian-language-romanization korean] - Romanization of Korean language (Hangul)&lt;br /&gt;
&lt;br /&gt;
== IE  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/218595 ryanair] - look for a cheap flight on ryanair.com&lt;br /&gt;
&lt;br /&gt;
== IN  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/156384 meaning_in_hindi]- give the meaning of enlish word in hindi &lt;br /&gt;
*[http://gist.github.com/156386 show_lyrics ]- show the lyrics of a hindi song &lt;br /&gt;
*[http://gist.github.com/156389 map_directions]- show the diretions between two places in India &lt;br /&gt;
*[http://gist.github.com/156397 tv_guide] show you the timing of a serial &lt;br /&gt;
*[http://gist.github.com/156401 university_search] let you search about university for a particular course &lt;br /&gt;
*[http://gist.github.com/163454 nse] - provides NSE stock exchange quotes,index information,gainers,losers. Also provide company search.&lt;br /&gt;
&lt;br /&gt;
== IT  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gstefanoni.netsons.org/ubiquity/treni-from.html treni-from] - Searches for the next available train on the selected route on the Trenitalia network (NOT Found) &lt;br /&gt;
*[http://gist.github.com/218507 trenitalia] - Searches for trains &amp;quot;from&amp;quot; some place &amp;quot;to&amp;quot; some other &amp;quot;on&amp;quot; some date (dd/mm/yyyy) using as wellan additional time parameter. &lt;br /&gt;
*[http://gist.github.com/217659 Atac Roma] - 3 commands: (&#039;&#039;atac&#039;&#039; - searches for routes &amp;quot;from&amp;quot; some place &amp;quot;to&amp;quot; some other; &#039;&#039;atac-linea&#039;&#039; - searches for info about a specific bus provided; &#039;&#039;atac-attesa-bus&#039;&#039; - redirects to the mobile page about time you have to wait a provided bus . &lt;br /&gt;
*[http://gist.github.com/145261 GarzantiLinguistica.it] - Italian &amp;amp;lt;=&amp;amp;gt; English and Italian &amp;amp;lt;=&amp;amp;gt; French Dictionary, Italian Dictionary, Italian/English/French Verb Conjugator &lt;br /&gt;
*[http://gist.github.com/155868 televideo] - Script for quick access to Italian public teletext&lt;br /&gt;
&lt;br /&gt;
== JA ==&lt;br /&gt;
*[http://gist.github.com/29674 jamazon] - http://amazon.co.jp/&lt;br /&gt;
*[http://gist.github.com/8346 eijiro] - http://eow.alc.co.jp/ (&#039;&#039;&#039;Japanese&#039;&#039;&#039; &amp;amp;lt;=&amp;amp;gt; English)&lt;br /&gt;
*[http://sites.google.com/site/coosgadgets/east-asian-language-romanization japanese] - Japanese &amp;amp;lt;=&amp;amp;gt; English with Romaji&lt;br /&gt;
&lt;br /&gt;
== MX  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/250487 GoTo] - Command to go to a website since ubiquity.&lt;br /&gt;
&lt;br /&gt;
== NO  ==&lt;br /&gt;
&lt;br /&gt;
*[http://skogvoldconsulting.no/ubiquity/1881/ 1881.no]: Norwegian phone book online. &lt;br /&gt;
*[http://skogvoldconsulting.no/ubiquity/posten/ Sporing på posten.no]: Norwegian mail tracking&lt;br /&gt;
&lt;br /&gt;
== NL  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/35909 vandale]: For looking up words in the free online version of the leading Dutch dictionary: Van Dale. &lt;br /&gt;
*[http://gist.github.com/59840 hyves-zoek]: For looking for people on the social networking site Hyves. &lt;br /&gt;
*[http://kok.thuis99.org/telbo telbo]: For looking up telephone numbers via http://www.telefoongids.nl/&lt;br /&gt;
&lt;br /&gt;
== NZ  ==&lt;br /&gt;
&lt;br /&gt;
*[http://tommo39.com/trademe.html trademe]: Searches trademe.co.nz for whatever item you are looking for.&lt;br /&gt;
&lt;br /&gt;
== PT  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/19991 priberam] - Looks up a word in the Priberam Portuguese dictionary [http://priberam.pt/dlpo/ Priberam] (Homepage [http://sites.google.com/site/edgargoncalves/work/software/ubiquity here])&lt;br /&gt;
&lt;br /&gt;
== RO  ==&lt;br /&gt;
&lt;br /&gt;
*[http://avatars.postiton.net/ avatars] - Search Avatars in English and add to your emails [http://avatars.postiton.net/ avatars.postiton.net] &lt;br /&gt;
*[http://avatare.afisatepe.net/ avatar] - Search Avatar in Romanian and add to your emails [http://avatare.afisatepe.net/ avatare.afisatepe.net]&lt;br /&gt;
&lt;br /&gt;
== RS  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/11398 sr-map] - Search maps of major Serbian cities using [http://mape.b92.net mape.b92.net]&lt;br /&gt;
&lt;br /&gt;
== RU  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/260849 lingvo] - Looks up a word in the Lingvo dictionary &lt;br /&gt;
*[http://gist.github.com/220901 yandex] - Search in yandex&lt;br /&gt;
&lt;br /&gt;
== SE  ==&lt;br /&gt;
&lt;br /&gt;
*[http://raymond.bergmark.googlepages.com/hitta.htm Eniro]: Swedish phone book online. &lt;br /&gt;
*[http://gist.github.com/113738 Hitta.se]: Search hitta.se. &lt;br /&gt;
*[http://www.web.cinaird.se/ubiquity/index.php?dir=hitta Hitta.se for Ubiquity 0.5]: Search hitta.se, compatible with Ubiquity 0.5. &lt;br /&gt;
*[http://www.web.cinaird.se/ubiquity/index.php?dir=kolli Posten.se]: Trace package in sweden with Posten.se.&lt;br /&gt;
&lt;br /&gt;
== TR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://burakcelebi.googlepages.com/ubiquity-eksisozluk.html EksiSozluk Commands] - Commands for http://sozluk.sourtimes.org&lt;br /&gt;
&lt;br /&gt;
*[http://www.deniz.web.tr/ubiquity cevir] - Turkish - English translation command.&lt;br /&gt;
&lt;br /&gt;
*[http://www.azizce.com/wp-content/ubiquity/tdk.html Turk Dil Kurumu &#039;nda Arama] - Fast search command for [http://www.tdk.gov.tr/ Official TDK Website].&lt;br /&gt;
&lt;br /&gt;
*[http://www.verisux.com/ubi-seslisozluk.html seslisozluk] - Integration with seslisozluk.com for quick enlish/german/turkish translations&lt;br /&gt;
&lt;br /&gt;
== TW  ==&lt;br /&gt;
&lt;br /&gt;
*[http://linlichangjen.googlepages.com/ubiquity ydic]: Translate English word to Tratitional Chinese&lt;br /&gt;
&lt;br /&gt;
*[http://fortelin.net78.net/ubiquity/2r 2r, another extended version of twitter command]: with url shortened and edit dialogue function, enjoy it ^^&lt;br /&gt;
&lt;br /&gt;
*[http://fortelin.net78.net/ubiquity/soso soso Command for Ubiquity]:another extended, tabbed version of the google command.&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/84548 tw-stock]: Quote a stock symbol from Taiwan Stock Exchange&lt;br /&gt;
&lt;br /&gt;
== UK  ==&lt;br /&gt;
&lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK&lt;br /&gt;
&lt;br /&gt;
*[http://www.red-eyed.org.uk/ubiquity.html amazonuk]: Search Amazon.co.uk for any item. A version of amazon-search-all customised for the UK version of the Amazon site.&lt;br /&gt;
&lt;br /&gt;
*[http://tevp.net/projects/ubiquity/ journey]: Searches the TfL journeyplanner for a destination. Currently has hardcoded start point and walking speed.&lt;br /&gt;
&lt;br /&gt;
*[http://tat.wright.name/ubiquity-tfl tfl-directions]: Improved TfL journeyplanner based on the above. Start point is not hard coded. (Requires ubiquity 0.5)&lt;br /&gt;
&lt;br /&gt;
*[http://www.socialanimal.com/pubs/ubiquity.htm pubfinder]: Looks for pubs in the specified place or postcode.&lt;br /&gt;
&lt;br /&gt;
*[http://choffee.co.uk/Ubiquity trainuk]: Simple interface to search for train times in the UK.&lt;br /&gt;
&lt;br /&gt;
*[http://github.com/elson/ubiquity-bbc-iplayer/wikis/command-feed BBC iPlayer]: Watch or listen to recent programmes on BBC iPlayer&lt;br /&gt;
&lt;br /&gt;
== Multiple Countries  ==&lt;br /&gt;
&lt;br /&gt;
*[http://garyhodgson.com/ubiquity/amazon.html amazon-locale]: Perform a &#039;Blended&#039; search on Amazon Germany, UK, USA, Japan or Canada.&lt;br /&gt;
&lt;br /&gt;
= Directory Search  =&lt;br /&gt;
&lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK &lt;br /&gt;
*[http://gist.github.com/65093 Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup with preview ]: English (Cambridge). See a screen shot [http://sealence.x10hosting.com/wordpress/?p=66 here].&lt;br /&gt;
&lt;br /&gt;
= Web Search  =&lt;br /&gt;
&lt;br /&gt;
*OneLook Reverse Lookup - http://icecreamfactory.freehostia.com/ubiquity/reverse-lookup.html&lt;br /&gt;
&lt;br /&gt;
== Real-time Search  ==&lt;br /&gt;
&lt;br /&gt;
*Scoopler, spezify, stinkyteddy and exalead commands - http://gist.github.com/218713&lt;br /&gt;
&lt;br /&gt;
== Site-specific Search  ==&lt;br /&gt;
&lt;br /&gt;
*Agentarius User-Agent-Info - http://www.agentarius.net &lt;br /&gt;
*All Music Guide - http://a9ej32w.googlepages.com/allmusic &lt;br /&gt;
*Allrecipes.com - http://www.javajill.com/ubiquity/recipe.html &lt;br /&gt;
*AltLaw - http://www.keysquaremedia.com/ &lt;br /&gt;
*Archive.org - http://ubiquity.washing-up.co.uk/archive.html &lt;br /&gt;
*Aspectweb - http://annoq.aspectweb.org/uq.html &lt;br /&gt;
*Avatars - http://avatars.postiton.net &lt;br /&gt;
*Babylon - http://www.geocities.com/ubiquities1 &lt;br /&gt;
*Beat Goes On - http://***.pixelcore.ca/bgo_ubiquity/ (Used CDs DVDs &amp;amp;amp; Video Games) &lt;br /&gt;
*BibleGateway - http://www.zenorsoft.com/ubiquity.php (Looks up Bible Verses; OLD API), for a new API version of this command, see http://gist.github.com/283936&lt;br /&gt;
*Bing -http://gist.github.com/121595 (Search using Microsoft Bing) &lt;br /&gt;
*Bing - http://marcbelmont.com/command/bing Searches with result previews and keyword coloring [http://marcbelmont.com/command/bing screenshot] &lt;br /&gt;
*BitDefender Virus Search - http://www.bitdefender.com/site/VirusInfo/browseVirusEnciclopedia/ (Search for viruses in BitDefender&#039;s Virus Encyclopedia) &lt;br /&gt;
*Blogsearch - http://gist.github.com/156383 &lt;br /&gt;
*BoardGameGeek - http://www.hunterandlori.com/ubiquity/ [old api] &lt;br /&gt;
*Box Office Mojo - http://gist.github.com/165452 &lt;br /&gt;
*Brainstorm #9 - http://www.brainstorm9.com.br &lt;br /&gt;
*Cambridge - http://sealence.x10hosting.com/wordpress/?p=66 &lt;br /&gt;
*CharlieRose.com - http://erikvold.com/tools/ubiquity/charlierose/charlierose.cfm &lt;br /&gt;
*Common Lisp Hyperspec - http://common-lisp.net/project/lifp/ubiquity/clhs.htm &lt;br /&gt;
*Coxa Creme (Brazil) - http://gist.github.com/10795 &lt;br /&gt;
*craigslist - http://labs.vunite.com/vubiqs/verbs.php &lt;br /&gt;
*Deal Extreme - http://skogvoldconsulting.no/ubiquity/dealextreme &lt;br /&gt;
*Demonoid - http://www.thecompgeek.info/ubiquity/demonoid.html &lt;br /&gt;
*Deezer - http://jacquin.pascal.free.fr/ubiquity/ (Search&amp;amp;amp;listen music online) &lt;br /&gt;
*Dictionary.com - http://erikvold.com/tools/ubiquity/dictionary/dictionary.cfm &lt;br /&gt;
*Digg - http://captspify.is-a-geek.com/scripts/Home/Ubiquity (Searches Digg) &lt;br /&gt;
*dinehere.ca - http://dairong.googlepages.com/ubiquity.html &lt;br /&gt;
*Discogs - http://a9ej32w.googlepages.com/discogs &lt;br /&gt;
*eBay (geodetects your location and searches accordingly) - http://mskadu.googlepages.com/ebaysearch2 &lt;br /&gt;
*EmacsWiki - http://ubiquity.chrononaut.net/emacswiki.html &lt;br /&gt;
*Engrish Funny - http://www.zentu.net/ubiq/engrishfunny.html &lt;br /&gt;
*eMule Content Database - http://gist.github.com/185090 &lt;br /&gt;
*Failblog - http://www.zentu.net/ubiq/failblog.html &lt;br /&gt;
*Flickr slideshow - http://www.spencerwaterbed.com/soft/ubiquity/slideshow.html &lt;br /&gt;
*Fileshunt - http://avid.me/ubi/fileshunt.html &lt;br /&gt;
*Filestube - http://gist.github.com/240546 &lt;br /&gt;
*Filmweb.pl - http://gist.github.com/19735 http://gist.github.com/120581 &lt;br /&gt;
*Firefox add-ons - http://www.rakudave.ch/?q=node/20 &lt;br /&gt;
*Freebase - http://hamstersoup.com/freebase/ubiquity/ &lt;br /&gt;
*Futureshop.ca - http://dairong.googlepages.com/ubiquity.html &lt;br /&gt;
*GamesCom.de - http://digioso.org/cgi-bin/ubiquity/gcsearch.pl &lt;br /&gt;
*Garzanti - http://gist.github.com/145261 &lt;br /&gt;
*GitHub - http://ubiquity.chrononaut.net/github.html &lt;br /&gt;
*Geocaching - http://gist.github.com/234537 &lt;br /&gt;
*Google Image (with preview) - http://gist.github.com/10704 &lt;br /&gt;
*Google Image Search (preview, links, embedding) - http://www.jimmy2k.it/getimagescommand &lt;br /&gt;
*Google Trends (with preview) - http://gist.github.com/10706 &lt;br /&gt;
*Google Scholar - http://gist.github.com/180078 &lt;br /&gt;
*Google Books - http://www.radiantweb.net/ubiquity/ &lt;br /&gt;
*Goto webpage - http://gist.github.com/104240 &lt;br /&gt;
*Gumtree - http://dave.org.uk/ubiquity/gumtree.html &lt;br /&gt;
*Hoogle - http://www.randomhacks.net/git/ubiquity/hoogle/ &lt;br /&gt;
*Hotdog! LOLDogs - http://www.zentu.net/ubiq/hotdog.html &lt;br /&gt;
*Howjsay - http://gist.github.com/150109 (Talking Dictionary of English Pronunciation) &lt;br /&gt;
*Hulu - http://gist.github.com/51468 &lt;br /&gt;
*Imdb + preview - http://synapsos.kilu.de/ubiquity/imdbpreview/command.html &lt;br /&gt;
*Iciba.com(irecite) - http://sealence.x10hosting.com/wordpress/?p=63 &lt;br /&gt;
*Intershame.com - http://intershame.com/ubiquity/ &lt;br /&gt;
*Jaiku - http://jonasnockert.com/2008/08/ubiquity-code-for-jaiku-search/ &lt;br /&gt;
*Jiwa - http://jacquin.pascal.free.fr/ubiquity/ (Search&amp;amp;amp;listen music online) &lt;br /&gt;
*Jukuu - http://sealence.x10hosting.com/wordpress/?p=61 &lt;br /&gt;
*Kewego.fr - http://ht.ubiquity.googlepages.com/ubiquity-kewego.html &lt;br /&gt;
*Last.fm artist and album search - http://progoth.com/ubiquity-lastfm/ &lt;br /&gt;
*Last.FM - http://static.isnotworking.com/lastfm-search.html &lt;br /&gt;
*Last.fm &amp;quot;advanced&amp;quot; - http://satf.se/projects/ubiquity-commands/ubiquity-advanced-lastfm-search/ &lt;br /&gt;
*Last.fm Artist Lookup - http://gist.github.com/50505 &lt;br /&gt;
*leo.org dictionary - http://users.kilu.de or http://frigi.ch/ubiquity &lt;br /&gt;
*LibraryThing - http://www.quicksilverillness.com/ubiquity/librarything_searches.html &lt;br /&gt;
*Lifehacker.com search - http://gist.github.com/47455 &lt;br /&gt;
*Lifehacking tagcloud search - http://lifehacking.nl/web20/ubiquity-verbindt-het-web-weer/ (Dutch only!) &lt;br /&gt;
*Live - http://www.powerset.com &lt;br /&gt;
*LolCats latest image - http://members.optusnet.com.au/~crazyjane13/lolcats.html &lt;br /&gt;
*LoveFilm - http://dave.org.uk/ubiquity/lovefilm.html &lt;br /&gt;
*metacritic.com - http://dairong.googlepages.com/ubiquity.html &lt;br /&gt;
*metal-archives.com - http://people.iola.dk/arj/2008/09/02/adding-some-metal-to-ubiquity/ &lt;br /&gt;
*Moviefone - http://gist.github.com/91224 &lt;br /&gt;
*Mozilla Add-ons - http://projects.fligtar.com/ubiquity/add-on.php &lt;br /&gt;
*Mozilla Add-ons (by folarb) - http://gist.github.com/34678 &lt;br /&gt;
*MusicBrainz - http://a9ej32w.googlepages.com/musicbrainz &lt;br /&gt;
*NCIX.com - http://dairong.googlepages.com/ubiquity.html &lt;br /&gt;
*netflix - http://radria.sqlfusion.com/ubiquity.php &lt;br /&gt;
*NewAdvent.org - http://gist.github.com/54249 &lt;br /&gt;
*Newegg - http://test.fathomthat.org/ubiquity/newegg.html &lt;br /&gt;
*Newzbin - http://www.quicksilverillness.com/newzbin_search.html &lt;br /&gt;
*Orkut User Search - http://avid.me/ubi/orkut.html &lt;br /&gt;
*PubMed - http://gist.github.com/180067 or [0.5 incompatible] http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/pubmed/search-pubmed.js &lt;br /&gt;
*Powerset - http://www.powerset.com &lt;br /&gt;
*Questionable Content MediaFire Thread - http://bluesuncorp.co.uk/bbq/mfsearch.htm &lt;br /&gt;
*Reddit - http://captspify.is-a-geek.com/scripts/Home/Ubiquity/ &lt;br /&gt;
*RetailMeNot - http://www.quicksilverillness.com/ubiquity/retailmenot.html &lt;br /&gt;
*REVU - http://revu.ubuntuwire.com/ubiquity-plugin.py &lt;br /&gt;
*Rotten Tomatoes - http://gist.github.com/226548 &lt;br /&gt;
*routerank - http://gist.github.com/209714 (en|de|fr|es) &lt;br /&gt;
*Ruhr-University Bochum OPAC - http://bibliolabs.ub.rub.de/ubiquity &lt;br /&gt;
*Shoutcast Search &lt;br /&gt;
*SearchMe - http://www.thecompgeek.info/ubiquity/searchme.html &lt;br /&gt;
*Skweezer - http://unplugd.com/enblogd &lt;br /&gt;
*Smelly Cat - http://www.smellycat.com.br &lt;br /&gt;
*Smug-search - http://www.robertnyman.com/2009/03/26/search-smugmug-photos-easily-with-smug-search-ubiquity-command/ &lt;br /&gt;
*Snow Report - http://www.freewebs.com/wwprograms/ubiquity.htm &lt;br /&gt;
*Social Actions - http://www.crankreport.org/junkdrawer/js/ubiq_social_actions_page.html &lt;br /&gt;
*SongMeanings.net - http://captspify.is-a-geek.com/scripts/Home/Ubiquity/ &lt;br /&gt;
*stock.xchng / sxc.hu - http://www.juhamakkonen.com/ubiquity/commands/images/sxc.hu/sxc.htm &lt;br /&gt;
*Subscene - http://avid.me/ubi/subscene.html &lt;br /&gt;
*suggest-experts - [http://gist.github.com/15544 subscribe], [http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/pubmed/suggest-experts.js project at google code] &lt;br /&gt;
*SurfTheChannel.Com - [http://thecompgeek.info/ubiquity/surfthechannel.html http://thecompgeek.info/ubiquity/surfthechannel.html] &lt;br /&gt;
*The Daily Show - http://synapsos.kilu.de/ubiquity/dailyshow/command.html &lt;br /&gt;
*TheFreeDictionary - http://gist.github.com/144913 &lt;br /&gt;
*Thesaurus - Used to search thesaurus.reference.com http://www.zacharyspencer.com/2008/09/my-first-ubiquity-command/ &lt;br /&gt;
*Thottbot - http://topthis.tv/ubiquity/ &lt;br /&gt;
*TinEye - http://common-lisp.net/project/lifp/ubiquity/tineye.htm &lt;br /&gt;
*The Sri Lankan Tech Guide - http://www.thesrilankantechguide.com/ubiquity.html &lt;br /&gt;
*Tonight.eu - http://www.tonight.eu/ubiquity/ &lt;br /&gt;
*Ubuntu brainstorm - http://www.rakudave.ch/?q=node/21 &lt;br /&gt;
*Ultimate Guitar (supports grabbing FoxyTunes track info) - http://propus.lunarpages.com/~thefo2/ug.htm &lt;br /&gt;
*Update or Die (Brazil) - http://gist.github.com/10788 &lt;br /&gt;
*Urban Dictionary - http://common-lisp.net/project/lifp/ubiquity/urban-dictionary.htm (now with preview!) &lt;br /&gt;
*Urban Dictionary, alternate version - http://gist.github.com/47363 &lt;br /&gt;
*Vimeo - http://gist.github.com/72179 &lt;br /&gt;
*Viu Isso? (Brazil) - http://gist.github.com/10791 &lt;br /&gt;
*YTMND.com - http://gist.github.com/21802 &lt;br /&gt;
*Walk Score - http://gist.github.com/102868 &lt;br /&gt;
*Walk Score (Updated for Ubiquity 0.5) - http://gist.github.com/158453 &lt;br /&gt;
*Wapedia Search - http://unplugd.com/enblogd &lt;br /&gt;
*The Wayback Machine - http://www.yardensachs.com/ubiquity/ &lt;br /&gt;
*Webmd search - http://predator101.webng.com/ubiquity/webmd.html &lt;br /&gt;
*Websource.It - http://www.briandgoad.com/blog/ubiquity-commands/websourceit/ &lt;br /&gt;
*What.CD - http://corevette.googlepages.com/whatcdubiquity.html &lt;br /&gt;
*WhitePages.com - http://charlesconnell.com/ubiquity.html &lt;br /&gt;
*Wikiquote - http://www.geocities.com/ubiquities1 &lt;br /&gt;
*Wolfram|Alpha - http://common-lisp.net/project/lifp/ubiquity/wolfram.htm &lt;br /&gt;
*Wordnik – http://jonasnockert.com/2008/10/ubiquity-wordnik/ &lt;br /&gt;
*WorldCat - http://bibliolabs.ub.rub.de/ubiquity &lt;br /&gt;
*WTFCalls.com - http://wtfcalls.com/search/ &lt;br /&gt;
*WTSBooks.com - http://www.nerdlets.org/2009/01/14/ubiquity-command-for-the-westminster-bookstore/ &lt;br /&gt;
*xkcd - http://ieng6.ucsd.edu/~rjc002/ &lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK &lt;br /&gt;
*Yahoo! Finance http://www.hoffstein.net/ubiquity/stock-quote.html Stock quote for one or more tickers (comma-separated) &lt;br /&gt;
*Yahoo! Finance http://www.hoffstein.net/ubiquity/stock-chart.html 1Y stock chart for a given ticker &lt;br /&gt;
*Yahoo! Finance http://www.matthias-schuetz.eu/yfin-ubiquity.html Quickly review stock quotes and charts &lt;br /&gt;
*Yahoo! Finance http://proplus.aptanacloud.com/ubiquity/yahoo-graph.html Tiny Year To Date ticker chart &lt;br /&gt;
*dict.youdao.com / dict.yodao.com - http://www.utblog.com/tools/ubiquity/yodao-dict.htm &lt;br /&gt;
*Zappos - http://topthis.tv/ubiquity/ &lt;br /&gt;
*Zipzoomfly - http://test.fathomthat.org/ubiquity/zipzoomfly.html &lt;br /&gt;
*Zootool - http://zootool.com/blog/2008/08/27/zootool-and-ubiquity/&lt;br /&gt;
&lt;br /&gt;
== Web Lookup  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm whois]: Performs a whois on selected or typed URL/IP. &lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm ping]: Pings the selected or typed URL/IP &lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm lookup]: Performs a lookup on selected or typed URL/IP. &lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm tracert]: Performs a tracert on selected or typed URL/IP. &lt;br /&gt;
&lt;br /&gt;
[http://www.rakudave.ch/?q=node/25 just-ping]: Pings the selected or typed URL/IP from 32 checkpoints worldwide. &lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm isdown]: Takes selected or typed URL and determines if it is working using the downforeveryoneorjustme.com tool. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/9285 Whats-My-IP]: Gets your IP address and displays it in the preview. Copies IP to clipboard on execute. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10700 Search-Domain-Name]: Checks the availability of com/org/net TLD domain names. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10707 Traffic]: Get Compete traffic charts for the given site. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10703 Host]: Checks the Web Host of the given site. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10702 Site-Down]: Checks if the site is down. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10249 Gmane]: Look up gmane group &lt;br /&gt;
&lt;br /&gt;
== Google  ==&lt;br /&gt;
&lt;br /&gt;
=== extensions of the core commands  ===&lt;br /&gt;
&lt;br /&gt;
*[http://mytechieself.blogspot.com/2008/08/writing-ubiquity-commands.html Google Scholar and Google Patent Searches] &lt;br /&gt;
*[http://www.radiantweb.net/ubiquity/ Google Book Search] &lt;br /&gt;
*[http://www.radiantweb.net/ubiquity/ Google News Search] &lt;br /&gt;
*[http://hondje.mine.nu/ubiquity/ Google Search within current domain] &lt;br /&gt;
**[http://www.endolith.com/ubiquity_commands.html Version that lets you specify which domain] &lt;br /&gt;
*[http://pynej.blogspot.com/2008/10/ubiquity-command-search-google-web.html Google Web History Search] &lt;br /&gt;
*[http://www.anod1.free.fr/pdf.html pdf] is a command that search pdf files with google. &lt;br /&gt;
*[http://threepipeproblem.com/ubiquity/gmine_ubiquity.html Gmine] searches Gmail, Google Calendar, and GDocs for your search term. &lt;br /&gt;
*[http://gist.github.com/60561?google++ google++] all-in-one pack of google services (web/image/video/mail/reader/code) with improved previews. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/signout.html Signout]: sign out of your google account from ubiquity &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/insearch.html Search inside]: Google search in the current website. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/task.html Tasks]: open your [http://mail.google.com/tasks/ig?pli=1 gmail tasks] in a new window.&lt;br /&gt;
&lt;br /&gt;
=== Google Feeling Lucky  ===&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/16507 Quicky] not only runs your input through I&#039;m Feeling Lucky, but lets you preview the page also. A quick, dirty splice up of &#039;go&#039; and &#039;goto&#039;. &lt;br /&gt;
*[http://point.pt/~guillaume/ubiquity/feeling-lucky.html Feeling-lucky] is a simple command that looks up the first result and displays it on the preview, and upon hitting enter, it executes by opening that particular web-page. &lt;br /&gt;
*[http://point.pt/~guillaume/ubiquity/feeling-lucky.html Link-to-feeling-lucky] is a command that is similar to &#039;&#039;link-to-wikipedia&#039;&#039;: upon execution it injects a link to google&#039;s first result on the rich text-editing field. Quite handy when linking to companies websites while blogging.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[[User:Griflet|Griflet]]: I renamed these commands with their natural names. The old commands with their original names can still be found [http://point.pt/~guillaume/ubiquity/myCows.html here]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
=== google hacks  ===&lt;br /&gt;
&lt;br /&gt;
*[http://www.anod1.free.fr/music.html music] is a command that use google hacks in order to find mp3 or ogg music. &lt;br /&gt;
*[http://www.anod1.free.fr/video.html video] is a command that use google hacks in order to find video. &lt;br /&gt;
*[http://icecreamfactory.freehostia.com/ubiquity/googlism.html googlism] shows what google.com thinks of you, your friends or anything &lt;br /&gt;
*[http://gist.github.com/123073 gdefine] Performs a google search with the prefix &amp;quot;define:&amp;quot; to find definitions for a word.&lt;br /&gt;
&lt;br /&gt;
=== google image search  ===&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/85963 Google Image Search] is a command that allows you to search images on google. You can also choose a color and google gives you only the images matching your color. It&#039;s not well programmed, so feel free to improve it. Be sure to give me some feedback.&lt;br /&gt;
&lt;br /&gt;
=== Google Chart API Commands  ===&lt;br /&gt;
&lt;br /&gt;
*[http://github.com/nhorvath/Ubiquity-QRCode QRCode Generator] is a command that generates QR Codes with the Google Chart API. It will encode whatever text you pass it into the QR Code which then can be scanned by mobile devices and barcode readers that support QR Codes.&lt;br /&gt;
&lt;br /&gt;
=== Google Wave  ===&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/217223 Wave] allows you to search for waves using advanced modifiers or clickable shortcuts for the folders/criteria.&lt;br /&gt;
&lt;br /&gt;
== Multiple site search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://math-www.uni-paderborn.de/~axel/ubiquity_search.html multi-search]: Searches Google, Yahoo, MSN Live and Ask.com simultaneously, in different tabs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Let Me Google That For You  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/144222 lmgtfy]: create a link to a (not so?) subtle suggestion for someone who asks you, via a computer, about something that Google might be able to answer. Courtesy of [[LetMeGoogleThatForYou.com]]. The [http://gist.github.com/45201 old pre-0.5 version] is deprecated.&lt;br /&gt;
&lt;br /&gt;
== Picitup Visual Search  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.picitup.com]: 2 commands: &lt;br /&gt;
&lt;br /&gt;
*shop - Executes a shopping search with visual similarity and shopping compariosn - [http://www.picitup.com/picitup/picShop.jsp] &lt;br /&gt;
*picitup - Executes a visual search query agianst, Yahoo, Flikcr and Picasa image search engines [http://www.picitup.com]&lt;br /&gt;
&lt;br /&gt;
== Legal Citation Search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.keysquaremedia.com legal-cite]: Executes search of AltLaw for U.S. Code (federal statutes) and some federal case law (i.e., Supreme Court Opinions and federal appeals court opinions that were reported by West)&lt;br /&gt;
&lt;br /&gt;
== Oracle  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.pythian.com/blogs/1187/ubiquity-and-tahiti-together-at-last Tahiti]: Executes search of Oracle documentation from their repository at http://tahiti.oracle.com. Can search all docs or version-specific docs. &lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts search-oracle-docs: Search through the Oracle Documentation on] [http://www.oracle.com/technology/documentation/index.html Oracle Documentation website]&lt;br /&gt;
&lt;br /&gt;
== Torrent Search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://slackers.se/projects/ubiquity-hdbits HDBits]: Search for torrents on HDBits. &lt;br /&gt;
*[http://217.209.1.243/~sertion/ubiquity/isohunt/ Search isoHunt] in the Ubiquity preview. Open results with accesskey or mouseclick. &lt;br /&gt;
*[http://entvibes.com/torrents.htm torrent]: Search for torrents on ALL the big trackers at once (uses Torrent Vortex and Torrent-Finder) &lt;br /&gt;
*[http://www.furey.com.au/stuff/ubiquity/mininova/ mininova]: Search for torrents on [http://Mininova.org Mininova]. Refine your search using categories (&amp;quot;in&amp;quot;) and sort types (&amp;quot;as&amp;quot;). &#039;&#039;&#039;Now version 0.5.4 compatible!&#039;&#039;&#039; &lt;br /&gt;
*[http://garyhodgson.com/ubiquity/torrent.html mininova]: Performs a search for the selected text on [http://Mininova.org Mininova]. Optionally, a category can be defined, e.g. Books, Anime, etc.) &lt;br /&gt;
*[http://garyhodgson.com/ubiquity/torrent.html mininova-imdb]: Performs a search on Mininova.org for a given IMDB code (with or without the &#039;tt&#039;-prefix). &lt;br /&gt;
*[http://gist.github.com/53950 imdbt]: Accurately search for movie torrents on mininova. Type movie keywords and specify desired movie with the &amp;quot;with&amp;quot; mod phrase using the movie&#039;s imdb code shown in the preview (start typing &amp;quot;with t&amp;quot; and choose from autocomplete suggestions). Search will be done using imdb code if available or keywords otherwise. &lt;br /&gt;
*[http://gist.github.com/57852 thePirateBay]: Performs a search for (a) given word(s) on [http://ThePirateBay.org ThePirateBay]. The result will be display directly on the ubiquity preview window, you can start downloading without opening a new tab. &lt;br /&gt;
*[http://gist.github.com/64552 piratebay]: Search for a torrent on Pirate Bay, with the option of specifying a category (Audio/Video/Software/Games/Other) and/or a sort (Type/Name/Uploaded/Size/Seeds). &lt;br /&gt;
*[http://garyhodgson.com/ubiquity/torrent.html piratebay]: Performs a search for the selected text on [http://ThePirateBay.org ThePirateBay]. Optionally, a category can be defined, e.g. Audio, Video, etc.) &lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts search-torrentz: Search for torrents] on [http://www.torrentz.com Torrentz.com] &lt;br /&gt;
*[http://math-www.uni-paderborn.de/~axel/ubiquity_torrent.html torrent-search]: Searches on PirateBay, Isohunt and Torrentz simultaneously, in different tabs. &lt;br /&gt;
*[http://knightar.artician.com/blog/2008/09/TokyoToshocom-Search-Addon-for-Ubiquity/ tokyotosho]: Searches and lists TokyoTosho.com torrents. (Optionally, a category can be defined, e.g. Anime, Manga, Drama, Raws, etc.) &lt;br /&gt;
*[http://www.thecompgeek.info/ubiquity/demonoid.html Demonoid]: Searches for the predetermined set of keywords on Demonoid.com. Plain and simple. &lt;br /&gt;
*[http://avid.me/ubi/speckly.html Speckly]: Searches for keywords on Speckly.com - Searches 10 torrent sites &lt;br /&gt;
*[http://www.dca.fee.unicamp.br/~tatai/ubiquity btjunkie-search]: Searches for torrents on BTJunkie &lt;br /&gt;
*Searches for torrents on [http://bhagwad.com/blog/2009/04/ubiquity-torrent-search-mininova-isohunt-piratebay.html Mininova, IsoHunt and PirateBay]. Opens in three new tabs&lt;br /&gt;
&lt;br /&gt;
= Words and Languages  =&lt;br /&gt;
&lt;br /&gt;
*[http://mskadu.googlepages.com/bitly2 langid] - Identify which language any text has been written in. &lt;br /&gt;
*[http://gist.github.com/119827 lingvo]: Russian / English &lt;br /&gt;
*[http://developer.swekee.com/ubiquity/ David Álvaro &amp;amp;lt;&amp;amp;gt; Diccionario de la lengua de la Real Academia Española ]: Español / Spanish (D-RAE) &lt;br /&gt;
*[http://yardensachs.com/ubiquity/ Yarden&#039;s Hebrew&amp;amp;lt;&amp;amp;gt;English Morfix dictionary lookup ]: morfix &lt;br /&gt;
*[http://yardensachs.com/ubiquity/ Yarden&#039;s Hebrish&amp;amp;lt;&amp;amp;gt;Engrew convert - between Hebrew char&#039;s and English char&#039;s with QWERTY layout ]: hetoen / entohe &lt;br /&gt;
*[http://halcy.de/past/2008/8/27/mozilla_ubiquity_beolingus_germanenglish_dictionary/ German&amp;amp;lt;&amp;amp;gt;English dictionary lookup ]: beo &lt;br /&gt;
*[http://www.satf.se/page/ubiquity-japanese-english-romaji-dictionary pihl&#039;s Japanese&amp;amp;lt;&amp;amp;gt;English romaji dictionary lookup ]: jaen &lt;br /&gt;
*[http://radheef.com/ubiquity/ Dhivehi Radheef (dictionary) lookup ]: jaa &lt;br /&gt;
*[http://olobolger.blogspot.com/2008/08/mozilla-ubiquity.html RAE Spanish dictionary definition lookup]: rae &lt;br /&gt;
*[http://www.geocities.com/baloo_rch/rae_ubiquity.html Real Academia Española Diccionário/Dictionary Definition Lookup (with preview) ]: definir &lt;br /&gt;
*[http://www.heartsmagic.net/ubi.html Seslisozluk, Zargan English &amp;amp;lt;-&amp;amp;gt; Turkish look up] English &amp;amp;lt;-&amp;amp;gt; Turkish &lt;br /&gt;
*[http://www.verdsveven.com/ubiquity/nn_nb_dict.html Nynorskordboka og Bokmålsordboka]: Norwegian dictionaries &lt;br /&gt;
*[http://www.jpemartin.com/ubiq/calc2.html calc2] - natural language calculator &lt;br /&gt;
*[http://jarfil.net/ubiquity/dict.html dict.org lookup]: dict &lt;br /&gt;
*[http://gist.github.com/60377 dizionario]: - Italian dictonary (Hoepli) &lt;br /&gt;
*[http://gist.github.com/70871 De Mauro]: - Search Italian Dictionary De Mauro Paravia &lt;br /&gt;
*[http://claude.duvergier.fr/developpements/ubiquity/conjugate/conjugate.html conjugate]: French conjugation of verbs using [http://www.leconjugueur.com leconjugueur.com] (CDuv) &lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/dialectrics.html French characters] -displays and inserts common accented french characters (dialectrics).&lt;br /&gt;
*[http://pnxk.freehostia.com/ubiquity/rae_dictionary.html Real Academia Española Diccionário/Dictionary Definition Lookup ]: Español / Spanish (RAE) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== English ==&lt;br /&gt;
*[http://apoema.net/langbot/en/gc.lb?topic=ubiquity grammar]: Performs grammar checking under selected text and suggests corrections. Several languages supported. &lt;br /&gt;
*[http://tat.wright.name/ubiquity-spell/ spell]: Use Google to find a correct spelling for a guessed spelling of a word. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/spell.html spell]: Use Aspell to find a correct spelling for a guessed spelling of a word. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/wordnet.html wordnet]: Lookup a word in wordnet&lt;br /&gt;
*[http://pnxk.freehostia.com/ubiquity/cambridge_dictionary.html Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup ]: English (Cambridge) &lt;br /&gt;
*[http://gist.github.com/65093 Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup with preview ]: English (Cambridge). See a screen shot [http://sealence.x10hosting.com/wordpress/?p=66 here]. &lt;br /&gt;
*[http://gist.github.com/84553 pronounce]: Pronounce a selected or typed English word&lt;br /&gt;
&lt;br /&gt;
= Programming Languages  =&lt;br /&gt;
&lt;br /&gt;
== Asterisk  ==&lt;br /&gt;
&lt;br /&gt;
[[Labs/Ubiquity/dial]]: Configure your Asterisk PBX to use the &#039;dial&#039; command for Ubiquity. &lt;br /&gt;
&lt;br /&gt;
== Common Lisp  ==&lt;br /&gt;
&lt;br /&gt;
*[http://common-lisp.net/project/lifp/ubiquity/clhs.htm Search Common Lisp Hyperspec]&lt;br /&gt;
&lt;br /&gt;
== C++  ==&lt;br /&gt;
&lt;br /&gt;
[http://abauchu.net/ubiquity/search-cpp.html search-c++] Searches a term on [http://www.cplusplus.com cplusplus.com]. &lt;br /&gt;
&lt;br /&gt;
== jQuery  ==&lt;br /&gt;
&lt;br /&gt;
#[http://erikvold.com/tools/ubiquity/jquery/jquery.cfm jquery]: Searches the jQuery documentation. &lt;br /&gt;
#http://marcbelmont.com/command/bing Searches the jQuery documentation with result previews and keyword coloring [http://marcbelmont.com/command/bing screenshot]&lt;br /&gt;
&lt;br /&gt;
== PHP  ==&lt;br /&gt;
&lt;br /&gt;
[http://josuerodriguez.com/2009/08/ubiquity-php-search-preview-updated/ php] Search &amp;amp;amp; Preview PHP function specs, comments, examples, etc. example: php strstr examples &lt;br /&gt;
&lt;br /&gt;
[http://taukon.de/ubiquity-php-function.php php] search PHP function documentation example: php join() &lt;br /&gt;
&lt;br /&gt;
[http://taukon.de/ubiquity-php-function-doc.php phpd] search PHP documentation example: phpd class &lt;br /&gt;
&lt;br /&gt;
[http://verath.se/phpdoc phpdoc] Find information about a selected/entered php function example: phpdoc echo &lt;br /&gt;
&lt;br /&gt;
[http://download.sbw.be/projects/ubiquity/php-search.html php] A mix of phpd and phpdoc here above, you get a shortlist and when you hit enter, you are taken to the next php.net tabs open pointing to the most appropriate documenation. example: php str_repl &lt;br /&gt;
&lt;br /&gt;
== Perl  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.grok.in/ubiquity/perl.html perldoc, cpan, monks]: Three commands, one each to search perldocs, CPAN and perlmonks.org &lt;br /&gt;
&lt;br /&gt;
== Rails  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/43619 rails] search rails documentation example: rails link_to &lt;br /&gt;
&lt;br /&gt;
== ActionScript  ==&lt;br /&gt;
&lt;br /&gt;
[http://anirudhs.chaosnet.org/blog/2008.09.04.html as3livedocs, as3desc, as3package]: Three commands, one to open up livedocs page given a class, one to give the description of an actionscript class and another to give the package to which a class belongs to. &lt;br /&gt;
&lt;br /&gt;
== Coldfusion  ==&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/coldfusion/coldfusion.cfm coldfusion]: Search the Coldfusion 8 LiveDocs. &lt;br /&gt;
&lt;br /&gt;
== MySQL  ==&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/mysql/mysql.cfm mysql] &lt;br /&gt;
&lt;br /&gt;
*mysql: Search all of the MySQL documentation. &lt;br /&gt;
*mysql5: Search the MySQL 5.0 reference manual. &lt;br /&gt;
*mysql5.1: Search the MySQL 5.1 reference manual. &lt;br /&gt;
*mysql6: Search the MySQL 6.0 reference manual. &lt;br /&gt;
*mysql-admin: Search the MySQL administrator reference manual. &lt;br /&gt;
*mysql-query-browser: Search the MySQL query browser reference manual &lt;br /&gt;
*mysql-migration-toolkit: Search the MySQL migration toolkit reference manual. &lt;br /&gt;
*mysql-workbench: Search the MySQL workbench reference manual.&lt;br /&gt;
&lt;br /&gt;
[http://mitcho.com/code/select select] - select gives you read access to your MySQL databases right from Ubiquity, with smart suggestions of your table and column names. &lt;br /&gt;
&lt;br /&gt;
== Postgres  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/44867 postgres] &lt;br /&gt;
&lt;br /&gt;
*postgres: Search all of the Postgress documentation. &lt;br /&gt;
*postgres83: Search the Postgress 8.3 reference manual. &lt;br /&gt;
*postgres82: Search the Postgress 8.2 reference manual. &lt;br /&gt;
*postgres81: Search the Postgress 8.1 reference manual. &lt;br /&gt;
*postgres80: Search the Postgress 8.0 reference manual. &lt;br /&gt;
*postgres74: Search the Postgress 7.4 reference manual&lt;br /&gt;
&lt;br /&gt;
== Java  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.cse.ucsd.edu/users/jnguy/java.html Java API] - Wraps a google search pointing to the java API &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/153808 Java API Search] - Another search of the Java API, with a detailed preview. Compatible with Ubiquity 0.5. &lt;br /&gt;
&lt;br /&gt;
== Javascript  ==&lt;br /&gt;
&lt;br /&gt;
*[http://blog.monstuff.com/archives/000341.html Beautify-JS] - Let&#039;s you nicely reformat any selected javascript code. Handy for Ubiquity verb authors.&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/json.html JSON formatter] - makes JSON text prettier&lt;br /&gt;
&lt;br /&gt;
== HTML/CSS Reference  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/62697 W3Schools Search] uses google to search W3Schools&#039; documentation on HTML, javascript, CSS, and other web technologies. &lt;br /&gt;
&lt;br /&gt;
== HTML Validation  ==&lt;br /&gt;
&lt;br /&gt;
[http://joshhuckabee.com/w3c-validator-ubiquity-plugin W3C Validator Ubiquity Plugin] Submits the current page to the W3C&#039;s markup validator. Enter the command &amp;quot;validate&amp;quot; on any publicly available web page and hit enter. &lt;br /&gt;
&lt;br /&gt;
== Wordpress  ==&lt;br /&gt;
&lt;br /&gt;
[http://avid.me/ubi/wordpress.html Wordpress] Searches the terms in Documentation &amp;amp;amp; Forums on Wordpress.com &lt;br /&gt;
&lt;br /&gt;
[http://wpseek.com/ubiquity/ wpseek] Lookup any WordPress function or Template Tag with wpseek.com &lt;br /&gt;
&lt;br /&gt;
== Drupal API  ==&lt;br /&gt;
&lt;br /&gt;
[http://joshhuckabee.com/drupal-api-ubiquity-plugin Drupal API Ubiquity Plugin] Lookup functions, files, constants, etc. in Drupal&#039;s API. Enter the command &amp;quot;drupal&amp;quot; followed by what you wish to lookup. Hit enter to be taken to that item in the API. &lt;br /&gt;
&lt;br /&gt;
== Python  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.vwelch.com/ubiquity/pydoc.html Pydoc] Lookup any Python terms via http://docs.python.org/search.html. Enter &amp;quot;pydoc&amp;quot; followed by the search term. &lt;br /&gt;
&lt;br /&gt;
#http://marcbelmont.com/command/bing Searches the python.org with result previews and keyword coloring [http://marcbelmont.com/command/bing screenshot]&lt;br /&gt;
&lt;br /&gt;
== BSD Man Pages  ==&lt;br /&gt;
&lt;br /&gt;
[http://trolocsis.com/ubiquity/ bsdman] Lookup BSD man pages with apropos support. Enter &#039;bsdman&#039; followed by the search term. Updated for Ubiquity 0.5. &lt;br /&gt;
&lt;br /&gt;
= URL Tools  =&lt;br /&gt;
&lt;br /&gt;
*goto: Simply navigate to any URL - http://gist.github.com/72189 &lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/revcanonical/revcanonical.cfm revcanonical]: Replaces the selected URL with a [http://revcanonical.appspot.com Rev-canonicalized URL!] &lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/relshortlink/relshortlink.cfm relshortlink]: Replaces the selected URL with a [http://rel-shortlink.appspot.com/ rel=shortlink]. &lt;br /&gt;
*[http://gibberish.com/hacks/ubiq/lazylink.html lazylink]: Replaces the selected text with a link to its first hit in Google. &lt;br /&gt;
*[http://gist.github.com/169819 url2pdf]: Select a url then print it to pdf.&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/encode.html Url encode/decode] - change a string back and forth from &#039;percent encoding&#039; &lt;br /&gt;
== mac  ==&lt;br /&gt;
&lt;br /&gt;
https://wiki.mozilla.org/Mac search for manifacturer with last octet of mac adress &lt;br /&gt;
&lt;br /&gt;
== is.gd  ==&lt;br /&gt;
&lt;br /&gt;
[http://arunstechcorner.blogspot.com/2009/02/shorten-urls-in-ubiquity-with-isgd.html is.gd] Shorten and replace the selected URL with is.gd service. The shortened URL is also copied to the clipboard &lt;br /&gt;
&lt;br /&gt;
== Inlinks  ==&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/inlinks/inlinks.cfm Inlinks] Find the number of external inlinks to a provided url (yahoo.com only). &lt;br /&gt;
&lt;br /&gt;
== Links  ==&lt;br /&gt;
&lt;br /&gt;
synonyms: links, parse links, urls, url &lt;br /&gt;
&lt;br /&gt;
[http://kollektive.com/ubiquity/ links] Parses selected text and replaces any URLs found with HTML links. Recognises most common protocols, even creates mailto: links for email addresses. Now works with the new parser in 0.5 &lt;br /&gt;
&lt;br /&gt;
== BuiltWith  ==&lt;br /&gt;
&lt;br /&gt;
[http://bjarki.info/misc/ubiquity/?view=builtwith BuiltWith] Find out what technologies the URL is using. &lt;br /&gt;
&lt;br /&gt;
== Text2Link  ==&lt;br /&gt;
&lt;br /&gt;
[http://text2link.jeffreyjmorgan.com/ubiquity/ Text2Link] opens URLs and sends emails to addresses not marked up as HTML links with the A tag. This is the Ubiquity version of the [https://addons.mozilla.org/en-US/firefox/addon/6003 Text2Link Firefox Extension]. &lt;br /&gt;
&lt;br /&gt;
== shortText.com  ==&lt;br /&gt;
&lt;br /&gt;
2 commands: &lt;br /&gt;
&lt;br /&gt;
*[http://shortText.com/ shorttext]: Creates a shortText URL for any selected text &lt;br /&gt;
*[http://shortText.com/ longtext]: Select any shortText URL on any site and it will replace the URL with the actual content&lt;br /&gt;
&lt;br /&gt;
== Bit.ly  ==&lt;br /&gt;
&lt;br /&gt;
*[http://mskadu.googlepages.com/bitly bitly] - Shortens the selected url using [http://bit.ly Bit.ly]. Pretty much the same as the built-in tinyurl. &lt;br /&gt;
*Shorten URL and copy to clipboard using bit.ly service: http://bit.ly/18Fsn2 &lt;br /&gt;
*Shorten and replace selected URL in a Rich Text Field or reverse an already shortened bit.ly URL: http://bit.ly/315THd &lt;br /&gt;
*[http://alexsydell.com/applications/ubiquity/bitly/ bit.ly for 0.5] - &#039;&#039;&#039;Works with Ubiquity 0.5&#039;&#039;&#039; Shortens and replaces a URL using bit.ly and copies the shortened URL to the clipboard.&lt;br /&gt;
&lt;br /&gt;
== RSS Commander  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/211822 rss commander] - A nice and quick way to browse RSS feeds by typing in a domain.&lt;br /&gt;
&lt;br /&gt;
== ping  ==&lt;br /&gt;
&lt;br /&gt;
*[http://flesler.com/ubiquity/ping/ ping] - Pings a host a certain amount of times and displays a notification for each success or failure.&lt;br /&gt;
&lt;br /&gt;
== sm00sh  ==&lt;br /&gt;
&lt;br /&gt;
Shorten a URL using sm00sh. It uses Bad Behavior and SURBL and URIBL to reduce spam in the database. Simply navigate to [http://smsh.me/action/ubiquity sm00sh] to install using firefox. Use the command &amp;quot;sm00sh&amp;quot; &lt;br /&gt;
&lt;br /&gt;
== places  ==&lt;br /&gt;
&lt;br /&gt;
Search your places history and bookmarks db with ubiquity: &lt;br /&gt;
&lt;br /&gt;
*[https://gist.github.com/144985/cd8cd04e8cc427e66aff6e327ddad4648b92eb43] For ubiquity v0.5+ &lt;br /&gt;
*[http://gist.github.com/53958] For ubiquity versions before 0.5&lt;br /&gt;
&lt;br /&gt;
= ShortURL  =&lt;br /&gt;
&lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/shorturl/shorturl.cfm shorturl]: Replaces the selected URL with a [http://revcanonical.appspot.com/ Rev-Canonicalized] URL of less than 44 characters or else a [http://tinyurl.com TinyUrl].&lt;br /&gt;
&lt;br /&gt;
== LongURL  ==&lt;br /&gt;
&lt;br /&gt;
*[http://longurl.org/tools expand-short-url] Uses the LongURL service to expand URLs shortened with any shortening service (TinyURL.com, Bit.ly, etc.) &lt;br /&gt;
*[http://gist.github.com/230861 longurl.org] Uses the LongURL service to expand shortened URLs. Works with &#039;&#039;&#039;Ubiquity 0.5+&#039;&#039;&#039; and has better preview (title+favicon of linked page)&lt;br /&gt;
&lt;br /&gt;
== Tr.im  ==&lt;br /&gt;
&lt;br /&gt;
[http://almaer.com/firefox/commands/ trimurl] Uses the tr.im service to shorten a URL and put it in your clipboard if successful &lt;br /&gt;
&lt;br /&gt;
[http://ubiquitycommand.appspot.com/trim trim] Inspired by &#039;tinyurl&#039; and works in a similar way but uses tr.im &lt;br /&gt;
&lt;br /&gt;
== Hurl.ws  ==&lt;br /&gt;
&lt;br /&gt;
Shorten a URL using hurl. Simply navigate to [http://www.hurl.ws hurl.ws] to install using firefox. Use the command &amp;quot;hurl&amp;quot; &lt;br /&gt;
&lt;br /&gt;
== a.longreply.com  ==&lt;br /&gt;
&lt;br /&gt;
Use a.longereply.com to convert any section of text into a URL so you can then send this link via IM, Twitter, email? Can send very large peices of text. Use the command &amp;quot;longreply&amp;quot;. To install it [http://a.longreply.com a.longreply.com] &lt;br /&gt;
&lt;br /&gt;
== shorten  ==&lt;br /&gt;
&lt;br /&gt;
The all in one URL shortner: [http://labs.vunite.com/vubiqs/verbs.php vunite&#039;s commands] Usage: shorten [url] using [tinyurl|isgd|bitly|hurl|snipurl] &lt;br /&gt;
&lt;br /&gt;
== kissa.be  ==&lt;br /&gt;
&lt;br /&gt;
A new [http://www.yalazi.org/ubiquity/list.html kissalt, url shortening service], kissalt means &amp;quot;shorten&amp;quot; in Turkish (original word: kisalt) &lt;br /&gt;
&lt;br /&gt;
== u.nu  ==&lt;br /&gt;
&lt;br /&gt;
Inspired by &#039;tinyurl&#039; and works in a similar way but uses [http://u.nu u.nu] Old API: [http://labs.kaanerturk.net/ubiquity/unu/ u.nu] &lt;br /&gt;
&lt;br /&gt;
New API: [http://gist.github.com/166170 u.nu] &lt;br /&gt;
&lt;br /&gt;
== lincr  ==&lt;br /&gt;
&lt;br /&gt;
[http://sathyasays.com/2008/09/21/my-first-ubiquity-command-lincr-it/ Lincr ] is a URL shortening service. The [http://lin.cr homepage] also shows a list of recently Lincr&#039;d URLs and a RSS feed of the same. &lt;br /&gt;
&lt;br /&gt;
== epoxy  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/66647 epoxy] is a Code-Snippet to URL service and uses [http://www.openpaste.org/en/ OpenPaste] to perform its function. More information can be found at [http://epoxy.andhapp.com/ epoxy homepage] &lt;br /&gt;
&lt;br /&gt;
== PageRank Determination  ==&lt;br /&gt;
&lt;br /&gt;
Allows you to check the Google PageRank of the current or any other page. [http://bhagwad.com/blog/2009/04/check-pagerank-with-ubiquity-extension-page-rank.html page-rank] &lt;br /&gt;
&lt;br /&gt;
== urlShort (u.mavrev.com)  ==&lt;br /&gt;
&lt;br /&gt;
[http://u.mavrev.com/ubi u] Shorten and replace the selected URL using the urlShort service at u.mavrev.com. The shortened URL is also copied to the clipboard. &lt;br /&gt;
&lt;br /&gt;
== PunyURL  ==&lt;br /&gt;
&lt;br /&gt;
Shortens and replaces the selected URL using [http://puny.sapo.pt SAPO PunyURL], copying the new URL to the clipboard. [http://gist.github.com/159501 http://gist.github.com/159501] &lt;br /&gt;
&lt;br /&gt;
== Cligs  ==&lt;br /&gt;
&lt;br /&gt;
Shortes and replaces the selected URL using [http://cli.gs/ Cligs], and copies the short URL to the clipboard. [http://gist.github.com/163191 http://gist.github.com/163191] &lt;br /&gt;
&lt;br /&gt;
== Other URL manipulation  ==&lt;br /&gt;
&lt;br /&gt;
*[http://projects.fligtar.com/ubiquity/url.php URL Tool] - Converts selected URLs to links or lets you choose which one to open in a new tab. &lt;br /&gt;
*[http://nevermind85.net63.net/Ubiquity/try.html ToLink] - Converts the selected text link in a real clickable link. &lt;br /&gt;
*[http://blog.monstuff.com/archives/000343.html insert-link] - Search for a link in your history and insert it. &lt;br /&gt;
*[http://earth2marsh.com/ubiquity/percent_encoding Percent Encoding Tools] Commands to percent encode as well as decode (aka &amp;quot;URI encoding&amp;quot;) selected text. Provides preview and/or replaces selected text. &lt;br /&gt;
*[http://kollektive.com/ubiquity/ links] - converts non-marked up text/html which contains urls and email addresses into proper anchor tags. Works within html pages, and in rich text editing fields (eg. rich text editing in GMAIL) &lt;br /&gt;
*[http://pentarious.altervista.org/ubiquity/ urlize] - Scans a text for URLs and opens them in new tabs. A preview is available to open single URLs manually.&lt;br /&gt;
&lt;br /&gt;
[[Media:Example.ogg]] &lt;br /&gt;
&lt;br /&gt;
= Web 2.0 (Social networks, blogs, recommenders, etc)  =&lt;br /&gt;
&lt;br /&gt;
== Add to Any  ==&lt;br /&gt;
&lt;br /&gt;
Parser 1.0: Share current page using any service. Script: http://gist.github.com/102242. &lt;br /&gt;
&lt;br /&gt;
Parser 2.0: Source Script can be located from a [http://code.google.com/p/zainulfranciscusubiquity/source/browse/trunk/+zainulfranciscusubiquity/Ubiquity/addToAny.js Google Code project.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== BackType  ==&lt;br /&gt;
&lt;br /&gt;
#[http://erikvold.com/tools/ubiquity/backtype/backtype.cfm backtype]: Starts a search of BackType, which allows you to do a search for a person&#039;s comments on blogs and other sites.&lt;br /&gt;
&lt;br /&gt;
== CipherHive  ==&lt;br /&gt;
&lt;br /&gt;
A Global search of Moodle Based Courses, Forums, Wiki&#039;s, Blogs, Users, Posts, Authors, etc. &lt;br /&gt;
&lt;br /&gt;
Script: http://www.cipherhive.org/course/view.php?id=19 &lt;br /&gt;
&lt;br /&gt;
To use, just type cipher + the word you wish to search. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Del.icio.us  ==&lt;br /&gt;
&lt;br /&gt;
=== Add a page to your delicious bookmarks  ===&lt;br /&gt;
&lt;br /&gt;
Script: http://gist.github.com/7516 &lt;br /&gt;
&lt;br /&gt;
To use, just type delicious + your tags. &lt;br /&gt;
&lt;br /&gt;
Another Command: http://decafbad.com/UbiquityCommands/ &lt;br /&gt;
&lt;br /&gt;
Highlight some text on the page for notes, activate Ubiquity, enter command share-on-delicious. You can also enter your own notes, assign tags to the bookmark with the &amp;quot;tagged&amp;quot; modifier, and alter the bookmark default page title with the &amp;quot;entitled&amp;quot; modifier. Note that you must also already be logged in at delicious.com to use this command. &lt;br /&gt;
&lt;br /&gt;
Another Command: http://gist.github.com/9499 &lt;br /&gt;
&lt;br /&gt;
Emulates the Delicious.com bookmarklet. Highlight some text on the page for notes, activate Ubiquity, enter command delicious. It will pop up a new window where you can select tags other people have used for the URL. &lt;br /&gt;
&lt;br /&gt;
=== View a users delicious tags  ===&lt;br /&gt;
&lt;br /&gt;
Script: http://parentno.de/ubiquity/?command=get-delicious &lt;br /&gt;
&lt;br /&gt;
Shows del.icio.us bookmarks from this user {username} tagged with {tagname} To use, type get-delicious {username} tag {tagname} &lt;br /&gt;
&lt;br /&gt;
=== View the 10 most popular/recent bookmarks in delicious  ===&lt;br /&gt;
&lt;br /&gt;
Script: &lt;br /&gt;
&lt;br /&gt;
*http://yinosanchez.hostei.com/popular-delicious.php &lt;br /&gt;
*http://yinosanchez.hostei.com/recent-delicious.php&lt;br /&gt;
&lt;br /&gt;
Shows the 10 most popular/recent del.icio.us bookmarks. To use, type recent-delicious or popular-delicious. &lt;br /&gt;
&lt;br /&gt;
== Evernote  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/50974 clip to Evernote] Clip the current web page selection to Evernote&lt;br /&gt;
*[http://gist.github.com/313760 search Evernote] Search an Evernote Web account&lt;br /&gt;
&lt;br /&gt;
== Facebook  ==&lt;br /&gt;
&lt;br /&gt;
Lets you update your status and go quickly to a friend&#039;s profile. &lt;br /&gt;
&lt;br /&gt;
[[http://grantrules.com/ubiquity/facebook.html script]] with two commands: &lt;br /&gt;
&lt;br /&gt;
*&#039;facebook-status (your status)&#039; - Updates your status, doesn&#039;t add &amp;quot;is&amp;quot;! &lt;br /&gt;
*&#039;facebook-friend (your friend)&#039; - Locate a friend. You have to type whole words, though (if searching for Amy Jones, you can&#039;t type Amy Jon; it must be one of: amy, jones, amy jones!)&lt;br /&gt;
&lt;br /&gt;
=== Search Facebook with Preview  ===&lt;br /&gt;
&lt;br /&gt;
Updated December 12, 2009: Fixed functionality. &lt;br /&gt;
&lt;br /&gt;
Duplicates the functionality of the Facebook search box in Ubiquity. Start typing the name of a friend, group, or application, and you&#039;ll see matching results right in the preview area. Pressing return will take you to the first matching profile, and control + alt + number will take you directly to any other match. If you&#039;re not logged in or there aren&#039;t any matches, pressing enter will take you to the search results on Facebook. You can even type in parts of a name. Typing &#039;Stan Brown&#039; or even &#039;Brow Stan,&#039; for example, will match Stanley Brown (just as they would in the actual Facebook search). &lt;br /&gt;
&lt;br /&gt;
Note: In order to get a preview that shows matches, you must be logged into Facebook and have either of the following settings: &lt;br /&gt;
&lt;br /&gt;
*Third-party cookies enabled &lt;br /&gt;
*www.facebook.com added to the cookie white list&lt;br /&gt;
&lt;br /&gt;
Works with Ubiquity 0.5.* &lt;br /&gt;
&lt;br /&gt;
Script: http://www.princeton.edu/~aweintra/fbubiq.html &lt;br /&gt;
&lt;br /&gt;
=== Share on Facebook  ===&lt;br /&gt;
&lt;br /&gt;
Shares the the page in the current tab on Facebook. I parsed the bookmarklet provided by Facebook so you get the nice little pop-up window rather than a whole new tab. &lt;br /&gt;
&lt;br /&gt;
Script: http://jallen7usa.com/ubiquity/ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Search Facebook  ===&lt;br /&gt;
&lt;br /&gt;
Look anything up in Facebook, contacts, groups and it even works whether you are logged in or not. &lt;br /&gt;
&lt;br /&gt;
script here http://myfirstscript.blogspot.com/2008/10/ubiquity-is-awesome_06.html &lt;br /&gt;
&lt;br /&gt;
== Ffffound it!  ==&lt;br /&gt;
&lt;br /&gt;
Adds images to the Ffffound! image repository site. You must have a Ffffound! account to be able to use. Simply navigate to [http://www.lantern.co.nz/ubiquity/ffffound.html lantern.co.nz/ubiquity/ffffound.html] to install using firefox. Use the command &amp;quot;ffffound it&amp;quot; on a page which has the image you want to save. &lt;br /&gt;
&lt;br /&gt;
== Friendfeed  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/51007 share-on-friendfeed] Simple bookmarklet command to share the current page on friendfeed.&lt;br /&gt;
&lt;br /&gt;
== Hatena  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/8351 hatebu] &lt;br /&gt;
*[http://gist.github.com/8575 hotentry] &lt;br /&gt;
*[http://gist.github.com/72762 hatenacopy]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== HowJSay&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
Looks up (On HowJSay.com), how to pronounce a english word correctly.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/220600 gist.github.com/220600] &lt;br /&gt;
&lt;br /&gt;
== Identi.ca  ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Script: [http://bobbo.me.uk/code/ubiquity/] Allows you to post to Identi.ca from Mozilla Ubiquity. To use, install from link, open Ubiquity and type &amp;quot;identi.ca&amp;quot; followed by your status message.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The above script is no longer hosted at this URL, as the site is no longer available. If someone has a cached version of this code, please contact [[mailto:jon@spriggs.org.uk Jon &amp;quot;The Nice Guy&amp;quot; Spriggs]] who will host it on his site. &lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/173013 identi.ca] is an identi.ca clone of the twitter command included by default in Ubiquity.&lt;br /&gt;
&lt;br /&gt;
*[http://geekmatters.com/Ubiquity/Idiquity.html Idiquity]&lt;br /&gt;
&lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/identica/index.cfm dent] is a identi.ca clone of the twitter command included by default in Ubiquity, but with an improved display message to reflect the status sent and the username used so that you can confirm it was correct.&lt;br /&gt;
&lt;br /&gt;
== Mixx  ==&lt;br /&gt;
&lt;br /&gt;
#[http://erikvold.com/tools/ubiquity/mixx/mixx.cfm mixx]: Mixx the typed/pasted url, or highlighted url, or otherwise the current page. Also get the mixx count of the url in the preview.&lt;br /&gt;
&lt;br /&gt;
== myExperiment  ==&lt;br /&gt;
&lt;br /&gt;
Script: [http://www.myexperiment.org/files/151/download/myexperiment_search.js myExperiment basic search command] Basic search plugin for myExperiment, an online comunity for scientists. &lt;br /&gt;
&lt;br /&gt;
== Pawst.com  ==&lt;br /&gt;
&lt;br /&gt;
Search social bookmarking websites using pawst.com&amp;lt;br&amp;gt; Simply type &#039;pawst topic&#039; i.e &#039;pawst funny pics&#039; &lt;br /&gt;
&lt;br /&gt;
by [http://shmuel.ahdut.com Shmuel Ahdut] - licensed as MPL &lt;br /&gt;
&lt;br /&gt;
Subscribe: http://pawst.com (You&#039;ll get Ubiquity&#039;s subscribe popline)&amp;lt;br&amp;gt; Script: http://pawst.com/javascripts/ubiquity.js &lt;br /&gt;
&lt;br /&gt;
== Sphinn  ==&lt;br /&gt;
&lt;br /&gt;
#[http://erikvold.com/tools/ubiquity/sphinn/sphinn.cfm sphinn]: Sphinns the typed url, or highlighted url, or otherwise the current page. Also get the sphinn count of the url in the preview.&lt;br /&gt;
&lt;br /&gt;
== Jaiku  ==&lt;br /&gt;
&lt;br /&gt;
Script: http://ubiquity.pastebin.com/f495c6d62 To add your username and api key use the command: jaiku-setuserandkey &amp;amp;lt;username&amp;amp;gt; api &amp;amp;lt;apikey&amp;amp;gt; -- you can get your api key on http://api.jaiku.com (inspired by http://trodrigues.net/ubiquity/pingfm/) to post: jaiku &amp;amp;lt;you presence&amp;amp;gt; at &amp;amp;lt;location&amp;amp;gt;&amp;amp;nbsp;: The location is optional, if you don&#039;t pass, the script will try to guess it using CmdUtils.getGeoLocation(). &lt;br /&gt;
&lt;br /&gt;
== Idiquity  ==&lt;br /&gt;
&lt;br /&gt;
[http://geekmatters.com/Ubiquity/Idiquity.html Idiquity]allows updating and checking your timeline from Ubiquity. More functionality is to come; details are at the site. It is compatible with any Laconi.ca based site (or any site with a Twitter compatible API). &lt;br /&gt;
&lt;br /&gt;
== News and Feed Readers  ==&lt;br /&gt;
&lt;br /&gt;
[http://i8news.appspot.com/ubiquity/nytimes.html NYTimes recent Headlines]: autosuggest recent headlines when you are typing; and if no matching, just hit enter, you will go to NYTimes.com search page. &lt;br /&gt;
&lt;br /&gt;
[http://www.bennysheerin.com/ubiquity.html Simple news feed]: Returns latest headlines from various vendors such as bbc, cnn and digg. &lt;br /&gt;
&lt;br /&gt;
[http://www.planetaki.com/ubiquity Planetaki Commands]: Add the website you&#039;re visiting to your Planet &lt;br /&gt;
&lt;br /&gt;
[http://cokeeffe.wordpress.com/get-news-for-ubiquity/ get-news]: Enables you to search Google News for news titles. &lt;br /&gt;
&lt;br /&gt;
== Nexopia  ==&lt;br /&gt;
&lt;br /&gt;
=== Go to user profile  ===&lt;br /&gt;
&lt;br /&gt;
Type &amp;quot;nexopia&amp;quot; and the user&#039;s name and it will take you directly to that user&#039;s profile on Nexopia.com. &lt;br /&gt;
&lt;br /&gt;
Script: http://jodyheavener.com/ubiquity/nexopia/ &lt;br /&gt;
&lt;br /&gt;
== People Search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.123people.com 123people]: Let&#039;s you search people meta data from around the world via Ubiquity. &lt;br /&gt;
*[http://avid.me/ubi/pipl.html pipl]: Searches for People&#039;s name on pipl.com &lt;br /&gt;
*[http://avid.me/ubi/chickipedia.html Chickipedia]: Searchs for Chickipedia, the world’s largest web-based, women-based, wiki-based database of hot chicks.&lt;br /&gt;
&lt;br /&gt;
== Serchilo  ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.serchilo.net/Serchilo:Ubiquity Serchilo in Ubiquity] allows using [http://serchilo.net Serchilo] commands in Ubiquity. &lt;br /&gt;
&lt;br /&gt;
== Slashdot  ==&lt;br /&gt;
&lt;br /&gt;
*[http://blipo.ath.cx/chkslashdot.html Check Slashdot]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Scribd Slurrp  ==&lt;br /&gt;
&lt;br /&gt;
*[http://pastebin.com/f5a196f81 Slurrp a URL to Scribd.com]&lt;br /&gt;
&lt;br /&gt;
== Ping.fm  ==&lt;br /&gt;
&lt;br /&gt;
Allows you to post messages via the ping.fm service. &lt;br /&gt;
&lt;br /&gt;
Script: http://ubiquity.washing-up.co.uk/pingfm.html &lt;br /&gt;
&lt;br /&gt;
The first time it is used, you must provide it with your ping.fm app key by typing &amp;quot;ping-set-key &amp;amp;lt;your app key&amp;amp;gt;&amp;quot; Once it has stored your app key, you do not need to provide it again, and can just type &amp;quot;ping &amp;amp;lt;message&amp;amp;gt;&amp;quot; Your app key can be found at [http://ping.fm/key http://ping.fm/key] &lt;br /&gt;
&lt;br /&gt;
== Tonight.eu  ==&lt;br /&gt;
&lt;br /&gt;
Lets you to search venues, restaurants and events in some big european cities. &lt;br /&gt;
&lt;br /&gt;
Script: http://www.tonight.eu/ubiquity/ &lt;br /&gt;
&lt;br /&gt;
== Bugmenot  ==&lt;br /&gt;
&lt;br /&gt;
A password database site for general public. You can use this command to find passwords for free websites so you don&#039;t have to register to them. &lt;br /&gt;
&lt;br /&gt;
[http://www.yalazi.org/ubiquity/list.html For Ubiquity 0.1.x] &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/146668 For Ubiquity 0.5 (works in new parser)] &lt;br /&gt;
&lt;br /&gt;
== Google Bookmarks  ==&lt;br /&gt;
&lt;br /&gt;
Adds the current page to your Google bookmarks with the title you give it. Still rather rough - not robust against invalid inputs. http://www.cs.washington.edu/homes/butaud/ubiquity.html &lt;br /&gt;
&lt;br /&gt;
Google bookmarks search. It works like the google search owning shortcut and label display. http://gist.github.com/187885 &lt;br /&gt;
&lt;br /&gt;
Alternative: [http://gist.github.com/93965 gbk and gbk-search]: Search and add bookmarks to Google Bookmarks. &lt;br /&gt;
&lt;br /&gt;
== Google Reader (shared items)  ==&lt;br /&gt;
&lt;br /&gt;
Adds the current selection to your Google Reader Shared Items page and allows you to add a note to it. [http://abauchu.net/ubiquity/share-on-reader.html share-on-reader command] &lt;br /&gt;
&lt;br /&gt;
Alternate Command: [http://pynej.blogspot.com/2008/10/ubiquity-command-note-in-reader.html Note in Reader] &lt;br /&gt;
&lt;br /&gt;
=== View Google Reader Items  ===&lt;br /&gt;
&lt;br /&gt;
Gread previews your inbox, starred, or shared: http://gist.github.com/64695 &lt;br /&gt;
&lt;br /&gt;
Previews unread items&#039; title: http://gist.github.com/193921, you should change the &amp;quot;YOURUSERIDGOESHERE&amp;quot; by yourself http://gravo.co.uk/wordpress/2009/04/24/google-reader-unread-feed/. &lt;br /&gt;
&lt;br /&gt;
== Gmail  ==&lt;br /&gt;
&lt;br /&gt;
*[http://fettig.net/playground/ubiquity/ Gmail Status Message] Update your Google Talk status message in Gmail &lt;br /&gt;
*[http://www.jpemartin.com/ubiq/smiley.html Smiley] Insert smileys into your email message (also works with other email or blog) &lt;br /&gt;
*- &#039;&#039;&#039;Broken Link&#039;&#039;&#039; - [http://www.geocities.com/skyhopper88/GmailEdit.html GMail Edit] Edit of an old Ubiquity script to work with latest version (.1.1). Opens Gmail in a new tab, as well as showing you the last couple of new messages in the preivew. &lt;br /&gt;
*[http://www.strangeblackhole.com/sign-it/ Sign It] Now you can sign your message, blog post and other with HTML code. &lt;br /&gt;
*[http://marcbelmont.com/command/gmail Gmail unread messages] shows up to 9 of your most recent unread messages. Press ALT+number to open a message in gmail. [http://marcbelmont.com/command/gmail screenshot]&lt;br /&gt;
&lt;br /&gt;
== Reddit  ==&lt;br /&gt;
&lt;br /&gt;
[http://urdna.org/ubiquity Urdna&#039;s &#039;Reddit-This&#039; command] &lt;br /&gt;
&lt;br /&gt;
== Social Graph (FOAF/XFN etc)  ==&lt;br /&gt;
&lt;br /&gt;
[http://danbri.org/2008/ubisg/ DanBri&#039;s &#039;foaf&#039; command] (calls Google SGAPI) &lt;br /&gt;
&lt;br /&gt;
== Stickam  ==&lt;br /&gt;
&lt;br /&gt;
http://stickhacks.googlepages.com - Watch someone&#039;s live Stickam stream without going to their profile &lt;br /&gt;
&lt;br /&gt;
== mYoUvies.com  ==&lt;br /&gt;
&lt;br /&gt;
[http://myouvies.com/ubiquity/ movieshare]: Allows for simple posting to the social movie news website [http://myouvies.com mYoUvies.com] &lt;br /&gt;
&lt;br /&gt;
== Soup.io  ==&lt;br /&gt;
&lt;br /&gt;
[http://static.al3x.net/ubiquity.html soup] - replicates the functionality of the bookmarklet for the Soup.io tumblelogging service &lt;br /&gt;
&lt;br /&gt;
== shortText  ==&lt;br /&gt;
&lt;br /&gt;
2 commands: &lt;br /&gt;
&lt;br /&gt;
*[http://shortText.com/ shorttext]: Creates a URL for any selected text &lt;br /&gt;
*[http://shortText.com/ longtext]: Select any shortText URL on any site and it will replace the URL with the actual content&lt;br /&gt;
&lt;br /&gt;
== Twitter  ==&lt;br /&gt;
&lt;br /&gt;
*[http://benatkin.com/ubiquity/tweet/ Ben&#039;s tweet command]: post to twitter (with URL shortener) &lt;br /&gt;
*[http://www.tweetviz.com TweetViz: Twitter Visualiser]: Allows display of text in the TweetViz visualiser. &lt;br /&gt;
*[http://gist.github.com/246967 twtuser] opens any user&#039;s timeline and shows that user&#039;s avatar and some useful links in the preview. (0.5+) &lt;br /&gt;
*[http://geekmum.com/ubiquity twittersearch] &lt;br /&gt;
*[http://www.matthias-schuetz.eu/twitter-ubiquity.html twitter]With timeline and auto completion for contacts&#039; names. &lt;br /&gt;
*[http://sites.google.com/site/coosgadgets/2ii 2ii], based on matthias&#039; work. Add current url replacement and shorten, hyperlink in the preview etc. &lt;br /&gt;
*[http://damienh.org/2009/10/04/twtplus-updated-for-ubiquity-0-5/ twtplus] twtplus for Ubiq 0.5+. shortening all urls in a post, reply and dm with friend username autocompletion, and posting as specified user account. Check out [http://damienh.org/2009/03/02/twtplus-the-missing-twitter-command-for-ubiquity-and-firefox/ this post] for more explanation. &lt;br /&gt;
*[http://gist.github.com/20044 otw] I can&#039;t type such a long username. &lt;br /&gt;
*[http://gist.github.com/38698 wtw] Twitter viewer.&lt;br /&gt;
&lt;br /&gt;
== Tumblr  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/48778 ptm] You can post to Tumblr. But please pay attention to L3 and L4 - email and password.&lt;br /&gt;
&lt;br /&gt;
== Diigo  ==&lt;br /&gt;
&lt;br /&gt;
 * [http://gist.github.com/179632 Diigo] Add a page to your Diigo bookmarks&lt;br /&gt;
&lt;br /&gt;
== Github  ==&lt;br /&gt;
&lt;br /&gt;
 * [http://gist.github.com/91353 github-user] Enhances github user page with repository sorting and additional repository&lt;br /&gt;
 stats.&lt;br /&gt;
&lt;br /&gt;
== Wordpress.com blogs  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/92304 gerdk] searches for terms in wordpress.com blogs&lt;br /&gt;
&lt;br /&gt;
== Goosh Command Shell  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/97091 opengoosh] opens the Goosh command shell.&lt;br /&gt;
&lt;br /&gt;
== Socialight Search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/97094 socialight] allows to perform a search on [http://socialight.com/ socialight].&lt;br /&gt;
&lt;br /&gt;
== Qaiku  ==&lt;br /&gt;
&lt;br /&gt;
*[http://static.qaiku.com/js/ubiquity-command.js qaiku] allows you to [http://bergie.iki.fi/blog/qaiku_and_mozilla_ubiquity/ post Qaiku microblogs]&lt;br /&gt;
&lt;br /&gt;
== meme from Yahoo  ==&lt;br /&gt;
&lt;br /&gt;
*[http://plets.com.br/meme/ meme] allows you to [http://meme.yahoo.com/ post to meme]&lt;br /&gt;
&lt;br /&gt;
== dynastree  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/219356 dynastree] searches for persons on verwandt.de, verwandt.at, verwandt.ch, dynastree.com, dynastree.co.uk, dynastree.ca, familleunie.fr, miparentela.com, verwant.nl and moikrewni.pl and shows a preview map of the name distribution in the country. Each command is localized [ DE EN FR ES NL PL ]&lt;br /&gt;
&lt;br /&gt;
== TasteKid  ==&lt;br /&gt;
&lt;br /&gt;
*[http://lehphyro.appspot.com/taste/ taste] allows you to get music, movies, book and shows suggestions directly from [http://tastekid.com TasteKid.com] website.&lt;br /&gt;
&lt;br /&gt;
= Web 3.0 (Web Of Data, Semantic Web, etc)  =&lt;br /&gt;
&lt;br /&gt;
Commands allowing the access or manipulation Web 3.0 content, that is [http://www.w3.org/RDF/ RDF]-based datasets such as [http://linkeddata.org linked data]. &lt;br /&gt;
&lt;br /&gt;
*[http://srv.buzzword.org.uk/ Cognition] microformat/RDF/RDFa/eRDF/GRDDL parser. &lt;br /&gt;
*#&amp;lt;code&amp;gt;cognify&amp;lt;/code&amp;gt; &lt;br /&gt;
*[http://jowl.ontologyonline.org/Ubiquity.html jOWL Ubiquity command], Visualize and query on OWL-DL files with [http://jowl.ontologyonline.org jOWL] &lt;br /&gt;
*#&amp;lt;code&amp;gt;view_ontology&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Microformats  ==&lt;br /&gt;
&lt;br /&gt;
*Microformats Extraction commands available at http://transformr.co.uk/ &lt;br /&gt;
*#commands: &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-atom&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hatom hAtom] &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-vcard&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hcard hCard] &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-webcal&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hcalendar hCalendar] &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-podcast&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/haudio hAudio] &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-rdf&amp;lt;/code&amp;gt; from [http://www.w3.org/TR/xhtml-rdfa-primer/ RDFa]&lt;br /&gt;
&lt;br /&gt;
*Search the [http://microformats.org/wiki/ Microformats Wiki] available at http://weborganics.co.uk/ &lt;br /&gt;
*#command: &lt;br /&gt;
*#*&amp;lt;code&amp;gt;uf-search&amp;lt;/code&amp;gt; (search term)&lt;br /&gt;
&lt;br /&gt;
== WoD  ==&lt;br /&gt;
&lt;br /&gt;
[[User:MichaelHausenblas|Michael Hausenblas]] has put together a [http://sw.joanneum.at/ubiq/ collection of WoD commands]. Currently three commands are available: &lt;br /&gt;
&lt;br /&gt;
*query the semantic indexer [http://sindice.com Sindice] for a term &lt;br /&gt;
*lookup [http://dbpedia.org/About DBpedia] resources [http://gist.github.com/59915 lookupNdbpedia] &lt;br /&gt;
*lookup [http://dbpedia.org/About DBpedia] for things in a certain category &lt;br /&gt;
*perform a [http://curl.haxx.se/ curl] HEAD for a URI&lt;br /&gt;
&lt;br /&gt;
Some more commands &lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/103266 lookup RDF namespaces by prefix at prefix.cc] &lt;br /&gt;
*[http://gist.github.com/103269 search for RDF vocabulary terms at schemacache.com ] &lt;br /&gt;
*[http://gist.github.com/103265 send current url to http://morph.talis.com ] and preview data&lt;br /&gt;
&lt;br /&gt;
== Crunchbase  ==&lt;br /&gt;
&lt;br /&gt;
[http://bnode.org/about Benjamin Nowack] has written the [http://cb.semsol.org/ubiquity cb command] allowing to do [http://www.crunchbase.com/ CrunchBase] lookups for companies, products or people. &lt;br /&gt;
&lt;br /&gt;
== Twine  ==&lt;br /&gt;
&lt;br /&gt;
[http://static.isnotworking.com/add-to-twine.html add-to-twine]: Brings up the dialog for posting the current page to [http://twine.com Twine]. &lt;br /&gt;
&lt;br /&gt;
== Linked Data Exploration  ==&lt;br /&gt;
&lt;br /&gt;
[http://demo.openlinksw.com/ubiq OpenLink Web Resource Description Commands] - Commands for obtaining structured descriptions of Web Resources. Uses [http://virtuoso.openlinksw.com/ Openlink Virtuoso]&#039;s in-built RDFization Middleware (&amp;quot;Sponger&amp;quot;) and Linked Data Deployment technology. &lt;br /&gt;
&lt;br /&gt;
== Link lookup and insertion  ==&lt;br /&gt;
&lt;br /&gt;
*[http://demo.monrai.com summon command] - look up a link representing the keywords or phrase you enter, and inserts it into the page. Good for quickly inserting links into emails, blog, blog comments, twitter, etc.&lt;br /&gt;
&lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/this.html &#039;This&#039;] lets you explore the subject of your current page. If you&#039;re on myspace.com/u2, this command lets you flip over to its web identifier, using freebase and zemanta.&lt;br /&gt;
&lt;br /&gt;
== headup  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.headup.com/ubiquity.html headup]: Connect the artist / city / person / company / movie / book / etc - with relevant and personalized information, using the headup Firefox addon - [http://www.headup.com Get headup].&lt;br /&gt;
&lt;br /&gt;
==Freebase==&lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/westport.html Westport] lets you query freebase in natural language - &amp;quot;david bowie&#039;s birthday&amp;quot;, or &amp;quot;female snowboarders&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== RDFa  ==&lt;br /&gt;
&lt;br /&gt;
[http://yergler.net/projects/ubiquity-rdfa-commands/ RDFa commands]: [http://www.w3.org/2006/07/SWD/RDFa/impl/js/ RDFa WG bookmarklets] as Ubiquity commands &lt;br /&gt;
&lt;br /&gt;
= Visualization  =&lt;br /&gt;
&lt;br /&gt;
*[http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/visualization/word-cloud.js word-cloud] generates a &#039;word cloud&#039; from the selected text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Website manipulation=&lt;br /&gt;
&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/doublespace.html Doublespace]: Doublespace the current page. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/lights.html Turn down the lights]: change the background colour of the page to dark grey &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/read.html Read]: View a website as nicely formatted plain text&lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/remove.html Remove] -hide an annoying part of a webpage, by clicking on it.&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/isolate.html Isolate] - hide the annoying parts of a webpage, by clicking the good part.&lt;br /&gt;
&lt;br /&gt;
= Clocks  =&lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/timezone.html Timezone] - reconciles the input location using freebase, and grabs its current time using geonames.&lt;br /&gt;
*analog clock - http://www.jpemartin.com/ubiq/time.html (also allows you to specify a timezone) &lt;br /&gt;
*minute-minder: show the time on page-load - http://individual.utoronto.ca/duez/cw.html &lt;br /&gt;
*MJD to UTC and UTC to MJD converters: [http://www.storybookdachshunds.com/surlyfritter/ mjd2utc and utc2mjd] &lt;br /&gt;
*show time in&amp;amp;nbsp;: show the current time of the specified place and this command is comppatible with parser 2 [http://gist.github.com/147092 show-time-in]&lt;br /&gt;
&lt;br /&gt;
see also swies&#039;s commands, below &lt;br /&gt;
&lt;br /&gt;
*[http://swapoff.org/files/ubiquity_time/ An international clock (plus flags!)] This looks pretty cool but say, Moscow time is off by one hour! Looks like the problem with EarthTools, maybe use something else? &lt;br /&gt;
*Sleep.fm [http://gist.github.com/114601] - Allows you to set an alarm in sleep.fm. &lt;br /&gt;
*[http://marcbelmont.com/command/calendar Calendar] with country holidays + clock [http://marcbelmont.com/command/calendar screenshot].&lt;br /&gt;
&lt;br /&gt;
= Travel  =&lt;br /&gt;
&lt;br /&gt;
*[http://widgets.bootsnall.com/ubiquity/flight.html flight search] &lt;br /&gt;
*[http://blog.mikelorengo.com/2008/09/ubiquitizing-jenn-for-flight.html fly-alaskaair]. Shops for flights on Alaska Airlines and Horizon Airlines &amp;quot;fly-alaskaair (cmd)&amp;quot; where (cmd) can be free form text. Examples include: &lt;br /&gt;
**fly-alaskaair sea lih 02/11/2009 return 02/25/2009 &lt;br /&gt;
**fly-alaskaair sea lax next thursday return sunday &lt;br /&gt;
**fly-alaskaair sea sjd next wednesday one way &lt;br /&gt;
*[http://widgets.bootsnall.com/ubiquity/hotel.html hotel search] &lt;br /&gt;
*[http://widgets.bootsnall.com/ubiquity/vacation.htmlvacation package search] (flight+hotel together) &lt;br /&gt;
*[http://widgets.bootsnall.com/ubiquity/car.html car rental search]&lt;br /&gt;
&lt;br /&gt;
= Maths  =&lt;br /&gt;
&lt;br /&gt;
*Converts selected amount to foreign currency (currently supports over 60 currencies) http://users.tpg.com.au/tbchris &lt;br /&gt;
*[http://www.verdsveven.com/ubiquity/metric.html metric]: Converts numbers to metric units. Can recognize numbers in the selection and replace them. &lt;br /&gt;
*[http://earth2marsh.com/ubiquity/charts.html chart-tools]: Draws a bar, line, or pie chart with labels, based on selected tabular data. &lt;br /&gt;
*[http://samespirit.net/ricky/dev/ubiquity/chart.html chart]: Draws a line chart using the Google Charts API based on a selected table row. &lt;br /&gt;
*temperature converter - http://www.jpemartin.com/ubiq/temp.html &lt;br /&gt;
*base64 decode / encode - http://taukon.de/ubiquity-base64.php &lt;br /&gt;
*Integrate - http://tat.wright.name/ubiquity/integrate.html &lt;br /&gt;
*gcalc (interface to Google&#039;s calculator; converts units and currencies, knows constants of nature etc.) - http://math-www.uni-paderborn.de/~axel/ubiquity_gcalc.html &lt;br /&gt;
*calculate2 (a good calculator) - http://www.jpemartin.com/ubiq/calc2.html &lt;br /&gt;
*currency (interface to iGoogle currency converter) - http://waleed.doubleudesigns.com/2008/09/currency-conversion-ubiquity/ &lt;br /&gt;
*currency (uses yql to access yahoo finance) - http://erikvold.com/tools/ubiquity/currency/currency.cfm&lt;br /&gt;
&lt;br /&gt;
= Programming / development tools  =&lt;br /&gt;
&lt;br /&gt;
*[http://www.ewitk.com/char-count.html char-count] is a command to count the number of characters in a block of selected text. &lt;br /&gt;
*Counts characters in the selected text (upated for 0.5 syntax): [http://bhagwad.com/blog/2009/07/firefox-ubiquity-character-count-command.html char-count] &lt;br /&gt;
*[http://www.dahius.com/projects/ubiquity/pwgen/ pwgen] is a password generator service (http://pwgen.net) &lt;br /&gt;
*Whatismyip - http://www.srobbin.com/ubiquity-commands/whatismyip/ &lt;br /&gt;
*[http://gist.github.com/10371 comments]: Display html comments on the page as css roll-over popups &lt;br /&gt;
*[http://mitcho.com/code/select select] - select gives you read access to your MySQL databases right from Ubiquity, with smart suggestions of your table and column names. &lt;br /&gt;
*Wraps selected text around the HTML tags of users choice [http://www.bhagwad.com/blog/2009/technology/inserting-html-tags-using-firefox-ubiquity.html HTML Insert] &lt;br /&gt;
*[http://gist.github.com/176391 check parentheses] Does a simple arithmetic check to see if a selected line of code has enough parentheses. Based on discussion [http://andyanglea.com/blog/2009/08/if-problems/ here].&lt;br /&gt;
&lt;br /&gt;
= String Tools  =&lt;br /&gt;
&lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/length/length.cfm string-length]: Displays the length of the provided string.&lt;br /&gt;
&lt;br /&gt;
= Random tools  =&lt;br /&gt;
*[http://gist.github.com/344620] - Toggles Private Browsing in Firefox.&lt;br /&gt;
*[http://lordi.styleliga.org/UnicodeSearch Unicode search verb] - Searches for Unicode characters and inserts them into the page or an input box.&lt;br /&gt;
*[http://jasonwilsondesign.com/development-locker/ubiquity-commands/BBFlickr.php BBFlickr] - Quickly translates Flickr&#039;s generated HTML links to BBCode in your clipboard. &lt;br /&gt;
*[http://www.bennysheerin.com/ubiquity_open.html open] - Allows you to quickly open your favourite web sites. &lt;br /&gt;
*open-in-tab - http://bergius.org/ubiquity/?open-in-tab &lt;br /&gt;
*Twurl shorten URL - http://xolotl.org/ubiquity &lt;br /&gt;
*xkcd (shows latest xkcd comic in preview pane, and allows selecting prior comics by number or going back in history with negative numbers) - http://alexsydell.com/applications/ubiquity/xkcd/ &lt;br /&gt;
*flags of the world - http://www.jpemartin.com/ubiq/flag.html &lt;br /&gt;
*forecast - http://dothejustice.com/forecast/ &lt;br /&gt;
*images (shows only the images on a page) - http://kloudsolutions.com &lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/comicstrip/comicstrip.cfm comicstrip]: Allows you to view a comicstrip and drop the image into an area selected (such as a gmail email). So far the command supports bc, bornloser, dilbert, garfield, getfuzzy, herman, monty, peanuts, penny-arcade, offthemark, opus, userfriendly, workingitout, and xkcd. &lt;br /&gt;
*[http://members.optusnet.com.au/~crazyjane13/lolcats.html lolcats]: Retrieves the latest LOLCAT in the preview, jumps to page on execute - by Brett Dalton &lt;br /&gt;
*[http://members.optusnet.com.au/~crazyjane13/roll.html roll]: Dice rolling verb, rolls single, multiple dice of any size with option for variable dificulty exploding dice pool (as per World of Darkness) - by Brett Dalton &lt;br /&gt;
*[http://gist.github.com/165471 roll]: Simple die rolling similar to the /roll command found in many MMORPG games. &amp;quot;roll x&amp;quot; will roll a x-sided die. &lt;br /&gt;
*[http://student.dei.uc.pt/~rmramos/ubiquity/lorem.html lorem]: Allows you to copy any given number of words or paragraphs of the &amp;quot;Lorem Ipsum&amp;quot; placeholder text onto your Clipboard, useful if you want to paste it in some other application afterward. Use: lorem [num] nice [words||paragraphs] &lt;br /&gt;
*nofollow - Preview counts no-follow links and execute highlights them. [[http://surfmind.com/lab/mozilla/ubiquity/nofollow.html Install Page]], [[http://surfmind.com/lab/mozilla/ubiquity/nofollow.js Script:]], [[http://flickr.com/photos/andyed/2767130077/in/photostream/ Preview]] &lt;br /&gt;
*[http://www.rakudave.ch/?q=node/26 Rhyme] a word &lt;br /&gt;
*[http://common-lisp.net/project/lifp/ubiquity/sharebee.htm sharebee-download] Sharebee &lt;br /&gt;
*[http://insideoutsites.com/ubiquity/ xbl] - displays your xbox live friends list in the preview window &lt;br /&gt;
*[http://www.nt7s.com/blog/ubiquity-qrz/ qrz] - Lookup amateur radio callsigns on the QRZ.com server. &lt;br /&gt;
*[http://www.kornnuts.com/dev/barcode/qrcode.php qrcode] - generate QR codes for the current page url or any desired text. &lt;br /&gt;
*[http://www.briandgoad.com/blog/ubiquity-commands/websourceit/ websource] - Compares the popularity on the internet of two (or more) terms using Websource.It &lt;br /&gt;
*[http://www.developerfriendly.com/ubiquity/roll.php UbiquityRoll] - get your roll on demand, currently supports rickroll duckroll and hoodroll &lt;br /&gt;
*[http://www.nasser.me/ubiquity/rapidsharecom-link-checker/ rscheck] - check selected links on rapidshare.com link checker. &lt;br /&gt;
*[http://f.resourcehog.net/has-swearing.php has-swearing] - check to see if the selected text has any swearing in it; highlights any instances of swearing. &lt;br /&gt;
*[http://www.dib0.nl/ubiquity.html open-all-bookmarks-in-tabs] - opens all bookmarks filed under the given folder in new tabs. It is also possible to open bookmarks with a specific tag. &lt;br /&gt;
*[http://www.geocities.com/ubiquities1 reverse-telephone] - reverse lookup on a german telephone number via das-oertliche.de &lt;br /&gt;
*[http://www.watersheep.org/~markh/screengrab.html screengrab] - takes a screen grab of the current page. &lt;br /&gt;
*[http://stuarthendren.net/printwyl printwyl] - opens current page in [http://www.printwhatyoulike.com PrintWhayYouLike.com] so you can create a better print out of the information you need. &lt;br /&gt;
*[http://yonen.ca/ubiquity2.html qr_code] - Generates QR Code images. &lt;br /&gt;
*[http://gist.github.com/21311 notepad] - Opens Notepad on Windows &lt;br /&gt;
*[http://gist.github.com/21319 paint] - Opens MS Paint on Windows &lt;br /&gt;
*[http://gist.github.com/76857 magnifier] - Opens magnifier on Windows &lt;br /&gt;
*[http://mike.thedt.net/ubiquity/note/note.php note] - The purpose of this command is to quickly save the inputted text (can be selected text or your own text) to a file on your disk without having to launch a text editor. &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/fx-update-scanner.html fx update scanner] - Update checks for restricted user accounts &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/gd-upload.html google docs upload] - Uploads a document to Google Docs via URL &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/vacuum.html vacuum] - Executes the VACUUM statement on SQLite databases &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/get-all-links.html get-all-links] - Creates a (filtered) list of all links from webpages opened in tabs/windows &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/placestools.html Places Tools] - List visits for URIs or domains or all URLs in the history, search in bookmark descriptions, fast bookmarking, opens links from bookmark folders &lt;br /&gt;
*[http://gist.github.com/62707 d20] - Searches d20srd.org. &lt;br /&gt;
*[http://gist.github.com/267732 Binary Converter] - Detects whether input is text or binary and converts accordingly. &lt;br /&gt;
*[http://kilianvalkhof.com/uploads/ubiquity-binary Binary tools] - Convert text to binary, and the other way around. &lt;br /&gt;
*[http://kilianvalkhof.com/uploads/ubiquity-yoda Yoda speak] - Convert text to how master Yoda would say it. &lt;br /&gt;
*[http://gist.github.com/70761 lyric]: Lookup song lyrics from lyrics.astraweb.com &lt;br /&gt;
*[http://gist.github.com/69722 muni]: Grab San Francisco, CA muni bus arrival information from nextmuni.com. &#039;&#039;example: muni 24 at Divis and Fulton&#039;&#039; &lt;br /&gt;
*[http://gist.github.com/71981 sqliteutils]: Treats firefox&#039;s builtin sqlite. &lt;br /&gt;
*[http://gist.github.com/67522 undo-closed-tabs]: Reopens tabs you&#039;ve closed recently. &lt;br /&gt;
*[http://gist.github.com/54051 newtab]: Open new tab as... &lt;br /&gt;
*[http://gist.github.com/49362 copy]: Copy to clipboard with some format. (like CopyURL+) &lt;br /&gt;
*[http://gist.github.com/59296 uaswitch]: Switch useragent and open current page again. &lt;br /&gt;
*[http://gist.github.com/64812 xbox360card]: Copy the gamer card of an Xbox Live user. &lt;br /&gt;
*[http://www.zentu.net/ubiq/failblog.html fail] image grabber from [http://www.failblog.org failblog.org] &lt;br /&gt;
*[http://www.zentu.net/ubiq/engrishfunny.html engrish] funny image grabber from [http://www.engrishfunny.com engrishfunny.com] &lt;br /&gt;
*[http://www.zentu.net/ubiq/hotdog.html hotdog] image grabber from [http://www.ihasahotdog.com ihasahotdog.com] &lt;br /&gt;
*[http://gist.github.com/134987 track-package]: Tracks packages via Fedex, UPS, USPS, DHL sites. &lt;br /&gt;
*[http://217.209.1.243/~sertion/ubiquity/colours/ colours] is an easy way to compare colors side by side. Uses hex-colors. &lt;br /&gt;
*[http://gist.github.com/144985 places]: Places command for searching history &amp;amp;amp; bookmarks &lt;br /&gt;
*[http://gist.github.com/192995 shotit] publishes the snapshot of the current browser&#039;s page right on the web and gives you back an url to the captured image (based on [http://dailyffs.com/shotme/ ScreenShootMe]). &lt;br /&gt;
*[http://gist.github.com/213124 pick-color]: easily pick and copy color to your clipboard in RGB or HEX format. &lt;br /&gt;
&lt;br /&gt;
== Flip  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.michaeltheweissman.com/flip flip]: Flips text uʍop ǝpısdn &lt;br /&gt;
*[http://myishi.homeip.net:8080/misc/unicode-inversion.php invert]: Generate inverted (ʇɹəʌuı), reversed (ɘƨяɘvɘя), or small-capped text (sᴍᴀʟʟ ᴄᴀᴘs)&lt;br /&gt;
&lt;br /&gt;
== Bookmark-Jump  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.iamnub.com:81/bookmark-jump.html]: Opens a bookmark by name&lt;br /&gt;
&lt;br /&gt;
= Development Tools  =&lt;br /&gt;
&lt;br /&gt;
== Gecko Development  ==&lt;br /&gt;
&lt;br /&gt;
*[http://sites.google.com/site/cgranade/projects/ubiquity-scripts xpc-interfaces]: Queries a list of interfaces supported by a given XPCOM contract ID.&lt;br /&gt;
&lt;br /&gt;
= Other Web Applications  =&lt;br /&gt;
&lt;br /&gt;
== Woot  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/41227 Woot Checker] - Previews the current Woot item and takes you to the &amp;quot;Want One&amp;quot; page. &lt;br /&gt;
&lt;br /&gt;
== ESV bible  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.duncanandmeg.org/projects/ubiquity-esv-insert.php insert from ESV, search with ESV] - &#039;&#039;&#039;Compatible with Ubiquity 0.5&#039;&#039;&#039; Either insert text into the current selection from a passage in the ESV Bible, or search the ESV for a given passage or phrase. &lt;br /&gt;
&lt;br /&gt;
[http://jplorenti.googlepages.com/ubiquity-wishamazon WishAmazon] - Allows adding any product page on the web to your Amazon Wish List. Similar functionality to the Amazon Universal Wish List bookmarklet. &lt;br /&gt;
&lt;br /&gt;
[http://avid.me/ubi/skreemr.html Skreemr] - Searches Skreemr.com for downloading Mp3&#039;s&lt;br /&gt;
&lt;br /&gt;
== BookMooch  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.sillybean.net/downloads/ubiquity-commands.html mooch] - Search [http://bookmooch.com/ BookMooch] for the term you provide. &lt;br /&gt;
&lt;br /&gt;
== Finances  ==&lt;br /&gt;
&lt;br /&gt;
=== Buxfer  ===&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/66959 buxfer-spend, buxfer-receive] - Adds a transaction to www.buxfer.com using its remote API, spending or receiving a given amount. (Homepage [http://sites.google.com/site/edgargoncalves/work/software/ubiquity here]). &lt;br /&gt;
&lt;br /&gt;
[http://dl.getdropbox.com/u/103378/projects/buxferubiquity/buxferubiquity.html twixfer] - Adds a transaction to www.buxfer.com, using the Twitter API (obsolete - use buxfer-spend and buxfer-receive instead) (Homepage [http://sites.google.com/site/edgargoncalves/work/software/twixfer here]). &lt;br /&gt;
&lt;br /&gt;
== Google Voice  ==&lt;br /&gt;
&lt;br /&gt;
[http://earth2marsh.com/ubiquity/googlevoice call] - Calls any selected 10-digit number (or enter on command line) &lt;br /&gt;
&lt;br /&gt;
== Internet Radio  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/94775 What is being played on Radio Paradise? (rp)] - Displays the artist and name of the song that Radio Paradise is playing right now.&amp;lt;br&amp;gt; &lt;br /&gt;
*[http://synapsos.kilu.de/ubiquity/radio/command.html Last.FM Radio Starter] - Starts the similar artists radio station for whatever artist you punch in. (works now with 0.5+ ) - original command by Matthew Garrett[http://gist.github.com/129512 .] &lt;br /&gt;
*[http://gist.github.com/219591 Grooveshark] 2.0 search&lt;br /&gt;
&lt;br /&gt;
== GTD  ==&lt;br /&gt;
&lt;br /&gt;
=== gtd-php  ===&lt;br /&gt;
&lt;br /&gt;
[http://www.gtd-php.com/Developers/Ubiquity gtdphp] - &amp;lt;tt&amp;gt;gtdin&amp;lt;/tt&amp;gt; adds an inbox item, and &amp;lt;tt&amp;gt;gtdref&amp;lt;/tt&amp;gt; creates a reference to the current page, as a child of a specific project &lt;br /&gt;
&lt;br /&gt;
=== Remember The Milk  ===&lt;br /&gt;
&lt;br /&gt;
*[http://garyhodgson.com/ubiquity/rtm-api.html rtm-*] - Commands to manage your Remember The Milk task lists. Add, postpone, prioritise, complete, move and view commands are available. &lt;br /&gt;
*[http://garyhodgson.com/ubiquity/rtm.html rtm (bookmarklet)] - Opens the RTM [http://www.rememberthemilk.com/help/answers/quickadd/ quick-add bookmarklet].&lt;br /&gt;
&lt;br /&gt;
=== Gubb  ===&lt;br /&gt;
&lt;br /&gt;
[http://ivancho.awardspace.com/ubiquity/gubb.html gubb-*] - Interface to [http://gubb.net Gubb], with adding items and inserting lists/contents functionality. &lt;br /&gt;
&lt;br /&gt;
=== Nozbe  ===&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/svd/ubiquity-commands nozbe-*] - commands to manage tasks in Nozbe. &lt;br /&gt;
&lt;br /&gt;
=== mite  ===&lt;br /&gt;
&lt;br /&gt;
[http://mite.yo.lk/en/platform/ubiquity.html mite-*] - Track your working hours: add new time entries to your mite.account or start/stop a timer. &lt;br /&gt;
&lt;br /&gt;
== Science  ==&lt;br /&gt;
&lt;br /&gt;
=== NCBI  ===&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/67266] - Very preliminary attempt to access NCBI and other genomic resources - currently only Pubmed &lt;br /&gt;
&lt;br /&gt;
== Wikis  ==&lt;br /&gt;
&lt;br /&gt;
=== TiddlyWiki  ===&lt;br /&gt;
&lt;br /&gt;
[http://garyhodgson.com/ubiquity/tiddlywiki.html tw-*] - Allows you to Create, Open, or Search for keywords within, Tiddlers from your [http://www.tiddlywiki.com/ TiddlyWiki] &lt;br /&gt;
&lt;br /&gt;
== Temporary Email Address  ==&lt;br /&gt;
&lt;br /&gt;
=== Jetable.org  ===&lt;br /&gt;
&lt;br /&gt;
Script: http://gist.github.com/11261 &lt;br /&gt;
&lt;br /&gt;
Creates a temporary Jetable email address for a given life span (one hour, one day, one week, one month). &lt;br /&gt;
&lt;br /&gt;
=== Mailinator.com  ===&lt;br /&gt;
&lt;br /&gt;
mailinator - http://gist.github.com/16415 &lt;br /&gt;
&lt;br /&gt;
Opens the mailinator inbox of the typed name. &lt;br /&gt;
&lt;br /&gt;
=== Spambox.us  ===&lt;br /&gt;
&lt;br /&gt;
http://gist.github.com/41634 &lt;br /&gt;
&lt;br /&gt;
Creates a temporary Spambox.us email address for a given life span (half hour, hour, half day, day, week, month, half year, year). &lt;br /&gt;
&lt;br /&gt;
== TheSixtyOne.com  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.jpemartin.com/ubiq/pause-TSO.html pause-TSO] pause and resume music playback. &lt;br /&gt;
&lt;br /&gt;
== World of Warcraft  ==&lt;br /&gt;
&lt;br /&gt;
*Gryffyn&#039;s Basic Allakhazam Lookup w/Preview: http://www.gryffyndevelopment.com/ubiquity/alla.html &lt;br /&gt;
*Zenwolf&#039;s WoW Armory Command: [http://www.annieandmatt.com/ubiquity/wowarmory.html Subscribe/View code here] &lt;br /&gt;
*Amosh&#039;s Wowhead Database Search [http://gist.github.com/19910]&lt;br /&gt;
&lt;br /&gt;
== instapaper.com bookmarklet  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.duncanandmeg.org/projects/ubiquity-instapaper.php instapaper]: Saves current page to read later on [http://www.instapaper.com/ Instapaper]. If you select some text from the page, it will be stored as the summary. This command will store your instapaper login and password in the browser password manager. Uses the new [http://blog.instapaper.com/post/73123968/read-later-api instapaper API]. &lt;br /&gt;
&lt;br /&gt;
[http://static.al3x.net/ubiquity.html later]: an alternate implementation that mimics the instapaper.com bookmarklet (requires your bookmarklet hash key). Might be a dead link now??? &lt;br /&gt;
&lt;br /&gt;
== laterloop.com Bookmarklet/RSS  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10172 laterloop-this]: Mimics functionality of the [http://www.laterloop.com laterloop] bookmarklet. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10172 laterloop]: Shows items you have saved for later in your preview. Allows for paging and can open a specific item through use of an &amp;quot;open #&amp;quot; modifier. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10172 laterloop-clear]: Utility command to clear out preference values stored when initially setting up the laterloop and laterloop-this commands. &lt;br /&gt;
&lt;br /&gt;
== Shoutcast Search  ==&lt;br /&gt;
&lt;br /&gt;
http://myfirstscript.blogspot.com/2008/10/ubiquity-is-awesome_06.html Search for anything in Shoutcast, artist, song, genre. use it everytime you wanna hear that one great song!. &lt;br /&gt;
&lt;br /&gt;
== ROT13  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.randomloci.com/dev/ubiquity/rot13.php ROT13]: Translate selected text using the ROT13 algorithm. Background [http://www.randomloci.com/dev/ubiquity/index.php here]. &lt;br /&gt;
&lt;br /&gt;
== KeepVid  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/113841 KeepVid]: Download any YouTube Video straight from Ubiquity via KeepVid! &lt;br /&gt;
&lt;br /&gt;
== OpenStreetMap  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/150292 osm]: Search for a location and find the OpenStreetMap map of the area. &lt;br /&gt;
&lt;br /&gt;
[http://gitorious.org/mozilla-ubiquity-maarons/osm/blobs/raw/master/osm.html]: Search and preview locations on OpenStreetMap.&lt;br /&gt;
&lt;br /&gt;
= Firefox Extension Integrations  =&lt;br /&gt;
&lt;br /&gt;
== Greasemonkey  ==&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/greasemonkey/gm.cfm greasemonkey]: Searches for available Greasemonkey menu commands, and displays them to you in preview, and offers you the ability to execute them with an input string. &lt;br /&gt;
&lt;br /&gt;
= Command collections  =&lt;br /&gt;
&lt;br /&gt;
[http://devstatus.com/ MySpace command collection]: MySpace Command Collection &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/101767 StumbleUpon Command Set] adds Stumble functionality to Ubiquity. Has three commands: stumble, want (&amp;quot;Thumbs-Up&amp;quot;), and does-not-want (&amp;quot;Thumbs-Down&amp;quot;). &lt;br /&gt;
&lt;br /&gt;
[http://ianj.appspot.com/insert Insert words using a keyword]: insert and learn-to-insert &lt;br /&gt;
&lt;br /&gt;
[http://jorgensen.ian.googlepages.com/size.html Screen Resolution commands]: size and resize &lt;br /&gt;
&lt;br /&gt;
[http://liketribe.com/liketribe/lktrb-ubiquity.html liketribe]: chat with an intelligent assistant bot to get recommendations, directions, weather, connect with friends, or just ramble on aimlessly. &lt;br /&gt;
&lt;br /&gt;
[http://www.tonight.eu/ubiquity/ Tonight]: searches for venues, restaurants and events in your city, near a specific location. &lt;br /&gt;
&lt;br /&gt;
[http://www.bennysheerin.com/ubiquity.html news command]: simple news command. &lt;br /&gt;
&lt;br /&gt;
[http://www.rakudave.ch/?q=node/18 rakudave&#039;s commands]: firefox add-ons, ubuntu brainstorm, just-ping, rhyme &lt;br /&gt;
&lt;br /&gt;
[http://widgets.bootsnall.com/ubiquity/everystockphoto.html Everystockphoto.com]: Search for images at everystockphoto.com &lt;br /&gt;
&lt;br /&gt;
[http://widgets.bootsnall.com/ubiquity/shopping-search.html Shopping.com]: Search for products and compare prices at Shopping.com &lt;br /&gt;
&lt;br /&gt;
[http://mika.lepisto.com/ubiquity-commands-160.html Ubiquity Commands by Mika]: Random commands including Everystockphoto.com and Shopping.com referenced above. &lt;br /&gt;
&lt;br /&gt;
[http://www.ubiqcmds.co.nr issi_noho&#039;s (and others) commands]: torrentz.com and more soon. Submit your command here. &lt;br /&gt;
&lt;br /&gt;
[http://www.thecompgeek.info/ubiquity/ CyberPrime&#039;s Commands]: SearchMe.Com, demonoid, about:commands and much more to come &lt;br /&gt;
&lt;br /&gt;
[http://enobrev.info/ enobrev&#039;s commands]: php and html (with auto-completion) &lt;br /&gt;
&lt;br /&gt;
[http://swieskowski.net/verbs/ swies&#039;s commands]: dog, clock, msdn &lt;br /&gt;
&lt;br /&gt;
[http://foyrek.com/ubi.html Abi&#039;s commands] &lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/index.cfm Erik Vold&#039;s Commands]: backtype, charlierose, coldfusion, comicstrip, dictionary, greasemonkey, inlinks-yahoo, jquery, mixx, mysql, quarkbase, sphinn. &lt;br /&gt;
&lt;br /&gt;
[http://dietrich.ganx4.com/mozilla/ubiquity.html Dietrich&#039;s commands] &lt;br /&gt;
&lt;br /&gt;
[http://www.gilbertpellegrom.co.uk/2008/08/27/my-ubiquity-commands/ Gilbert&#039;s commands]: date, time-12, time-24 &lt;br /&gt;
&lt;br /&gt;
[http://www.bjtitus.net/ubiquity/ Brandon&#039;s Commands]: FriendFeed &lt;br /&gt;
&lt;br /&gt;
[http://www.fuzzhead.com/ubiquity.html Fuzzhead&#039;s Commands]: What&#039;s My IP? &lt;br /&gt;
&lt;br /&gt;
[http://lokonline.com/ip/ubiq.html Improved IP address retrieval] Should work for ipv6 too. &lt;br /&gt;
&lt;br /&gt;
[http://sites.google.com/site/ubiquitycommands/ Whatthechuck&#039;s commands]: validate (W3C markup validator), vimeo &lt;br /&gt;
&lt;br /&gt;
[http://npattison.com/ubiquity/ Nickworks&#039;s commands]: Seeqpod, PHP.net &lt;br /&gt;
&lt;br /&gt;
[http://aufrank.net/ubiquity/ aufrank&#039;s commands]: gfl, urej &lt;br /&gt;
&lt;br /&gt;
[http://mysite.verizon.net/zaduma/ calhoun_ftw&#039;s commands]: Embiggen TinyURL replacer adaption, newegg, pirate bay, many more, releasing new always. &lt;br /&gt;
&lt;br /&gt;
[http://www.mzzt.net/ubiq.html mzzt.net commands]: remove/replace selection, detach tab to new window, open chromeless window &lt;br /&gt;
&lt;br /&gt;
[http://ubiquity.skumleren.net FreakCERS&#039;s commands]: latex &lt;br /&gt;
&lt;br /&gt;
[http://satf.se/projects/ubiquity-commands/ satf commands]: &amp;amp;lt;blink&amp;amp;gt;, jaen, fix-all-problems, last.fm &lt;br /&gt;
&lt;br /&gt;
[http://web.me.com/yaztromo/rot13-ubiq.html Yaz&#039;s Commands]: rot13 &lt;br /&gt;
&lt;br /&gt;
[http://hoffstein.net/ubiquity hoffstein&#039;s commands]: stock-quote, stock-chart &lt;br /&gt;
&lt;br /&gt;
[http://nocturne.net.nz/verbs Bayard&#039;s commands]: WoWhead, WoW Armoury, BBCode &lt;br /&gt;
&lt;br /&gt;
[http://grantrules.com/ubiquity Grant&#039;s commands]: Facebook, Lorem Ipsum generator, MD5/Sha1 hashes, Penis flood, What.cd artist/torrent search, UPS/USPS/FedEx tracking &lt;br /&gt;
&lt;br /&gt;
[http://www.gfx-fr.com/ubiquity/ Setsuna666&#039;s commands]: Amazon Canada &lt;br /&gt;
&lt;br /&gt;
[http://www.yalazi.org/ubiquity/list.html Onur Yalaz?&#039;s commands]: kissalt, bugmenot &lt;br /&gt;
&lt;br /&gt;
[http://labs.vunite.com/vubiqs/verbs.php vunite&#039;s commands]: goto, shorten, craigslist &lt;br /&gt;
&lt;br /&gt;
[http://common-lisp.net/project/lifp/ubiquity/ Timofei Shatrov&#039;s commands]: clhs, myip, urban-dictionary-search, sharebee-download &lt;br /&gt;
&lt;br /&gt;
[http://jimmahdigital.com/ubiq/ Jim&#039;s commands]: add-to-reader &lt;br /&gt;
&lt;br /&gt;
[http://www.phoque.de/projekte/ubiquity/ phoque.de]: Add marked text to your blog &lt;br /&gt;
&lt;br /&gt;
[http://www.srobbin.com/ubiquity-commands/ srobbin.com]: whatismyip &lt;br /&gt;
&lt;br /&gt;
[http://tim.sorbera.googlepages.com/ubiquity.html Mini-Geek&#039;s commands]: homestar-runner-wiki, starcraft-wiki, tniv-bible-passage, tniv-bible-word, webster-dictionary, webster-thesaurus, open-url, ign, and fileshack &lt;br /&gt;
&lt;br /&gt;
[http://www.geero.net Geero&#039;s commands]: Last.fm track search, Bible Gateway ESV URL builder &lt;br /&gt;
&lt;br /&gt;
[http://www.jasonsmith.ca/articles/ubiquity_by_mozilla_labs amazon-search-all]: Search all items on [http://www.amazon.com Amazon.com] &lt;br /&gt;
&lt;br /&gt;
[http://www.mikedeboer.nl Mike&#039;s commands]: mail (uses mailto: urls) &lt;br /&gt;
&lt;br /&gt;
[http://www.bpeers.com/ubiq/ bpeers.com]: ticker (preview or paste a stock quote and its change); bling (currency conversion in google syntax) &lt;br /&gt;
&lt;br /&gt;
[http://static.al3x.net/ubquity.html]: bit.ly, Instapaper, Soup.io, Google Reader subscribe, Twitter Search, Yep, zap CSS &lt;br /&gt;
&lt;br /&gt;
[http://kollektive.com/ubiquity/ kollektive]: links - converts non-marked up text/html which contains urls and email addresses into proper anchor tags. Works within html pages, and in rich text editing fields (eg. rich text editing in GMAIL) &lt;br /&gt;
&lt;br /&gt;
[http://www.cse.cuhk.edu.hk/~gli/ubiquity.html Xatan&#039;s ubiquity commands]: google scholar, xunlei(??), baidu(??), douban(??), verycd, google news, dict.cn(??), mininova, dictionary.hm (detailed english explanation) &lt;br /&gt;
&lt;br /&gt;
[http://www.acarlos.com.br/ubiquity/ TV Globo Video Search]: searches for TV Globo and GloboSat videos (Brazil). &lt;br /&gt;
&lt;br /&gt;
[http://v0xel.ubuntusrbija.org/2008/08/31/mozilla-ubiquity-i-b92-mape-srbije/ sr-map]: Searches for street names and shows them on a map. Works for couple of cities in Serbia. &lt;br /&gt;
&lt;br /&gt;
[http://www.geocities.com/skyhopper88/ Skyhopper88&#039;s Commands] Several Search Commands, edit of Gmail script below for .1.1 &lt;br /&gt;
&lt;br /&gt;
[http://17th.name/wp-content/uploads/2008/09/fanfou.html Alex&#039;s fanfou command]: post to fanfou (??) &lt;br /&gt;
&lt;br /&gt;
[http://unplugd.com/enblogd Samps&#039;s command collection]: eBay-Au, Ubuntu-WiKi, Skweezer, Wapedia, PHP function search &lt;br /&gt;
&lt;br /&gt;
[http://test.fathomthat.org/ubiquity/evav.html Evilavatar]: Search Evilavatar for new posts containing your search term &lt;br /&gt;
&lt;br /&gt;
[http://icecreamfactory.freehostia.com/ubiquity/ I.C.E.C.R.E.A.M COMMANDS]: directions, reverse-lookup, googlism &lt;br /&gt;
&lt;br /&gt;
[http://users.kilu.de Sieglinde&#039;s commands]: babylon,leo,reverse-telephone,open-thesaurus &lt;br /&gt;
&lt;br /&gt;
[http://www.objectforward.com/ubiquity/ objectforward&#039;s commands]: dictionary - simple command to use dictionary.reference.com for word look up. thesaurus - uses thesaurus.reference.com for similar word look up. I just like this better than the default &#039;define&#039; command. Enjoy! &lt;br /&gt;
&lt;br /&gt;
[http://updates.versionone.com/ubiquity/ VersionOne]: A command set for users of the VersionOne agile project management suite. &lt;br /&gt;
&lt;br /&gt;
[http://craxy.bplaced.de/prog/ubiquity/ find commands]: Commands to control the firefox search (ctrl+f) &lt;br /&gt;
&lt;br /&gt;
[http://pentarious.altervista.org/ubiquity/ pentarious&#039;s command collection]: urlize, scholar-search, torrent-search, music-search &lt;br /&gt;
&lt;br /&gt;
[http://econ-server.umd.edu/~kranker/code/Ubiquity_Econ.php Keith&#039;s Ubiquity Feeds for Economists (and others)]: econpapers, econpapers-author, econpapers-title, umdlib, stata, statalist, scholar, lorem ipsum &lt;br /&gt;
&lt;br /&gt;
= Pre 0.1 Style Commands (Now Broken)  =&lt;br /&gt;
&lt;br /&gt;
#Quote text for BB-style forums. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=quotebb Quotebb.js] &lt;br /&gt;
#Quotes HTML entities in your selection. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=quotehtml quotehtml.js] &lt;br /&gt;
#Opens Gmail in a new tab, as well as showing you the last couple of new messages in the preivew. [http://ubiquity-firefox.googlegroups.com/web/ubiquity_gmail.js?gda=gHCQx0IAAAD_mC6ocghADlnwgKtOZarHy0pz4L1zdfNBZQ-WVQEtDWG1qiJ7UbTIup-M2XPURDThhrjtatuGnhW3da2gcLyrMQ4HhOIVlic7wv2V2HiqYg Gmail.js] &lt;br /&gt;
#Let&#039;s you Twitter from anywhere. This command has been moved into Ubiquity core. [http://theunfocused.net/moz/ubiquity/verbs/twitter.js Twitter.js] &lt;br /&gt;
#Another micro-blogging service like Twitter/Pounce/etc., but open source Essentially identical code to Twitter+Ubiquity above, except for renaming of constants and web addresses [http://ubiquity-firefox.googlegroups.com/web/identica%20(2).js?gda=4oc_PEkAAACqaO7Aax4IB5JX_WYSl8iOrBnsuQS45ejhBtvVuEfs-xpD7Q4I70bg7A2QUTeiVCyg9p4rhRQ_Rj874eUFNZ-HhAioEG5q2hncZWbpWmJ7IQ identica(2).js] &lt;br /&gt;
#[http://www.gialloporpora.netsons.org/ubiquity/diggthis.js DiggThis.js] &lt;br /&gt;
#Converts your selection to lower case. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=tolower tolower.js]&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Commands_In_The_Wild&amp;diff=211453</id>
		<title>Labs/Ubiquity/Commands In The Wild</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Commands_In_The_Wild&amp;diff=211453"/>
		<updated>2010-03-29T02:51:35Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Amazon */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LEGAL NOTICE: Mozilla is providing links to these third-party Ubiquity commands as a courtesy, and makes no representations regarding the commands or any information related there to. Any questions, complaints or claims regarding the commands must be directed to the appropriate developer or software vendor.&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Commands in the Wild &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Please note that the main way we&#039;d like commands to be distributed and shared in the future is via [http://ubiquity.mozilla.com/herd/ The Ubiquity Herd]. Right now there isn&#039;t any social functionality on the Herd, though, which is why we&#039;re using this page to allow for user-contributed commentary and discussion. At some point in the near future we&#039;ll be adding this kind of functionality to the Herd and will migrate the content on this page there. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;There Be Dragons Here &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Pioneering can be crazy fun, but also a bit dangerous. The commands referenced here have not been reviewed by Mozilla. They may contain malicious code, so use them only at your own risk. Until Ubiquity becomes more mature, we recommend only adding commands that come from people you trust, or if you&#039;ve read the code and know that they are safe. &lt;br /&gt;
&lt;br /&gt;
Beware that even if you review the code before subscribing, the code may be subject to change from the publisher, and your copy will automatically update on firefox restart. This problem will be remedied in later versions of Ubiquity. &lt;br /&gt;
&lt;br /&gt;
= Country specific Commands  =&lt;br /&gt;
&lt;br /&gt;
== AR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://kontrolakka.tumblr.com/post/143086887/ubiquity-google-search-argentina Google Argentina]: Searches only in Google Argentina (www.google.com.ar) for your words and sets the search to &amp;quot;páginas de Argentina&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== AT  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/25096 gist.github.com/25096]: ÖBB Railway time table search &lt;br /&gt;
*[http://www.oststrom.com/ubiquity oebb railway time table search]: *updated* OEBB Railway time table search, parser2 compatible, preview and geolocation&lt;br /&gt;
&lt;br /&gt;
== BG  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/179119 .BG search] - you can use this command to search some of bulgarian portals such as Dnevnik, dir.bg and gbg (more comming soon). Just install and try &amp;quot;търси&amp;quot; command.There is Ajax function inside for handling different encodings (utf8 and windows-1251)&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/182349 Smali.me] - you can use smali.me short url service from your ubiquity app. Just wtite &#039;smali&#039; or &#039;смали&#039; and see the result.&lt;br /&gt;
&lt;br /&gt;
== BR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://minhavidaorientadaaobjetos.blogspot.com/2009/01/buscap-ubiquity-compare-produtos.html Buscape Command]: Compare products quickly in Buscapé &lt;br /&gt;
*[http://minhavidaorientadaaobjetos.blogspot.com/2009/01/americanascom-para-ubiquity-facilitando.html Americanas.com Command]: Search for products at Americanas.com &lt;br /&gt;
*[http://gist.github.com/65907 lyrics a.k.a. letras]: Search for lyrics at letras.mus.br &lt;br /&gt;
*[http://gist.github.com/65903 whois-br]: Whois search for brazilian hosts (registro.br) &lt;br /&gt;
*[http://gist.github.com/127358 cardapio-ceset]: Shows the menu of the University Restaurant of FATEL-UNICAMP (College of Technology of the State University of Campinas) &lt;br /&gt;
*[http://gist.github.com/159208 MercadoLivre Command]: Search for products at mercadolivre.com.br &lt;br /&gt;
*[http://gist.github.com/194535 ESPN Brasil Command]: Search for news about sport at ESPN Brazil web site&lt;br /&gt;
&lt;br /&gt;
== CA  ==&lt;br /&gt;
&lt;br /&gt;
*[http://mricon.com/ubi/ Montréal Transit]: Look up STM bus and AMT train schedules&lt;br /&gt;
&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/barrie.html Barrie Ontario Library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/biblio.html Montreal library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/calgary.html Calgary Library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/hamilton.html Hamilton library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/victoria.html Victoria BC Library]&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/vpl.html Vancouver Library]&lt;br /&gt;
&lt;br /&gt;
== CH  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;SBB CFF FFS&#039;&#039;&#039;]: Swiss Railway time table search for [http://www.sbb.ch SBB CFF FFS]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Tel.Search.ch&#039;&#039;&#039;]: Swiss Phone Book search from [http://tel.search.ch tel.search.ch] &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swiss Teletext&#039;&#039;&#039;]: Swiss Teletext page browser. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Rete 3&#039;&#039;&#039;]: visualizza le ultime canzoni in onda su [http://rete3.rtsi.ch/ Rete 3]. Puoi trovare degli screen shot [http://frigi.ch/ubiquity/screenshot qui]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Meteo-local&#039;&#039;&#039;]: show the calculated meteo for a location. Information from [http://www.meteosvizzera.admin.ch Federal Office of Meteorology and Climatology]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Meteo-radar&#039;&#039;&#039;]: show the last radar image from [http://www.meteosvizzera.admin.ch Federal Office of Meteorology and Climatology]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Slf&#039;&#039;&#039;]: show the latest avalanche bulletin from [http://www.slf.ch Institute for Snow and Avalanche Research SLF]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swisswebcams&#039;&#039;&#039;]: show a random webcam image from the site [http://www.swisswebcams.ch Swisswebcams]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here]. &lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swiss News&#039;&#039;&#039;]: show the last 10 news titles from the most popular swiss web site&#039;s. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
&lt;br /&gt;
== CN  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/51784 jiwai]: Command for posting to jiwai.de, a microblogging service in China. For information [http://damienh.org/2009/01/25/ubiquity%e5%8f%bd%e6%ad%aa%e5%91%bd%e4%bb%a4%e5%8a%a0%e5%bc%ba%e7%89%88/ check here]. &lt;br /&gt;
*[http://ubidu.sourceforge.net/ ubidu]: Search Baidu.com, the No.1 search engine in China. &lt;br /&gt;
*[http://17th.name/wp-content/uploads/2008/09/fanfou.html Fanfou Command] - post to Fanfou.com (??) &lt;br /&gt;
*[http://gist.github.com/293592 Translate word with Youdao Dict] - Translate english to chinese and vice versa through dict.youdao.com service. Support eng2chn and chn2eng. Support Long text translate.&lt;br /&gt;
*[http://gist.github.com/25703 Translate word with dict.cn ] - Translate word with dict.cn, both English to Chinese or Chinese to English. (Please re-insatll it for supporting of new API.) &lt;br /&gt;
*[http://gist.github.com/31480 Search in douban] - Search douban items for movie/music/book/generic. With live preview of search results. See a screen shot [http://desktable.blogbus.com/logs/32090698.html here]. &lt;br /&gt;
*[http://gist.github.com/49305 Search in Jukuu] - Retrive a word’s pronounce and example sentences from www.jukuu.com, supports English-Chinese and Chinese-English translations. See a screen shot [http://sealence.x10hosting.com/wordpress/?p=61 here]. &lt;br /&gt;
*[http://gist.github.com/49422 Recite word everyday on iciba.com] - Retrieving 5 words from the every day recite word lists from www.iciba.com. None input for today’s word, input date string like “2009-1-19″ to retrieve previous day. See a screen shot [http://sealence.x10hosting.com/wordpress/?p=63 here]. &lt;br /&gt;
*[http://gist.github.com/88796 Show Chinese Stock] - Show the current price and chart of Chinese Stock, usage: &amp;quot;cnstock jlad in daily&amp;quot; or &amp;quot;cnstock 000623&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== CZ  ==&lt;br /&gt;
&lt;br /&gt;
*[http://ubiquity.wegguy.cz/idos/ idos]: Search Czech public transport connections&lt;br /&gt;
&lt;br /&gt;
== DE  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.tomsgutscheine.de/ Tom&#039;s Gutscheine]: Calls the search engine of Tom&#039;s Gutscheine&lt;br /&gt;
*[http://synapsos.kilu.de/ubiquity/dynastree/command.html verwandt.de]: Searches verwandt.de for profiles (with preview map for Germany). &lt;br /&gt;
*[http://www.gutegutscheine.de/blog/gutegutscheine-de-ubiquity-command/ gutegutscheine.de]: Searches www.gutegutscheine.de for coupons. &lt;br /&gt;
*[http://gist.github.com/174663 bahn.de]: Searches for train connection and current arrival / departure tables for all train stations in Europe. Live data about delays is only available for Deutsche Bahn (Zugauskunft der DB AG wird genutzt). &lt;br /&gt;
*[http://daniel.lomm.es/projects/ubiquity-vrr vrr]: Searches for timetables for trains, trams and buses in the Rhein-Ruhr region. &lt;br /&gt;
*[http://synapsos.kilu.de/ubiquity/openclosed/command.html openclosed]: Searches for opening times of shops and offices in Germany via openclosed.de &lt;br /&gt;
*[http://digioso.org/cgi-bin/ubiquity/amazonde.pl Amazon-DE]: Searches Amazon Germany &lt;br /&gt;
*[http://digioso.org/cgi-bin/ubiquity/googlede.pl Google-DE]: Searches Google Germany &lt;br /&gt;
*[http://digioso.org/cgi-bin/ubiquity/ebayde.pl eBay-DE]: Search for an item on eBay Germany &lt;br /&gt;
*[http://digioso.org/cgi-bin/ubiquity/leo.pl Leo Translation]: Translates a word with Leo English &amp;amp;lt;&amp;amp;gt; German or with all languages with this command: http://frigi.ch/ubiquity &lt;br /&gt;
*[http://gist.github.com/180334 heise.de Preisvergleich]: Searches on heise.de Preisvergleich for price comparisons.&lt;br /&gt;
&lt;br /&gt;
== DK  ==&lt;br /&gt;
&lt;br /&gt;
*[http://u.ter.dk/mitkbh mitkbh]: search locations and reviews in Copenhagen &lt;br /&gt;
*[http://u.ter.dk/tv tv]: Danish tv guide&lt;br /&gt;
&lt;br /&gt;
== FI  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/eat/ eat]: twelve city specific (e.g. eat-helsinki) finnish restaurant searches from eat.fi &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/vapaa-aikavirasto/vapaa-aikavirasto.htm vapaa-aikavirasto]: fi-nationwide restaurant/bar search from vapaa-aikavirasto.com &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/viini/viini.htm viini]: wine review search from viiniweb.net &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/jalkapallo/suomencup.htm suomencup]: search material related to finnish cup football from suomencup.net wiki &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/jalkapallo/veikkausliiga.htm veikkausliiga]: rss news feeds from veikkausliiga football teams&lt;br /&gt;
&lt;br /&gt;
== FR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://baruchel.free.fr/~thomas/code/ubiquity/amazon/ amazon.fr]: Search books on Amazon.fr. &lt;br /&gt;
*[http://gist.github.com/97132 cnrtl.fr/synonymie/]: Search for synonymy.&lt;br /&gt;
&lt;br /&gt;
== KR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://dotnet.pe.kr/ubiquity/me2day_ubiquity.html me2day] - Enables ubiquity to send posts to me2DAY(http://me2day.net) a Korean microblogging site. setme2daykey command sets the username and userkey that is required for posting. &lt;br /&gt;
*[http://sites.google.com/site/coosgadgets/east-asian-language-romanization korean] - Romanization of Korean language (Hangul)&lt;br /&gt;
&lt;br /&gt;
== IE  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/218595 ryanair] - look for a cheap flight on ryanair.com&lt;br /&gt;
&lt;br /&gt;
== IN  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/156384 meaning_in_hindi]- give the meaning of enlish word in hindi &lt;br /&gt;
*[http://gist.github.com/156386 show_lyrics ]- show the lyrics of a hindi song &lt;br /&gt;
*[http://gist.github.com/156389 map_directions]- show the diretions between two places in India &lt;br /&gt;
*[http://gist.github.com/156397 tv_guide] show you the timing of a serial &lt;br /&gt;
*[http://gist.github.com/156401 university_search] let you search about university for a particular course &lt;br /&gt;
*[http://gist.github.com/163454 nse] - provides NSE stock exchange quotes,index information,gainers,losers. Also provide company search.&lt;br /&gt;
&lt;br /&gt;
== IT  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gstefanoni.netsons.org/ubiquity/treni-from.html treni-from] - Searches for the next available train on the selected route on the Trenitalia network (NOT Found) &lt;br /&gt;
*[http://gist.github.com/218507 trenitalia] - Searches for trains &amp;quot;from&amp;quot; some place &amp;quot;to&amp;quot; some other &amp;quot;on&amp;quot; some date (dd/mm/yyyy) using as wellan additional time parameter. &lt;br /&gt;
*[http://gist.github.com/217659 Atac Roma] - 3 commands: (&#039;&#039;atac&#039;&#039; - searches for routes &amp;quot;from&amp;quot; some place &amp;quot;to&amp;quot; some other; &#039;&#039;atac-linea&#039;&#039; - searches for info about a specific bus provided; &#039;&#039;atac-attesa-bus&#039;&#039; - redirects to the mobile page about time you have to wait a provided bus . &lt;br /&gt;
*[http://gist.github.com/145261 GarzantiLinguistica.it] - Italian &amp;amp;lt;=&amp;amp;gt; English and Italian &amp;amp;lt;=&amp;amp;gt; French Dictionary, Italian Dictionary, Italian/English/French Verb Conjugator &lt;br /&gt;
*[http://gist.github.com/155868 televideo] - Script for quick access to Italian public teletext&lt;br /&gt;
&lt;br /&gt;
== JA  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/8346 eijiro] - Japanese &amp;amp;lt;=&amp;amp;gt; English &lt;br /&gt;
*[http://sites.google.com/site/coosgadgets/east-asian-language-romanization japanese] - Japanese &amp;amp;lt;=&amp;amp;gt; English with Romaji&lt;br /&gt;
&lt;br /&gt;
== MX  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/250487 GoTo] - Command to go to a website since ubiquity.&lt;br /&gt;
&lt;br /&gt;
== NO  ==&lt;br /&gt;
&lt;br /&gt;
*[http://skogvoldconsulting.no/ubiquity/1881/ 1881.no]: Norwegian phone book online. &lt;br /&gt;
*[http://skogvoldconsulting.no/ubiquity/posten/ Sporing på posten.no]: Norwegian mail tracking&lt;br /&gt;
&lt;br /&gt;
== NL  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/35909 vandale]: For looking up words in the free online version of the leading Dutch dictionary: Van Dale. &lt;br /&gt;
*[http://gist.github.com/59840 hyves-zoek]: For looking for people on the social networking site Hyves. &lt;br /&gt;
*[http://kok.thuis99.org/telbo telbo]: For looking up telephone numbers via http://www.telefoongids.nl/&lt;br /&gt;
&lt;br /&gt;
== NZ  ==&lt;br /&gt;
&lt;br /&gt;
*[http://tommo39.com/trademe.html trademe]: Searches trademe.co.nz for whatever item you are looking for.&lt;br /&gt;
&lt;br /&gt;
== PT  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/19991 priberam] - Looks up a word in the Priberam Portuguese dictionary [http://priberam.pt/dlpo/ Priberam] (Homepage [http://sites.google.com/site/edgargoncalves/work/software/ubiquity here])&lt;br /&gt;
&lt;br /&gt;
== RO  ==&lt;br /&gt;
&lt;br /&gt;
*[http://avatars.postiton.net/ avatars] - Search Avatars in English and add to your emails [http://avatars.postiton.net/ avatars.postiton.net] &lt;br /&gt;
*[http://avatare.afisatepe.net/ avatar] - Search Avatar in Romanian and add to your emails [http://avatare.afisatepe.net/ avatare.afisatepe.net]&lt;br /&gt;
&lt;br /&gt;
== RS  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/11398 sr-map] - Search maps of major Serbian cities using [http://mape.b92.net mape.b92.net]&lt;br /&gt;
&lt;br /&gt;
== RU  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/260849 lingvo] - Looks up a word in the Lingvo dictionary &lt;br /&gt;
*[http://gist.github.com/220901 yandex] - Search in yandex&lt;br /&gt;
&lt;br /&gt;
== SE  ==&lt;br /&gt;
&lt;br /&gt;
*[http://raymond.bergmark.googlepages.com/hitta.htm Eniro]: Swedish phone book online. &lt;br /&gt;
*[http://gist.github.com/113738 Hitta.se]: Search hitta.se. &lt;br /&gt;
*[http://www.web.cinaird.se/ubiquity/index.php?dir=hitta Hitta.se for Ubiquity 0.5]: Search hitta.se, compatible with Ubiquity 0.5. &lt;br /&gt;
*[http://www.web.cinaird.se/ubiquity/index.php?dir=kolli Posten.se]: Trace package in sweden with Posten.se.&lt;br /&gt;
&lt;br /&gt;
== TR  ==&lt;br /&gt;
&lt;br /&gt;
*[http://burakcelebi.googlepages.com/ubiquity-eksisozluk.html EksiSozluk Commands] - Commands for http://sozluk.sourtimes.org&lt;br /&gt;
&lt;br /&gt;
*[http://www.deniz.web.tr/ubiquity cevir] - Turkish - English translation command.&lt;br /&gt;
&lt;br /&gt;
*[http://www.azizce.com/wp-content/ubiquity/tdk.html Turk Dil Kurumu &#039;nda Arama] - Fast search command for [http://www.tdk.gov.tr/ Official TDK Website].&lt;br /&gt;
&lt;br /&gt;
*[http://www.verisux.com/ubi-seslisozluk.html seslisozluk] - Integration with seslisozluk.com for quick enlish/german/turkish translations&lt;br /&gt;
&lt;br /&gt;
== TW  ==&lt;br /&gt;
&lt;br /&gt;
*[http://linlichangjen.googlepages.com/ubiquity ydic]: Translate English word to Tratitional Chinese&lt;br /&gt;
&lt;br /&gt;
*[http://fortelin.net78.net/ubiquity/2r 2r, another extended version of twitter command]: with url shortened and edit dialogue function, enjoy it ^^&lt;br /&gt;
&lt;br /&gt;
*[http://fortelin.net78.net/ubiquity/soso soso Command for Ubiquity]:another extended, tabbed version of the google command.&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/84548 tw-stock]: Quote a stock symbol from Taiwan Stock Exchange&lt;br /&gt;
&lt;br /&gt;
== UK  ==&lt;br /&gt;
&lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK&lt;br /&gt;
&lt;br /&gt;
*[http://www.red-eyed.org.uk/ubiquity.html amazonuk]: Search Amazon.co.uk for any item. A version of amazon-search-all customised for the UK version of the Amazon site.&lt;br /&gt;
&lt;br /&gt;
*[http://tevp.net/projects/ubiquity/ journey]: Searches the TfL journeyplanner for a destination. Currently has hardcoded start point and walking speed.&lt;br /&gt;
&lt;br /&gt;
*[http://tat.wright.name/ubiquity-tfl tfl-directions]: Improved TfL journeyplanner based on the above. Start point is not hard coded. (Requires ubiquity 0.5)&lt;br /&gt;
&lt;br /&gt;
*[http://www.socialanimal.com/pubs/ubiquity.htm pubfinder]: Looks for pubs in the specified place or postcode.&lt;br /&gt;
&lt;br /&gt;
*[http://choffee.co.uk/Ubiquity trainuk]: Simple interface to search for train times in the UK.&lt;br /&gt;
&lt;br /&gt;
*[http://github.com/elson/ubiquity-bbc-iplayer/wikis/command-feed BBC iPlayer]: Watch or listen to recent programmes on BBC iPlayer&lt;br /&gt;
&lt;br /&gt;
== Multiple Countries  ==&lt;br /&gt;
&lt;br /&gt;
*[http://garyhodgson.com/ubiquity/amazon.html amazon-locale]: Perform a &#039;Blended&#039; search on Amazon Germany, UK, USA, Japan or Canada.&lt;br /&gt;
&lt;br /&gt;
= Directory Search  =&lt;br /&gt;
&lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK &lt;br /&gt;
*[http://gist.github.com/65093 Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup with preview ]: English (Cambridge). See a screen shot [http://sealence.x10hosting.com/wordpress/?p=66 here].&lt;br /&gt;
&lt;br /&gt;
= Web Search  =&lt;br /&gt;
&lt;br /&gt;
*OneLook Reverse Lookup - http://icecreamfactory.freehostia.com/ubiquity/reverse-lookup.html&lt;br /&gt;
&lt;br /&gt;
== Real-time Search  ==&lt;br /&gt;
&lt;br /&gt;
*Scoopler, spezify, stinkyteddy and exalead commands - http://gist.github.com/218713&lt;br /&gt;
&lt;br /&gt;
== Site-specific Search  ==&lt;br /&gt;
&lt;br /&gt;
*Agentarius User-Agent-Info - http://www.agentarius.net &lt;br /&gt;
*All Music Guide - http://a9ej32w.googlepages.com/allmusic &lt;br /&gt;
*Allrecipes.com - http://www.javajill.com/ubiquity/recipe.html &lt;br /&gt;
*AltLaw - http://www.keysquaremedia.com/ &lt;br /&gt;
*Archive.org - http://ubiquity.washing-up.co.uk/archive.html &lt;br /&gt;
*Aspectweb - http://annoq.aspectweb.org/uq.html &lt;br /&gt;
*Avatars - http://avatars.postiton.net &lt;br /&gt;
*Babylon - http://www.geocities.com/ubiquities1 &lt;br /&gt;
*Beat Goes On - http://***.pixelcore.ca/bgo_ubiquity/ (Used CDs DVDs &amp;amp;amp; Video Games) &lt;br /&gt;
*BibleGateway - http://www.zenorsoft.com/ubiquity.php (Looks up Bible Verses; OLD API), for a new API version of this command, see http://gist.github.com/283936&lt;br /&gt;
*Bing -http://gist.github.com/121595 (Search using Microsoft Bing) &lt;br /&gt;
*Bing - http://marcbelmont.com/command/bing Searches with result previews and keyword coloring [http://marcbelmont.com/command/bing screenshot] &lt;br /&gt;
*BitDefender Virus Search - http://www.bitdefender.com/site/VirusInfo/browseVirusEnciclopedia/ (Search for viruses in BitDefender&#039;s Virus Encyclopedia) &lt;br /&gt;
*Blogsearch - http://gist.github.com/156383 &lt;br /&gt;
*BoardGameGeek - http://www.hunterandlori.com/ubiquity/ [old api] &lt;br /&gt;
*Box Office Mojo - http://gist.github.com/165452 &lt;br /&gt;
*Brainstorm #9 - http://www.brainstorm9.com.br &lt;br /&gt;
*Cambridge - http://sealence.x10hosting.com/wordpress/?p=66 &lt;br /&gt;
*CharlieRose.com - http://erikvold.com/tools/ubiquity/charlierose/charlierose.cfm &lt;br /&gt;
*Common Lisp Hyperspec - http://common-lisp.net/project/lifp/ubiquity/clhs.htm &lt;br /&gt;
*Coxa Creme (Brazil) - http://gist.github.com/10795 &lt;br /&gt;
*craigslist - http://labs.vunite.com/vubiqs/verbs.php &lt;br /&gt;
*Deal Extreme - http://skogvoldconsulting.no/ubiquity/dealextreme &lt;br /&gt;
*Demonoid - http://www.thecompgeek.info/ubiquity/demonoid.html &lt;br /&gt;
*Deezer - http://jacquin.pascal.free.fr/ubiquity/ (Search&amp;amp;amp;listen music online) &lt;br /&gt;
*Dictionary.com - http://erikvold.com/tools/ubiquity/dictionary/dictionary.cfm &lt;br /&gt;
*Digg - http://captspify.is-a-geek.com/scripts/Home/Ubiquity (Searches Digg) &lt;br /&gt;
*dinehere.ca - http://dairong.googlepages.com/ubiquity.html &lt;br /&gt;
*Discogs - http://a9ej32w.googlepages.com/discogs &lt;br /&gt;
*eBay (geodetects your location and searches accordingly) - http://mskadu.googlepages.com/ebaysearch2 &lt;br /&gt;
*EmacsWiki - http://ubiquity.chrononaut.net/emacswiki.html &lt;br /&gt;
*Engrish Funny - http://www.zentu.net/ubiq/engrishfunny.html &lt;br /&gt;
*eMule Content Database - http://gist.github.com/185090 &lt;br /&gt;
*Failblog - http://www.zentu.net/ubiq/failblog.html &lt;br /&gt;
*Flickr slideshow - http://www.spencerwaterbed.com/soft/ubiquity/slideshow.html &lt;br /&gt;
*Fileshunt - http://avid.me/ubi/fileshunt.html &lt;br /&gt;
*Filestube - http://gist.github.com/240546 &lt;br /&gt;
*Filmweb.pl - http://gist.github.com/19735 http://gist.github.com/120581 &lt;br /&gt;
*Firefox add-ons - http://www.rakudave.ch/?q=node/20 &lt;br /&gt;
*Freebase - http://hamstersoup.com/freebase/ubiquity/ &lt;br /&gt;
*Futureshop.ca - http://dairong.googlepages.com/ubiquity.html &lt;br /&gt;
*GamesCom.de - http://digioso.org/cgi-bin/ubiquity/gcsearch.pl &lt;br /&gt;
*Garzanti - http://gist.github.com/145261 &lt;br /&gt;
*GitHub - http://ubiquity.chrononaut.net/github.html &lt;br /&gt;
*Geocaching - http://gist.github.com/234537 &lt;br /&gt;
*Google Image (with preview) - http://gist.github.com/10704 &lt;br /&gt;
*Google Image Search (preview, links, embedding) - http://www.jimmy2k.it/getimagescommand &lt;br /&gt;
*Google Trends (with preview) - http://gist.github.com/10706 &lt;br /&gt;
*Google Scholar - http://gist.github.com/180078 &lt;br /&gt;
*Google Books - http://www.radiantweb.net/ubiquity/ &lt;br /&gt;
*Goto webpage - http://gist.github.com/104240 &lt;br /&gt;
*Gumtree - http://dave.org.uk/ubiquity/gumtree.html &lt;br /&gt;
*Hoogle - http://www.randomhacks.net/git/ubiquity/hoogle/ &lt;br /&gt;
*Hotdog! LOLDogs - http://www.zentu.net/ubiq/hotdog.html &lt;br /&gt;
*Howjsay - http://gist.github.com/150109 (Talking Dictionary of English Pronunciation) &lt;br /&gt;
*Hulu - http://gist.github.com/51468 &lt;br /&gt;
*Imdb + preview - http://synapsos.kilu.de/ubiquity/imdbpreview/command.html &lt;br /&gt;
*Iciba.com(irecite) - http://sealence.x10hosting.com/wordpress/?p=63 &lt;br /&gt;
*Intershame.com - http://intershame.com/ubiquity/ &lt;br /&gt;
*Jaiku - http://jonasnockert.com/2008/08/ubiquity-code-for-jaiku-search/ &lt;br /&gt;
*Jiwa - http://jacquin.pascal.free.fr/ubiquity/ (Search&amp;amp;amp;listen music online) &lt;br /&gt;
*Jukuu - http://sealence.x10hosting.com/wordpress/?p=61 &lt;br /&gt;
*Kewego.fr - http://ht.ubiquity.googlepages.com/ubiquity-kewego.html &lt;br /&gt;
*Last.fm artist and album search - http://progoth.com/ubiquity-lastfm/ &lt;br /&gt;
*Last.FM - http://static.isnotworking.com/lastfm-search.html &lt;br /&gt;
*Last.fm &amp;quot;advanced&amp;quot; - http://satf.se/projects/ubiquity-commands/ubiquity-advanced-lastfm-search/ &lt;br /&gt;
*Last.fm Artist Lookup - http://gist.github.com/50505 &lt;br /&gt;
*leo.org dictionary - http://users.kilu.de or http://frigi.ch/ubiquity &lt;br /&gt;
*LibraryThing - http://www.quicksilverillness.com/ubiquity/librarything_searches.html &lt;br /&gt;
*Lifehacker.com search - http://gist.github.com/47455 &lt;br /&gt;
*Lifehacking tagcloud search - http://lifehacking.nl/web20/ubiquity-verbindt-het-web-weer/ (Dutch only!) &lt;br /&gt;
*Live - http://www.powerset.com &lt;br /&gt;
*LolCats latest image - http://members.optusnet.com.au/~crazyjane13/lolcats.html &lt;br /&gt;
*LoveFilm - http://dave.org.uk/ubiquity/lovefilm.html &lt;br /&gt;
*metacritic.com - http://dairong.googlepages.com/ubiquity.html &lt;br /&gt;
*metal-archives.com - http://people.iola.dk/arj/2008/09/02/adding-some-metal-to-ubiquity/ &lt;br /&gt;
*Moviefone - http://gist.github.com/91224 &lt;br /&gt;
*Mozilla Add-ons - http://projects.fligtar.com/ubiquity/add-on.php &lt;br /&gt;
*Mozilla Add-ons (by folarb) - http://gist.github.com/34678 &lt;br /&gt;
*MusicBrainz - http://a9ej32w.googlepages.com/musicbrainz &lt;br /&gt;
*NCIX.com - http://dairong.googlepages.com/ubiquity.html &lt;br /&gt;
*netflix - http://radria.sqlfusion.com/ubiquity.php &lt;br /&gt;
*NewAdvent.org - http://gist.github.com/54249 &lt;br /&gt;
*Newegg - http://test.fathomthat.org/ubiquity/newegg.html &lt;br /&gt;
*Newzbin - http://www.quicksilverillness.com/newzbin_search.html &lt;br /&gt;
*Orkut User Search - http://avid.me/ubi/orkut.html &lt;br /&gt;
*PubMed - http://gist.github.com/180067 or [0.5 incompatible] http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/pubmed/search-pubmed.js &lt;br /&gt;
*Powerset - http://www.powerset.com &lt;br /&gt;
*Questionable Content MediaFire Thread - http://bluesuncorp.co.uk/bbq/mfsearch.htm &lt;br /&gt;
*Reddit - http://captspify.is-a-geek.com/scripts/Home/Ubiquity/ &lt;br /&gt;
*RetailMeNot - http://www.quicksilverillness.com/ubiquity/retailmenot.html &lt;br /&gt;
*REVU - http://revu.ubuntuwire.com/ubiquity-plugin.py &lt;br /&gt;
*Rotten Tomatoes - http://gist.github.com/226548 &lt;br /&gt;
*routerank - http://gist.github.com/209714 (en|de|fr|es) &lt;br /&gt;
*Ruhr-University Bochum OPAC - http://bibliolabs.ub.rub.de/ubiquity &lt;br /&gt;
*Shoutcast Search &lt;br /&gt;
*SearchMe - http://www.thecompgeek.info/ubiquity/searchme.html &lt;br /&gt;
*Skweezer - http://unplugd.com/enblogd &lt;br /&gt;
*Smelly Cat - http://www.smellycat.com.br &lt;br /&gt;
*Smug-search - http://www.robertnyman.com/2009/03/26/search-smugmug-photos-easily-with-smug-search-ubiquity-command/ &lt;br /&gt;
*Snow Report - http://www.freewebs.com/wwprograms/ubiquity.htm &lt;br /&gt;
*Social Actions - http://www.crankreport.org/junkdrawer/js/ubiq_social_actions_page.html &lt;br /&gt;
*SongMeanings.net - http://captspify.is-a-geek.com/scripts/Home/Ubiquity/ &lt;br /&gt;
*stock.xchng / sxc.hu - http://www.juhamakkonen.com/ubiquity/commands/images/sxc.hu/sxc.htm &lt;br /&gt;
*Subscene - http://avid.me/ubi/subscene.html &lt;br /&gt;
*suggest-experts - [http://gist.github.com/15544 subscribe], [http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/pubmed/suggest-experts.js project at google code] &lt;br /&gt;
*SurfTheChannel.Com - [http://thecompgeek.info/ubiquity/surfthechannel.html http://thecompgeek.info/ubiquity/surfthechannel.html] &lt;br /&gt;
*The Daily Show - http://synapsos.kilu.de/ubiquity/dailyshow/command.html &lt;br /&gt;
*TheFreeDictionary - http://gist.github.com/144913 &lt;br /&gt;
*Thesaurus - Used to search thesaurus.reference.com http://www.zacharyspencer.com/2008/09/my-first-ubiquity-command/ &lt;br /&gt;
*Thottbot - http://topthis.tv/ubiquity/ &lt;br /&gt;
*TinEye - http://common-lisp.net/project/lifp/ubiquity/tineye.htm &lt;br /&gt;
*The Sri Lankan Tech Guide - http://www.thesrilankantechguide.com/ubiquity.html &lt;br /&gt;
*Tonight.eu - http://www.tonight.eu/ubiquity/ &lt;br /&gt;
*Ubuntu brainstorm - http://www.rakudave.ch/?q=node/21 &lt;br /&gt;
*Ultimate Guitar (supports grabbing FoxyTunes track info) - http://propus.lunarpages.com/~thefo2/ug.htm &lt;br /&gt;
*Update or Die (Brazil) - http://gist.github.com/10788 &lt;br /&gt;
*Urban Dictionary - http://common-lisp.net/project/lifp/ubiquity/urban-dictionary.htm (now with preview!) &lt;br /&gt;
*Urban Dictionary, alternate version - http://gist.github.com/47363 &lt;br /&gt;
*Vimeo - http://gist.github.com/72179 &lt;br /&gt;
*Viu Isso? (Brazil) - http://gist.github.com/10791 &lt;br /&gt;
*YTMND.com - http://gist.github.com/21802 &lt;br /&gt;
*Walk Score - http://gist.github.com/102868 &lt;br /&gt;
*Walk Score (Updated for Ubiquity 0.5) - http://gist.github.com/158453 &lt;br /&gt;
*Wapedia Search - http://unplugd.com/enblogd &lt;br /&gt;
*The Wayback Machine - http://www.yardensachs.com/ubiquity/ &lt;br /&gt;
*Webmd search - http://predator101.webng.com/ubiquity/webmd.html &lt;br /&gt;
*Websource.It - http://www.briandgoad.com/blog/ubiquity-commands/websourceit/ &lt;br /&gt;
*What.CD - http://corevette.googlepages.com/whatcdubiquity.html &lt;br /&gt;
*WhitePages.com - http://charlesconnell.com/ubiquity.html &lt;br /&gt;
*Wikiquote - http://www.geocities.com/ubiquities1 &lt;br /&gt;
*Wolfram|Alpha - http://common-lisp.net/project/lifp/ubiquity/wolfram.htm &lt;br /&gt;
*Wordnik – http://jonasnockert.com/2008/10/ubiquity-wordnik/ &lt;br /&gt;
*WorldCat - http://bibliolabs.ub.rub.de/ubiquity &lt;br /&gt;
*WTFCalls.com - http://wtfcalls.com/search/ &lt;br /&gt;
*WTSBooks.com - http://www.nerdlets.org/2009/01/14/ubiquity-command-for-the-westminster-bookstore/ &lt;br /&gt;
*xkcd - http://ieng6.ucsd.edu/~rjc002/ &lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK &lt;br /&gt;
*Yahoo! Finance http://www.hoffstein.net/ubiquity/stock-quote.html Stock quote for one or more tickers (comma-separated) &lt;br /&gt;
*Yahoo! Finance http://www.hoffstein.net/ubiquity/stock-chart.html 1Y stock chart for a given ticker &lt;br /&gt;
*Yahoo! Finance http://www.matthias-schuetz.eu/yfin-ubiquity.html Quickly review stock quotes and charts &lt;br /&gt;
*Yahoo! Finance http://proplus.aptanacloud.com/ubiquity/yahoo-graph.html Tiny Year To Date ticker chart &lt;br /&gt;
*dict.youdao.com / dict.yodao.com - http://www.utblog.com/tools/ubiquity/yodao-dict.htm &lt;br /&gt;
*Zappos - http://topthis.tv/ubiquity/ &lt;br /&gt;
*Zipzoomfly - http://test.fathomthat.org/ubiquity/zipzoomfly.html &lt;br /&gt;
*Zootool - http://zootool.com/blog/2008/08/27/zootool-and-ubiquity/&lt;br /&gt;
&lt;br /&gt;
== Web Lookup  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm whois]: Performs a whois on selected or typed URL/IP. &lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm ping]: Pings the selected or typed URL/IP &lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm lookup]: Performs a lookup on selected or typed URL/IP. &lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm tracert]: Performs a tracert on selected or typed URL/IP. &lt;br /&gt;
&lt;br /&gt;
[http://www.rakudave.ch/?q=node/25 just-ping]: Pings the selected or typed URL/IP from 32 checkpoints worldwide. &lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm isdown]: Takes selected or typed URL and determines if it is working using the downforeveryoneorjustme.com tool. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/9285 Whats-My-IP]: Gets your IP address and displays it in the preview. Copies IP to clipboard on execute. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10700 Search-Domain-Name]: Checks the availability of com/org/net TLD domain names. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10707 Traffic]: Get Compete traffic charts for the given site. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10703 Host]: Checks the Web Host of the given site. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10702 Site-Down]: Checks if the site is down. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10249 Gmane]: Look up gmane group &lt;br /&gt;
&lt;br /&gt;
== Google  ==&lt;br /&gt;
&lt;br /&gt;
=== extensions of the core commands  ===&lt;br /&gt;
&lt;br /&gt;
*[http://mytechieself.blogspot.com/2008/08/writing-ubiquity-commands.html Google Scholar and Google Patent Searches] &lt;br /&gt;
*[http://www.radiantweb.net/ubiquity/ Google Book Search] &lt;br /&gt;
*[http://www.radiantweb.net/ubiquity/ Google News Search] &lt;br /&gt;
*[http://hondje.mine.nu/ubiquity/ Google Search within current domain] &lt;br /&gt;
**[http://www.endolith.com/ubiquity_commands.html Version that lets you specify which domain] &lt;br /&gt;
*[http://pynej.blogspot.com/2008/10/ubiquity-command-search-google-web.html Google Web History Search] &lt;br /&gt;
*[http://www.anod1.free.fr/pdf.html pdf] is a command that search pdf files with google. &lt;br /&gt;
*[http://threepipeproblem.com/ubiquity/gmine_ubiquity.html Gmine] searches Gmail, Google Calendar, and GDocs for your search term. &lt;br /&gt;
*[http://gist.github.com/60561?google++ google++] all-in-one pack of google services (web/image/video/mail/reader/code) with improved previews. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/signout.html Signout]: sign out of your google account from ubiquity &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/insearch.html Search inside]: Google search in the current website. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/task.html Tasks]: open your [http://mail.google.com/tasks/ig?pli=1 gmail tasks] in a new window.&lt;br /&gt;
&lt;br /&gt;
=== Google Feeling Lucky  ===&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/16507 Quicky] not only runs your input through I&#039;m Feeling Lucky, but lets you preview the page also. A quick, dirty splice up of &#039;go&#039; and &#039;goto&#039;. &lt;br /&gt;
*[http://point.pt/~guillaume/ubiquity/feeling-lucky.html Feeling-lucky] is a simple command that looks up the first result and displays it on the preview, and upon hitting enter, it executes by opening that particular web-page. &lt;br /&gt;
*[http://point.pt/~guillaume/ubiquity/feeling-lucky.html Link-to-feeling-lucky] is a command that is similar to &#039;&#039;link-to-wikipedia&#039;&#039;: upon execution it injects a link to google&#039;s first result on the rich text-editing field. Quite handy when linking to companies websites while blogging.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[[User:Griflet|Griflet]]: I renamed these commands with their natural names. The old commands with their original names can still be found [http://point.pt/~guillaume/ubiquity/myCows.html here]&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
=== google hacks  ===&lt;br /&gt;
&lt;br /&gt;
*[http://www.anod1.free.fr/music.html music] is a command that use google hacks in order to find mp3 or ogg music. &lt;br /&gt;
*[http://www.anod1.free.fr/video.html video] is a command that use google hacks in order to find video. &lt;br /&gt;
*[http://icecreamfactory.freehostia.com/ubiquity/googlism.html googlism] shows what google.com thinks of you, your friends or anything &lt;br /&gt;
*[http://gist.github.com/123073 gdefine] Performs a google search with the prefix &amp;quot;define:&amp;quot; to find definitions for a word.&lt;br /&gt;
&lt;br /&gt;
=== google image search  ===&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/85963 Google Image Search] is a command that allows you to search images on google. You can also choose a color and google gives you only the images matching your color. It&#039;s not well programmed, so feel free to improve it. Be sure to give me some feedback.&lt;br /&gt;
&lt;br /&gt;
=== Google Chart API Commands  ===&lt;br /&gt;
&lt;br /&gt;
*[http://github.com/nhorvath/Ubiquity-QRCode QRCode Generator] is a command that generates QR Codes with the Google Chart API. It will encode whatever text you pass it into the QR Code which then can be scanned by mobile devices and barcode readers that support QR Codes.&lt;br /&gt;
&lt;br /&gt;
=== Google Wave  ===&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/217223 Wave] allows you to search for waves using advanced modifiers or clickable shortcuts for the folders/criteria.&lt;br /&gt;
&lt;br /&gt;
== Multiple site search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://math-www.uni-paderborn.de/~axel/ubiquity_search.html multi-search]: Searches Google, Yahoo, MSN Live and Ask.com simultaneously, in different tabs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Let Me Google That For You  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/144222 lmgtfy]: create a link to a (not so?) subtle suggestion for someone who asks you, via a computer, about something that Google might be able to answer. Courtesy of [[LetMeGoogleThatForYou.com]]. The [http://gist.github.com/45201 old pre-0.5 version] is deprecated.&lt;br /&gt;
&lt;br /&gt;
== Picitup Visual Search  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.picitup.com]: 2 commands: &lt;br /&gt;
&lt;br /&gt;
*shop - Executes a shopping search with visual similarity and shopping compariosn - [http://www.picitup.com/picitup/picShop.jsp] &lt;br /&gt;
*picitup - Executes a visual search query agianst, Yahoo, Flikcr and Picasa image search engines [http://www.picitup.com]&lt;br /&gt;
&lt;br /&gt;
== Legal Citation Search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.keysquaremedia.com legal-cite]: Executes search of AltLaw for U.S. Code (federal statutes) and some federal case law (i.e., Supreme Court Opinions and federal appeals court opinions that were reported by West)&lt;br /&gt;
&lt;br /&gt;
== Oracle  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.pythian.com/blogs/1187/ubiquity-and-tahiti-together-at-last Tahiti]: Executes search of Oracle documentation from their repository at http://tahiti.oracle.com. Can search all docs or version-specific docs. &lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts search-oracle-docs: Search through the Oracle Documentation on] [http://www.oracle.com/technology/documentation/index.html Oracle Documentation website]&lt;br /&gt;
&lt;br /&gt;
== Torrent Search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://slackers.se/projects/ubiquity-hdbits HDBits]: Search for torrents on HDBits. &lt;br /&gt;
*[http://217.209.1.243/~sertion/ubiquity/isohunt/ Search isoHunt] in the Ubiquity preview. Open results with accesskey or mouseclick. &lt;br /&gt;
*[http://entvibes.com/torrents.htm torrent]: Search for torrents on ALL the big trackers at once (uses Torrent Vortex and Torrent-Finder) &lt;br /&gt;
*[http://www.furey.com.au/stuff/ubiquity/mininova/ mininova]: Search for torrents on [http://Mininova.org Mininova]. Refine your search using categories (&amp;quot;in&amp;quot;) and sort types (&amp;quot;as&amp;quot;). &#039;&#039;&#039;Now version 0.5.4 compatible!&#039;&#039;&#039; &lt;br /&gt;
*[http://garyhodgson.com/ubiquity/torrent.html mininova]: Performs a search for the selected text on [http://Mininova.org Mininova]. Optionally, a category can be defined, e.g. Books, Anime, etc.) &lt;br /&gt;
*[http://garyhodgson.com/ubiquity/torrent.html mininova-imdb]: Performs a search on Mininova.org for a given IMDB code (with or without the &#039;tt&#039;-prefix). &lt;br /&gt;
*[http://gist.github.com/53950 imdbt]: Accurately search for movie torrents on mininova. Type movie keywords and specify desired movie with the &amp;quot;with&amp;quot; mod phrase using the movie&#039;s imdb code shown in the preview (start typing &amp;quot;with t&amp;quot; and choose from autocomplete suggestions). Search will be done using imdb code if available or keywords otherwise. &lt;br /&gt;
*[http://gist.github.com/57852 thePirateBay]: Performs a search for (a) given word(s) on [http://ThePirateBay.org ThePirateBay]. The result will be display directly on the ubiquity preview window, you can start downloading without opening a new tab. &lt;br /&gt;
*[http://gist.github.com/64552 piratebay]: Search for a torrent on Pirate Bay, with the option of specifying a category (Audio/Video/Software/Games/Other) and/or a sort (Type/Name/Uploaded/Size/Seeds). &lt;br /&gt;
*[http://garyhodgson.com/ubiquity/torrent.html piratebay]: Performs a search for the selected text on [http://ThePirateBay.org ThePirateBay]. Optionally, a category can be defined, e.g. Audio, Video, etc.) &lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts search-torrentz: Search for torrents] on [http://www.torrentz.com Torrentz.com] &lt;br /&gt;
*[http://math-www.uni-paderborn.de/~axel/ubiquity_torrent.html torrent-search]: Searches on PirateBay, Isohunt and Torrentz simultaneously, in different tabs. &lt;br /&gt;
*[http://knightar.artician.com/blog/2008/09/TokyoToshocom-Search-Addon-for-Ubiquity/ tokyotosho]: Searches and lists TokyoTosho.com torrents. (Optionally, a category can be defined, e.g. Anime, Manga, Drama, Raws, etc.) &lt;br /&gt;
*[http://www.thecompgeek.info/ubiquity/demonoid.html Demonoid]: Searches for the predetermined set of keywords on Demonoid.com. Plain and simple. &lt;br /&gt;
*[http://avid.me/ubi/speckly.html Speckly]: Searches for keywords on Speckly.com - Searches 10 torrent sites &lt;br /&gt;
*[http://www.dca.fee.unicamp.br/~tatai/ubiquity btjunkie-search]: Searches for torrents on BTJunkie &lt;br /&gt;
*Searches for torrents on [http://bhagwad.com/blog/2009/04/ubiquity-torrent-search-mininova-isohunt-piratebay.html Mininova, IsoHunt and PirateBay]. Opens in three new tabs&lt;br /&gt;
&lt;br /&gt;
= Words and Languages  =&lt;br /&gt;
&lt;br /&gt;
*[http://mskadu.googlepages.com/bitly2 langid] - Identify which language any text has been written in. &lt;br /&gt;
*[http://gist.github.com/119827 lingvo]: Russian / English &lt;br /&gt;
*[http://developer.swekee.com/ubiquity/ David Álvaro &amp;amp;lt;&amp;amp;gt; Diccionario de la lengua de la Real Academia Española ]: Español / Spanish (D-RAE) &lt;br /&gt;
*[http://yardensachs.com/ubiquity/ Yarden&#039;s Hebrew&amp;amp;lt;&amp;amp;gt;English Morfix dictionary lookup ]: morfix &lt;br /&gt;
*[http://yardensachs.com/ubiquity/ Yarden&#039;s Hebrish&amp;amp;lt;&amp;amp;gt;Engrew convert - between Hebrew char&#039;s and English char&#039;s with QWERTY layout ]: hetoen / entohe &lt;br /&gt;
*[http://halcy.de/past/2008/8/27/mozilla_ubiquity_beolingus_germanenglish_dictionary/ German&amp;amp;lt;&amp;amp;gt;English dictionary lookup ]: beo &lt;br /&gt;
*[http://www.satf.se/page/ubiquity-japanese-english-romaji-dictionary pihl&#039;s Japanese&amp;amp;lt;&amp;amp;gt;English romaji dictionary lookup ]: jaen &lt;br /&gt;
*[http://radheef.com/ubiquity/ Dhivehi Radheef (dictionary) lookup ]: jaa &lt;br /&gt;
*[http://olobolger.blogspot.com/2008/08/mozilla-ubiquity.html RAE Spanish dictionary definition lookup]: rae &lt;br /&gt;
*[http://www.geocities.com/baloo_rch/rae_ubiquity.html Real Academia Española Diccionário/Dictionary Definition Lookup (with preview) ]: definir &lt;br /&gt;
*[http://www.heartsmagic.net/ubi.html Seslisozluk, Zargan English &amp;amp;lt;-&amp;amp;gt; Turkish look up] English &amp;amp;lt;-&amp;amp;gt; Turkish &lt;br /&gt;
*[http://www.verdsveven.com/ubiquity/nn_nb_dict.html Nynorskordboka og Bokmålsordboka]: Norwegian dictionaries &lt;br /&gt;
*[http://www.jpemartin.com/ubiq/calc2.html calc2] - natural language calculator &lt;br /&gt;
*[http://jarfil.net/ubiquity/dict.html dict.org lookup]: dict &lt;br /&gt;
*[http://gist.github.com/60377 dizionario]: - Italian dictonary (Hoepli) &lt;br /&gt;
*[http://gist.github.com/70871 De Mauro]: - Search Italian Dictionary De Mauro Paravia &lt;br /&gt;
*[http://claude.duvergier.fr/developpements/ubiquity/conjugate/conjugate.html conjugate]: French conjugation of verbs using [http://www.leconjugueur.com leconjugueur.com] (CDuv) &lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/dialectrics.html French characters] -displays and inserts common accented french characters (dialectrics).&lt;br /&gt;
*[http://pnxk.freehostia.com/ubiquity/rae_dictionary.html Real Academia Española Diccionário/Dictionary Definition Lookup ]: Español / Spanish (RAE) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== English ==&lt;br /&gt;
*[http://apoema.net/langbot/en/gc.lb?topic=ubiquity grammar]: Performs grammar checking under selected text and suggests corrections. Several languages supported. &lt;br /&gt;
*[http://tat.wright.name/ubiquity-spell/ spell]: Use Google to find a correct spelling for a guessed spelling of a word. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/spell.html spell]: Use Aspell to find a correct spelling for a guessed spelling of a word. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/wordnet.html wordnet]: Lookup a word in wordnet&lt;br /&gt;
*[http://pnxk.freehostia.com/ubiquity/cambridge_dictionary.html Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup ]: English (Cambridge) &lt;br /&gt;
*[http://gist.github.com/65093 Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup with preview ]: English (Cambridge). See a screen shot [http://sealence.x10hosting.com/wordpress/?p=66 here]. &lt;br /&gt;
*[http://gist.github.com/84553 pronounce]: Pronounce a selected or typed English word&lt;br /&gt;
&lt;br /&gt;
= Programming Languages  =&lt;br /&gt;
&lt;br /&gt;
== Asterisk  ==&lt;br /&gt;
&lt;br /&gt;
[[Labs/Ubiquity/dial]]: Configure your Asterisk PBX to use the &#039;dial&#039; command for Ubiquity. &lt;br /&gt;
&lt;br /&gt;
== Common Lisp  ==&lt;br /&gt;
&lt;br /&gt;
*[http://common-lisp.net/project/lifp/ubiquity/clhs.htm Search Common Lisp Hyperspec]&lt;br /&gt;
&lt;br /&gt;
== C++  ==&lt;br /&gt;
&lt;br /&gt;
[http://abauchu.net/ubiquity/search-cpp.html search-c++] Searches a term on [http://www.cplusplus.com cplusplus.com]. &lt;br /&gt;
&lt;br /&gt;
== jQuery  ==&lt;br /&gt;
&lt;br /&gt;
#[http://erikvold.com/tools/ubiquity/jquery/jquery.cfm jquery]: Searches the jQuery documentation. &lt;br /&gt;
#http://marcbelmont.com/command/bing Searches the jQuery documentation with result previews and keyword coloring [http://marcbelmont.com/command/bing screenshot]&lt;br /&gt;
&lt;br /&gt;
== PHP  ==&lt;br /&gt;
&lt;br /&gt;
[http://josuerodriguez.com/2009/08/ubiquity-php-search-preview-updated/ php] Search &amp;amp;amp; Preview PHP function specs, comments, examples, etc. example: php strstr examples &lt;br /&gt;
&lt;br /&gt;
[http://taukon.de/ubiquity-php-function.php php] search PHP function documentation example: php join() &lt;br /&gt;
&lt;br /&gt;
[http://taukon.de/ubiquity-php-function-doc.php phpd] search PHP documentation example: phpd class &lt;br /&gt;
&lt;br /&gt;
[http://verath.se/phpdoc phpdoc] Find information about a selected/entered php function example: phpdoc echo &lt;br /&gt;
&lt;br /&gt;
[http://download.sbw.be/projects/ubiquity/php-search.html php] A mix of phpd and phpdoc here above, you get a shortlist and when you hit enter, you are taken to the next php.net tabs open pointing to the most appropriate documenation. example: php str_repl &lt;br /&gt;
&lt;br /&gt;
== Perl  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.grok.in/ubiquity/perl.html perldoc, cpan, monks]: Three commands, one each to search perldocs, CPAN and perlmonks.org &lt;br /&gt;
&lt;br /&gt;
== Rails  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/43619 rails] search rails documentation example: rails link_to &lt;br /&gt;
&lt;br /&gt;
== ActionScript  ==&lt;br /&gt;
&lt;br /&gt;
[http://anirudhs.chaosnet.org/blog/2008.09.04.html as3livedocs, as3desc, as3package]: Three commands, one to open up livedocs page given a class, one to give the description of an actionscript class and another to give the package to which a class belongs to. &lt;br /&gt;
&lt;br /&gt;
== Coldfusion  ==&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/coldfusion/coldfusion.cfm coldfusion]: Search the Coldfusion 8 LiveDocs. &lt;br /&gt;
&lt;br /&gt;
== MySQL  ==&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/mysql/mysql.cfm mysql] &lt;br /&gt;
&lt;br /&gt;
*mysql: Search all of the MySQL documentation. &lt;br /&gt;
*mysql5: Search the MySQL 5.0 reference manual. &lt;br /&gt;
*mysql5.1: Search the MySQL 5.1 reference manual. &lt;br /&gt;
*mysql6: Search the MySQL 6.0 reference manual. &lt;br /&gt;
*mysql-admin: Search the MySQL administrator reference manual. &lt;br /&gt;
*mysql-query-browser: Search the MySQL query browser reference manual &lt;br /&gt;
*mysql-migration-toolkit: Search the MySQL migration toolkit reference manual. &lt;br /&gt;
*mysql-workbench: Search the MySQL workbench reference manual.&lt;br /&gt;
&lt;br /&gt;
[http://mitcho.com/code/select select] - select gives you read access to your MySQL databases right from Ubiquity, with smart suggestions of your table and column names. &lt;br /&gt;
&lt;br /&gt;
== Postgres  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/44867 postgres] &lt;br /&gt;
&lt;br /&gt;
*postgres: Search all of the Postgress documentation. &lt;br /&gt;
*postgres83: Search the Postgress 8.3 reference manual. &lt;br /&gt;
*postgres82: Search the Postgress 8.2 reference manual. &lt;br /&gt;
*postgres81: Search the Postgress 8.1 reference manual. &lt;br /&gt;
*postgres80: Search the Postgress 8.0 reference manual. &lt;br /&gt;
*postgres74: Search the Postgress 7.4 reference manual&lt;br /&gt;
&lt;br /&gt;
== Java  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.cse.ucsd.edu/users/jnguy/java.html Java API] - Wraps a google search pointing to the java API &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/153808 Java API Search] - Another search of the Java API, with a detailed preview. Compatible with Ubiquity 0.5. &lt;br /&gt;
&lt;br /&gt;
== Javascript  ==&lt;br /&gt;
&lt;br /&gt;
*[http://blog.monstuff.com/archives/000341.html Beautify-JS] - Let&#039;s you nicely reformat any selected javascript code. Handy for Ubiquity verb authors.&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/json.html JSON formatter] - makes JSON text prettier&lt;br /&gt;
&lt;br /&gt;
== HTML/CSS Reference  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/62697 W3Schools Search] uses google to search W3Schools&#039; documentation on HTML, javascript, CSS, and other web technologies. &lt;br /&gt;
&lt;br /&gt;
== HTML Validation  ==&lt;br /&gt;
&lt;br /&gt;
[http://joshhuckabee.com/w3c-validator-ubiquity-plugin W3C Validator Ubiquity Plugin] Submits the current page to the W3C&#039;s markup validator. Enter the command &amp;quot;validate&amp;quot; on any publicly available web page and hit enter. &lt;br /&gt;
&lt;br /&gt;
== Wordpress  ==&lt;br /&gt;
&lt;br /&gt;
[http://avid.me/ubi/wordpress.html Wordpress] Searches the terms in Documentation &amp;amp;amp; Forums on Wordpress.com &lt;br /&gt;
&lt;br /&gt;
[http://wpseek.com/ubiquity/ wpseek] Lookup any WordPress function or Template Tag with wpseek.com &lt;br /&gt;
&lt;br /&gt;
== Drupal API  ==&lt;br /&gt;
&lt;br /&gt;
[http://joshhuckabee.com/drupal-api-ubiquity-plugin Drupal API Ubiquity Plugin] Lookup functions, files, constants, etc. in Drupal&#039;s API. Enter the command &amp;quot;drupal&amp;quot; followed by what you wish to lookup. Hit enter to be taken to that item in the API. &lt;br /&gt;
&lt;br /&gt;
== Python  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.vwelch.com/ubiquity/pydoc.html Pydoc] Lookup any Python terms via http://docs.python.org/search.html. Enter &amp;quot;pydoc&amp;quot; followed by the search term. &lt;br /&gt;
&lt;br /&gt;
#http://marcbelmont.com/command/bing Searches the python.org with result previews and keyword coloring [http://marcbelmont.com/command/bing screenshot]&lt;br /&gt;
&lt;br /&gt;
== BSD Man Pages  ==&lt;br /&gt;
&lt;br /&gt;
[http://trolocsis.com/ubiquity/ bsdman] Lookup BSD man pages with apropos support. Enter &#039;bsdman&#039; followed by the search term. Updated for Ubiquity 0.5. &lt;br /&gt;
&lt;br /&gt;
= URL Tools  =&lt;br /&gt;
&lt;br /&gt;
*goto: Simply navigate to any URL - http://gist.github.com/72189 &lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/revcanonical/revcanonical.cfm revcanonical]: Replaces the selected URL with a [http://revcanonical.appspot.com Rev-canonicalized URL!] &lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/relshortlink/relshortlink.cfm relshortlink]: Replaces the selected URL with a [http://rel-shortlink.appspot.com/ rel=shortlink]. &lt;br /&gt;
*[http://gibberish.com/hacks/ubiq/lazylink.html lazylink]: Replaces the selected text with a link to its first hit in Google. &lt;br /&gt;
*[http://gist.github.com/169819 url2pdf]: Select a url then print it to pdf.&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/encode.html Url encode/decode] - change a string back and forth from &#039;percent encoding&#039; &lt;br /&gt;
== mac  ==&lt;br /&gt;
&lt;br /&gt;
https://wiki.mozilla.org/Mac search for manifacturer with last octet of mac adress &lt;br /&gt;
&lt;br /&gt;
== is.gd  ==&lt;br /&gt;
&lt;br /&gt;
[http://arunstechcorner.blogspot.com/2009/02/shorten-urls-in-ubiquity-with-isgd.html is.gd] Shorten and replace the selected URL with is.gd service. The shortened URL is also copied to the clipboard &lt;br /&gt;
&lt;br /&gt;
== Inlinks  ==&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/inlinks/inlinks.cfm Inlinks] Find the number of external inlinks to a provided url (yahoo.com only). &lt;br /&gt;
&lt;br /&gt;
== Links  ==&lt;br /&gt;
&lt;br /&gt;
synonyms: links, parse links, urls, url &lt;br /&gt;
&lt;br /&gt;
[http://kollektive.com/ubiquity/ links] Parses selected text and replaces any URLs found with HTML links. Recognises most common protocols, even creates mailto: links for email addresses. Now works with the new parser in 0.5 &lt;br /&gt;
&lt;br /&gt;
== BuiltWith  ==&lt;br /&gt;
&lt;br /&gt;
[http://bjarki.info/misc/ubiquity/?view=builtwith BuiltWith] Find out what technologies the URL is using. &lt;br /&gt;
&lt;br /&gt;
== Text2Link  ==&lt;br /&gt;
&lt;br /&gt;
[http://text2link.jeffreyjmorgan.com/ubiquity/ Text2Link] opens URLs and sends emails to addresses not marked up as HTML links with the A tag. This is the Ubiquity version of the [https://addons.mozilla.org/en-US/firefox/addon/6003 Text2Link Firefox Extension]. &lt;br /&gt;
&lt;br /&gt;
== shortText.com  ==&lt;br /&gt;
&lt;br /&gt;
2 commands: &lt;br /&gt;
&lt;br /&gt;
*[http://shortText.com/ shorttext]: Creates a shortText URL for any selected text &lt;br /&gt;
*[http://shortText.com/ longtext]: Select any shortText URL on any site and it will replace the URL with the actual content&lt;br /&gt;
&lt;br /&gt;
== Bit.ly  ==&lt;br /&gt;
&lt;br /&gt;
*[http://mskadu.googlepages.com/bitly bitly] - Shortens the selected url using [http://bit.ly Bit.ly]. Pretty much the same as the built-in tinyurl. &lt;br /&gt;
*Shorten URL and copy to clipboard using bit.ly service: http://bit.ly/18Fsn2 &lt;br /&gt;
*Shorten and replace selected URL in a Rich Text Field or reverse an already shortened bit.ly URL: http://bit.ly/315THd &lt;br /&gt;
*[http://alexsydell.com/applications/ubiquity/bitly/ bit.ly for 0.5] - &#039;&#039;&#039;Works with Ubiquity 0.5&#039;&#039;&#039; Shortens and replaces a URL using bit.ly and copies the shortened URL to the clipboard.&lt;br /&gt;
&lt;br /&gt;
== RSS Commander  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/211822 rss commander] - A nice and quick way to browse RSS feeds by typing in a domain.&lt;br /&gt;
&lt;br /&gt;
== ping  ==&lt;br /&gt;
&lt;br /&gt;
*[http://flesler.com/ubiquity/ping/ ping] - Pings a host a certain amount of times and displays a notification for each success or failure.&lt;br /&gt;
&lt;br /&gt;
== sm00sh  ==&lt;br /&gt;
&lt;br /&gt;
Shorten a URL using sm00sh. It uses Bad Behavior and SURBL and URIBL to reduce spam in the database. Simply navigate to [http://smsh.me/action/ubiquity sm00sh] to install using firefox. Use the command &amp;quot;sm00sh&amp;quot; &lt;br /&gt;
&lt;br /&gt;
== places  ==&lt;br /&gt;
&lt;br /&gt;
Search your places history and bookmarks db with ubiquity: &lt;br /&gt;
&lt;br /&gt;
*[https://gist.github.com/144985/cd8cd04e8cc427e66aff6e327ddad4648b92eb43] For ubiquity v0.5+ &lt;br /&gt;
*[http://gist.github.com/53958] For ubiquity versions before 0.5&lt;br /&gt;
&lt;br /&gt;
= ShortURL  =&lt;br /&gt;
&lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/shorturl/shorturl.cfm shorturl]: Replaces the selected URL with a [http://revcanonical.appspot.com/ Rev-Canonicalized] URL of less than 44 characters or else a [http://tinyurl.com TinyUrl].&lt;br /&gt;
&lt;br /&gt;
== LongURL  ==&lt;br /&gt;
&lt;br /&gt;
*[http://longurl.org/tools expand-short-url] Uses the LongURL service to expand URLs shortened with any shortening service (TinyURL.com, Bit.ly, etc.) &lt;br /&gt;
*[http://gist.github.com/230861 longurl.org] Uses the LongURL service to expand shortened URLs. Works with &#039;&#039;&#039;Ubiquity 0.5+&#039;&#039;&#039; and has better preview (title+favicon of linked page)&lt;br /&gt;
&lt;br /&gt;
== Tr.im  ==&lt;br /&gt;
&lt;br /&gt;
[http://almaer.com/firefox/commands/ trimurl] Uses the tr.im service to shorten a URL and put it in your clipboard if successful &lt;br /&gt;
&lt;br /&gt;
[http://ubiquitycommand.appspot.com/trim trim] Inspired by &#039;tinyurl&#039; and works in a similar way but uses tr.im &lt;br /&gt;
&lt;br /&gt;
== Hurl.ws  ==&lt;br /&gt;
&lt;br /&gt;
Shorten a URL using hurl. Simply navigate to [http://www.hurl.ws hurl.ws] to install using firefox. Use the command &amp;quot;hurl&amp;quot; &lt;br /&gt;
&lt;br /&gt;
== a.longreply.com  ==&lt;br /&gt;
&lt;br /&gt;
Use a.longereply.com to convert any section of text into a URL so you can then send this link via IM, Twitter, email? Can send very large peices of text. Use the command &amp;quot;longreply&amp;quot;. To install it [http://a.longreply.com a.longreply.com] &lt;br /&gt;
&lt;br /&gt;
== shorten  ==&lt;br /&gt;
&lt;br /&gt;
The all in one URL shortner: [http://labs.vunite.com/vubiqs/verbs.php vunite&#039;s commands] Usage: shorten [url] using [tinyurl|isgd|bitly|hurl|snipurl] &lt;br /&gt;
&lt;br /&gt;
== kissa.be  ==&lt;br /&gt;
&lt;br /&gt;
A new [http://www.yalazi.org/ubiquity/list.html kissalt, url shortening service], kissalt means &amp;quot;shorten&amp;quot; in Turkish (original word: kisalt) &lt;br /&gt;
&lt;br /&gt;
== u.nu  ==&lt;br /&gt;
&lt;br /&gt;
Inspired by &#039;tinyurl&#039; and works in a similar way but uses [http://u.nu u.nu] Old API: [http://labs.kaanerturk.net/ubiquity/unu/ u.nu] &lt;br /&gt;
&lt;br /&gt;
New API: [http://gist.github.com/166170 u.nu] &lt;br /&gt;
&lt;br /&gt;
== lincr  ==&lt;br /&gt;
&lt;br /&gt;
[http://sathyasays.com/2008/09/21/my-first-ubiquity-command-lincr-it/ Lincr ] is a URL shortening service. The [http://lin.cr homepage] also shows a list of recently Lincr&#039;d URLs and a RSS feed of the same. &lt;br /&gt;
&lt;br /&gt;
== epoxy  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/66647 epoxy] is a Code-Snippet to URL service and uses [http://www.openpaste.org/en/ OpenPaste] to perform its function. More information can be found at [http://epoxy.andhapp.com/ epoxy homepage] &lt;br /&gt;
&lt;br /&gt;
== PageRank Determination  ==&lt;br /&gt;
&lt;br /&gt;
Allows you to check the Google PageRank of the current or any other page. [http://bhagwad.com/blog/2009/04/check-pagerank-with-ubiquity-extension-page-rank.html page-rank] &lt;br /&gt;
&lt;br /&gt;
== urlShort (u.mavrev.com)  ==&lt;br /&gt;
&lt;br /&gt;
[http://u.mavrev.com/ubi u] Shorten and replace the selected URL using the urlShort service at u.mavrev.com. The shortened URL is also copied to the clipboard. &lt;br /&gt;
&lt;br /&gt;
== PunyURL  ==&lt;br /&gt;
&lt;br /&gt;
Shortens and replaces the selected URL using [http://puny.sapo.pt SAPO PunyURL], copying the new URL to the clipboard. [http://gist.github.com/159501 http://gist.github.com/159501] &lt;br /&gt;
&lt;br /&gt;
== Cligs  ==&lt;br /&gt;
&lt;br /&gt;
Shortes and replaces the selected URL using [http://cli.gs/ Cligs], and copies the short URL to the clipboard. [http://gist.github.com/163191 http://gist.github.com/163191] &lt;br /&gt;
&lt;br /&gt;
== Other URL manipulation  ==&lt;br /&gt;
&lt;br /&gt;
*[http://projects.fligtar.com/ubiquity/url.php URL Tool] - Converts selected URLs to links or lets you choose which one to open in a new tab. &lt;br /&gt;
*[http://nevermind85.net63.net/Ubiquity/try.html ToLink] - Converts the selected text link in a real clickable link. &lt;br /&gt;
*[http://blog.monstuff.com/archives/000343.html insert-link] - Search for a link in your history and insert it. &lt;br /&gt;
*[http://earth2marsh.com/ubiquity/percent_encoding Percent Encoding Tools] Commands to percent encode as well as decode (aka &amp;quot;URI encoding&amp;quot;) selected text. Provides preview and/or replaces selected text. &lt;br /&gt;
*[http://kollektive.com/ubiquity/ links] - converts non-marked up text/html which contains urls and email addresses into proper anchor tags. Works within html pages, and in rich text editing fields (eg. rich text editing in GMAIL) &lt;br /&gt;
*[http://pentarious.altervista.org/ubiquity/ urlize] - Scans a text for URLs and opens them in new tabs. A preview is available to open single URLs manually.&lt;br /&gt;
&lt;br /&gt;
[[Media:Example.ogg]] &lt;br /&gt;
&lt;br /&gt;
= Web 2.0 (Social networks, blogs, recommenders, etc)  =&lt;br /&gt;
&lt;br /&gt;
== Add to Any  ==&lt;br /&gt;
&lt;br /&gt;
Parser 1.0: Share current page using any service. Script: http://gist.github.com/102242. &lt;br /&gt;
&lt;br /&gt;
Parser 2.0: Source Script can be located from a [http://code.google.com/p/zainulfranciscusubiquity/source/browse/trunk/+zainulfranciscusubiquity/Ubiquity/addToAny.js Google Code project.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== BackType  ==&lt;br /&gt;
&lt;br /&gt;
#[http://erikvold.com/tools/ubiquity/backtype/backtype.cfm backtype]: Starts a search of BackType, which allows you to do a search for a person&#039;s comments on blogs and other sites.&lt;br /&gt;
&lt;br /&gt;
== CipherHive  ==&lt;br /&gt;
&lt;br /&gt;
A Global search of Moodle Based Courses, Forums, Wiki&#039;s, Blogs, Users, Posts, Authors, etc. &lt;br /&gt;
&lt;br /&gt;
Script: http://www.cipherhive.org/course/view.php?id=19 &lt;br /&gt;
&lt;br /&gt;
To use, just type cipher + the word you wish to search. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Del.icio.us  ==&lt;br /&gt;
&lt;br /&gt;
=== Add a page to your delicious bookmarks  ===&lt;br /&gt;
&lt;br /&gt;
Script: http://gist.github.com/7516 &lt;br /&gt;
&lt;br /&gt;
To use, just type delicious + your tags. &lt;br /&gt;
&lt;br /&gt;
Another Command: http://decafbad.com/UbiquityCommands/ &lt;br /&gt;
&lt;br /&gt;
Highlight some text on the page for notes, activate Ubiquity, enter command share-on-delicious. You can also enter your own notes, assign tags to the bookmark with the &amp;quot;tagged&amp;quot; modifier, and alter the bookmark default page title with the &amp;quot;entitled&amp;quot; modifier. Note that you must also already be logged in at delicious.com to use this command. &lt;br /&gt;
&lt;br /&gt;
Another Command: http://gist.github.com/9499 &lt;br /&gt;
&lt;br /&gt;
Emulates the Delicious.com bookmarklet. Highlight some text on the page for notes, activate Ubiquity, enter command delicious. It will pop up a new window where you can select tags other people have used for the URL. &lt;br /&gt;
&lt;br /&gt;
=== View a users delicious tags  ===&lt;br /&gt;
&lt;br /&gt;
Script: http://parentno.de/ubiquity/?command=get-delicious &lt;br /&gt;
&lt;br /&gt;
Shows del.icio.us bookmarks from this user {username} tagged with {tagname} To use, type get-delicious {username} tag {tagname} &lt;br /&gt;
&lt;br /&gt;
=== View the 10 most popular/recent bookmarks in delicious  ===&lt;br /&gt;
&lt;br /&gt;
Script: &lt;br /&gt;
&lt;br /&gt;
*http://yinosanchez.hostei.com/popular-delicious.php &lt;br /&gt;
*http://yinosanchez.hostei.com/recent-delicious.php&lt;br /&gt;
&lt;br /&gt;
Shows the 10 most popular/recent del.icio.us bookmarks. To use, type recent-delicious or popular-delicious. &lt;br /&gt;
&lt;br /&gt;
== Evernote  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/50974 clip to Evernote] Clip the current web page selection to Evernote&lt;br /&gt;
*[http://gist.github.com/313760 search Evernote] Search an Evernote Web account&lt;br /&gt;
&lt;br /&gt;
== Facebook  ==&lt;br /&gt;
&lt;br /&gt;
Lets you update your status and go quickly to a friend&#039;s profile. &lt;br /&gt;
&lt;br /&gt;
[[http://grantrules.com/ubiquity/facebook.html script]] with two commands: &lt;br /&gt;
&lt;br /&gt;
*&#039;facebook-status (your status)&#039; - Updates your status, doesn&#039;t add &amp;quot;is&amp;quot;! &lt;br /&gt;
*&#039;facebook-friend (your friend)&#039; - Locate a friend. You have to type whole words, though (if searching for Amy Jones, you can&#039;t type Amy Jon; it must be one of: amy, jones, amy jones!)&lt;br /&gt;
&lt;br /&gt;
=== Search Facebook with Preview  ===&lt;br /&gt;
&lt;br /&gt;
Updated December 12, 2009: Fixed functionality. &lt;br /&gt;
&lt;br /&gt;
Duplicates the functionality of the Facebook search box in Ubiquity. Start typing the name of a friend, group, or application, and you&#039;ll see matching results right in the preview area. Pressing return will take you to the first matching profile, and control + alt + number will take you directly to any other match. If you&#039;re not logged in or there aren&#039;t any matches, pressing enter will take you to the search results on Facebook. You can even type in parts of a name. Typing &#039;Stan Brown&#039; or even &#039;Brow Stan,&#039; for example, will match Stanley Brown (just as they would in the actual Facebook search). &lt;br /&gt;
&lt;br /&gt;
Note: In order to get a preview that shows matches, you must be logged into Facebook and have either of the following settings: &lt;br /&gt;
&lt;br /&gt;
*Third-party cookies enabled &lt;br /&gt;
*www.facebook.com added to the cookie white list&lt;br /&gt;
&lt;br /&gt;
Works with Ubiquity 0.5.* &lt;br /&gt;
&lt;br /&gt;
Script: http://www.princeton.edu/~aweintra/fbubiq.html &lt;br /&gt;
&lt;br /&gt;
=== Share on Facebook  ===&lt;br /&gt;
&lt;br /&gt;
Shares the the page in the current tab on Facebook. I parsed the bookmarklet provided by Facebook so you get the nice little pop-up window rather than a whole new tab. &lt;br /&gt;
&lt;br /&gt;
Script: http://jallen7usa.com/ubiquity/ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Search Facebook  ===&lt;br /&gt;
&lt;br /&gt;
Look anything up in Facebook, contacts, groups and it even works whether you are logged in or not. &lt;br /&gt;
&lt;br /&gt;
script here http://myfirstscript.blogspot.com/2008/10/ubiquity-is-awesome_06.html &lt;br /&gt;
&lt;br /&gt;
== Ffffound it!  ==&lt;br /&gt;
&lt;br /&gt;
Adds images to the Ffffound! image repository site. You must have a Ffffound! account to be able to use. Simply navigate to [http://www.lantern.co.nz/ubiquity/ffffound.html lantern.co.nz/ubiquity/ffffound.html] to install using firefox. Use the command &amp;quot;ffffound it&amp;quot; on a page which has the image you want to save. &lt;br /&gt;
&lt;br /&gt;
== Friendfeed  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/51007 share-on-friendfeed] Simple bookmarklet command to share the current page on friendfeed.&lt;br /&gt;
&lt;br /&gt;
== Hatena  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/8351 hatebu] &lt;br /&gt;
*[http://gist.github.com/8575 hotentry] &lt;br /&gt;
*[http://gist.github.com/72762 hatenacopy]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== HowJSay&amp;lt;br&amp;gt;  ==&lt;br /&gt;
&lt;br /&gt;
Looks up (On HowJSay.com), how to pronounce a english word correctly.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/220600 gist.github.com/220600] &lt;br /&gt;
&lt;br /&gt;
== Identi.ca  ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Script: [http://bobbo.me.uk/code/ubiquity/] Allows you to post to Identi.ca from Mozilla Ubiquity. To use, install from link, open Ubiquity and type &amp;quot;identi.ca&amp;quot; followed by your status message.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The above script is no longer hosted at this URL, as the site is no longer available. If someone has a cached version of this code, please contact [[mailto:jon@spriggs.org.uk Jon &amp;quot;The Nice Guy&amp;quot; Spriggs]] who will host it on his site. &lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/173013 identi.ca] is an identi.ca clone of the twitter command included by default in Ubiquity.&lt;br /&gt;
&lt;br /&gt;
*[http://geekmatters.com/Ubiquity/Idiquity.html Idiquity]&lt;br /&gt;
&lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/identica/index.cfm dent] is a identi.ca clone of the twitter command included by default in Ubiquity, but with an improved display message to reflect the status sent and the username used so that you can confirm it was correct.&lt;br /&gt;
&lt;br /&gt;
== Mixx  ==&lt;br /&gt;
&lt;br /&gt;
#[http://erikvold.com/tools/ubiquity/mixx/mixx.cfm mixx]: Mixx the typed/pasted url, or highlighted url, or otherwise the current page. Also get the mixx count of the url in the preview.&lt;br /&gt;
&lt;br /&gt;
== myExperiment  ==&lt;br /&gt;
&lt;br /&gt;
Script: [http://www.myexperiment.org/files/151/download/myexperiment_search.js myExperiment basic search command] Basic search plugin for myExperiment, an online comunity for scientists. &lt;br /&gt;
&lt;br /&gt;
== Pawst.com  ==&lt;br /&gt;
&lt;br /&gt;
Search social bookmarking websites using pawst.com&amp;lt;br&amp;gt; Simply type &#039;pawst topic&#039; i.e &#039;pawst funny pics&#039; &lt;br /&gt;
&lt;br /&gt;
by [http://shmuel.ahdut.com Shmuel Ahdut] - licensed as MPL &lt;br /&gt;
&lt;br /&gt;
Subscribe: http://pawst.com (You&#039;ll get Ubiquity&#039;s subscribe popline)&amp;lt;br&amp;gt; Script: http://pawst.com/javascripts/ubiquity.js &lt;br /&gt;
&lt;br /&gt;
== Sphinn  ==&lt;br /&gt;
&lt;br /&gt;
#[http://erikvold.com/tools/ubiquity/sphinn/sphinn.cfm sphinn]: Sphinns the typed url, or highlighted url, or otherwise the current page. Also get the sphinn count of the url in the preview.&lt;br /&gt;
&lt;br /&gt;
== Jaiku  ==&lt;br /&gt;
&lt;br /&gt;
Script: http://ubiquity.pastebin.com/f495c6d62 To add your username and api key use the command: jaiku-setuserandkey &amp;amp;lt;username&amp;amp;gt; api &amp;amp;lt;apikey&amp;amp;gt; -- you can get your api key on http://api.jaiku.com (inspired by http://trodrigues.net/ubiquity/pingfm/) to post: jaiku &amp;amp;lt;you presence&amp;amp;gt; at &amp;amp;lt;location&amp;amp;gt;&amp;amp;nbsp;: The location is optional, if you don&#039;t pass, the script will try to guess it using CmdUtils.getGeoLocation(). &lt;br /&gt;
&lt;br /&gt;
== Idiquity  ==&lt;br /&gt;
&lt;br /&gt;
[http://geekmatters.com/Ubiquity/Idiquity.html Idiquity]allows updating and checking your timeline from Ubiquity. More functionality is to come; details are at the site. It is compatible with any Laconi.ca based site (or any site with a Twitter compatible API). &lt;br /&gt;
&lt;br /&gt;
== News and Feed Readers  ==&lt;br /&gt;
&lt;br /&gt;
[http://i8news.appspot.com/ubiquity/nytimes.html NYTimes recent Headlines]: autosuggest recent headlines when you are typing; and if no matching, just hit enter, you will go to NYTimes.com search page. &lt;br /&gt;
&lt;br /&gt;
[http://www.bennysheerin.com/ubiquity.html Simple news feed]: Returns latest headlines from various vendors such as bbc, cnn and digg. &lt;br /&gt;
&lt;br /&gt;
[http://www.planetaki.com/ubiquity Planetaki Commands]: Add the website you&#039;re visiting to your Planet &lt;br /&gt;
&lt;br /&gt;
[http://cokeeffe.wordpress.com/get-news-for-ubiquity/ get-news]: Enables you to search Google News for news titles. &lt;br /&gt;
&lt;br /&gt;
== Nexopia  ==&lt;br /&gt;
&lt;br /&gt;
=== Go to user profile  ===&lt;br /&gt;
&lt;br /&gt;
Type &amp;quot;nexopia&amp;quot; and the user&#039;s name and it will take you directly to that user&#039;s profile on Nexopia.com. &lt;br /&gt;
&lt;br /&gt;
Script: http://jodyheavener.com/ubiquity/nexopia/ &lt;br /&gt;
&lt;br /&gt;
== People Search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.123people.com 123people]: Let&#039;s you search people meta data from around the world via Ubiquity. &lt;br /&gt;
*[http://avid.me/ubi/pipl.html pipl]: Searches for People&#039;s name on pipl.com &lt;br /&gt;
*[http://avid.me/ubi/chickipedia.html Chickipedia]: Searchs for Chickipedia, the world’s largest web-based, women-based, wiki-based database of hot chicks.&lt;br /&gt;
&lt;br /&gt;
== Serchilo  ==&lt;br /&gt;
&lt;br /&gt;
[http://wiki.serchilo.net/Serchilo:Ubiquity Serchilo in Ubiquity] allows using [http://serchilo.net Serchilo] commands in Ubiquity. &lt;br /&gt;
&lt;br /&gt;
== Slashdot  ==&lt;br /&gt;
&lt;br /&gt;
*[http://blipo.ath.cx/chkslashdot.html Check Slashdot]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Scribd Slurrp  ==&lt;br /&gt;
&lt;br /&gt;
*[http://pastebin.com/f5a196f81 Slurrp a URL to Scribd.com]&lt;br /&gt;
&lt;br /&gt;
== Ping.fm  ==&lt;br /&gt;
&lt;br /&gt;
Allows you to post messages via the ping.fm service. &lt;br /&gt;
&lt;br /&gt;
Script: http://ubiquity.washing-up.co.uk/pingfm.html &lt;br /&gt;
&lt;br /&gt;
The first time it is used, you must provide it with your ping.fm app key by typing &amp;quot;ping-set-key &amp;amp;lt;your app key&amp;amp;gt;&amp;quot; Once it has stored your app key, you do not need to provide it again, and can just type &amp;quot;ping &amp;amp;lt;message&amp;amp;gt;&amp;quot; Your app key can be found at [http://ping.fm/key http://ping.fm/key] &lt;br /&gt;
&lt;br /&gt;
== Tonight.eu  ==&lt;br /&gt;
&lt;br /&gt;
Lets you to search venues, restaurants and events in some big european cities. &lt;br /&gt;
&lt;br /&gt;
Script: http://www.tonight.eu/ubiquity/ &lt;br /&gt;
&lt;br /&gt;
== Bugmenot  ==&lt;br /&gt;
&lt;br /&gt;
A password database site for general public. You can use this command to find passwords for free websites so you don&#039;t have to register to them. &lt;br /&gt;
&lt;br /&gt;
[http://www.yalazi.org/ubiquity/list.html For Ubiquity 0.1.x] &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/146668 For Ubiquity 0.5 (works in new parser)] &lt;br /&gt;
&lt;br /&gt;
== Google Bookmarks  ==&lt;br /&gt;
&lt;br /&gt;
Adds the current page to your Google bookmarks with the title you give it. Still rather rough - not robust against invalid inputs. http://www.cs.washington.edu/homes/butaud/ubiquity.html &lt;br /&gt;
&lt;br /&gt;
Google bookmarks search. It works like the google search owning shortcut and label display. http://gist.github.com/187885 &lt;br /&gt;
&lt;br /&gt;
Alternative: [http://gist.github.com/93965 gbk and gbk-search]: Search and add bookmarks to Google Bookmarks. &lt;br /&gt;
&lt;br /&gt;
== Google Reader (shared items)  ==&lt;br /&gt;
&lt;br /&gt;
Adds the current selection to your Google Reader Shared Items page and allows you to add a note to it. [http://abauchu.net/ubiquity/share-on-reader.html share-on-reader command] &lt;br /&gt;
&lt;br /&gt;
Alternate Command: [http://pynej.blogspot.com/2008/10/ubiquity-command-note-in-reader.html Note in Reader] &lt;br /&gt;
&lt;br /&gt;
=== View Google Reader Items  ===&lt;br /&gt;
&lt;br /&gt;
Gread previews your inbox, starred, or shared: http://gist.github.com/64695 &lt;br /&gt;
&lt;br /&gt;
Previews unread items&#039; title: http://gist.github.com/193921, you should change the &amp;quot;YOURUSERIDGOESHERE&amp;quot; by yourself http://gravo.co.uk/wordpress/2009/04/24/google-reader-unread-feed/. &lt;br /&gt;
&lt;br /&gt;
== Gmail  ==&lt;br /&gt;
&lt;br /&gt;
*[http://fettig.net/playground/ubiquity/ Gmail Status Message] Update your Google Talk status message in Gmail &lt;br /&gt;
*[http://www.jpemartin.com/ubiq/smiley.html Smiley] Insert smileys into your email message (also works with other email or blog) &lt;br /&gt;
*- &#039;&#039;&#039;Broken Link&#039;&#039;&#039; - [http://www.geocities.com/skyhopper88/GmailEdit.html GMail Edit] Edit of an old Ubiquity script to work with latest version (.1.1). Opens Gmail in a new tab, as well as showing you the last couple of new messages in the preivew. &lt;br /&gt;
*[http://www.strangeblackhole.com/sign-it/ Sign It] Now you can sign your message, blog post and other with HTML code. &lt;br /&gt;
*[http://marcbelmont.com/command/gmail Gmail unread messages] shows up to 9 of your most recent unread messages. Press ALT+number to open a message in gmail. [http://marcbelmont.com/command/gmail screenshot]&lt;br /&gt;
&lt;br /&gt;
== Reddit  ==&lt;br /&gt;
&lt;br /&gt;
[http://urdna.org/ubiquity Urdna&#039;s &#039;Reddit-This&#039; command] &lt;br /&gt;
&lt;br /&gt;
== Social Graph (FOAF/XFN etc)  ==&lt;br /&gt;
&lt;br /&gt;
[http://danbri.org/2008/ubisg/ DanBri&#039;s &#039;foaf&#039; command] (calls Google SGAPI) &lt;br /&gt;
&lt;br /&gt;
== Stickam  ==&lt;br /&gt;
&lt;br /&gt;
http://stickhacks.googlepages.com - Watch someone&#039;s live Stickam stream without going to their profile &lt;br /&gt;
&lt;br /&gt;
== mYoUvies.com  ==&lt;br /&gt;
&lt;br /&gt;
[http://myouvies.com/ubiquity/ movieshare]: Allows for simple posting to the social movie news website [http://myouvies.com mYoUvies.com] &lt;br /&gt;
&lt;br /&gt;
== Soup.io  ==&lt;br /&gt;
&lt;br /&gt;
[http://static.al3x.net/ubiquity.html soup] - replicates the functionality of the bookmarklet for the Soup.io tumblelogging service &lt;br /&gt;
&lt;br /&gt;
== shortText  ==&lt;br /&gt;
&lt;br /&gt;
2 commands: &lt;br /&gt;
&lt;br /&gt;
*[http://shortText.com/ shorttext]: Creates a URL for any selected text &lt;br /&gt;
*[http://shortText.com/ longtext]: Select any shortText URL on any site and it will replace the URL with the actual content&lt;br /&gt;
&lt;br /&gt;
== Twitter  ==&lt;br /&gt;
&lt;br /&gt;
*[http://benatkin.com/ubiquity/tweet/ Ben&#039;s tweet command]: post to twitter (with URL shortener) &lt;br /&gt;
*[http://www.tweetviz.com TweetViz: Twitter Visualiser]: Allows display of text in the TweetViz visualiser. &lt;br /&gt;
*[http://gist.github.com/246967 twtuser] opens any user&#039;s timeline and shows that user&#039;s avatar and some useful links in the preview. (0.5+) &lt;br /&gt;
*[http://geekmum.com/ubiquity twittersearch] &lt;br /&gt;
*[http://www.matthias-schuetz.eu/twitter-ubiquity.html twitter]With timeline and auto completion for contacts&#039; names. &lt;br /&gt;
*[http://sites.google.com/site/coosgadgets/2ii 2ii], based on matthias&#039; work. Add current url replacement and shorten, hyperlink in the preview etc. &lt;br /&gt;
*[http://damienh.org/2009/10/04/twtplus-updated-for-ubiquity-0-5/ twtplus] twtplus for Ubiq 0.5+. shortening all urls in a post, reply and dm with friend username autocompletion, and posting as specified user account. Check out [http://damienh.org/2009/03/02/twtplus-the-missing-twitter-command-for-ubiquity-and-firefox/ this post] for more explanation. &lt;br /&gt;
*[http://gist.github.com/20044 otw] I can&#039;t type such a long username. &lt;br /&gt;
*[http://gist.github.com/38698 wtw] Twitter viewer.&lt;br /&gt;
&lt;br /&gt;
== Tumblr  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/48778 ptm] You can post to Tumblr. But please pay attention to L3 and L4 - email and password.&lt;br /&gt;
&lt;br /&gt;
== Diigo  ==&lt;br /&gt;
&lt;br /&gt;
 * [http://gist.github.com/179632 Diigo] Add a page to your Diigo bookmarks&lt;br /&gt;
&lt;br /&gt;
== Github  ==&lt;br /&gt;
&lt;br /&gt;
 * [http://gist.github.com/91353 github-user] Enhances github user page with repository sorting and additional repository&lt;br /&gt;
 stats.&lt;br /&gt;
&lt;br /&gt;
== Wordpress.com blogs  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/92304 gerdk] searches for terms in wordpress.com blogs&lt;br /&gt;
&lt;br /&gt;
== Goosh Command Shell  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/97091 opengoosh] opens the Goosh command shell.&lt;br /&gt;
&lt;br /&gt;
== Socialight Search  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/97094 socialight] allows to perform a search on [http://socialight.com/ socialight].&lt;br /&gt;
&lt;br /&gt;
== Qaiku  ==&lt;br /&gt;
&lt;br /&gt;
*[http://static.qaiku.com/js/ubiquity-command.js qaiku] allows you to [http://bergie.iki.fi/blog/qaiku_and_mozilla_ubiquity/ post Qaiku microblogs]&lt;br /&gt;
&lt;br /&gt;
== meme from Yahoo  ==&lt;br /&gt;
&lt;br /&gt;
*[http://plets.com.br/meme/ meme] allows you to [http://meme.yahoo.com/ post to meme]&lt;br /&gt;
&lt;br /&gt;
== dynastree  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/219356 dynastree] searches for persons on verwandt.de, verwandt.at, verwandt.ch, dynastree.com, dynastree.co.uk, dynastree.ca, familleunie.fr, miparentela.com, verwant.nl and moikrewni.pl and shows a preview map of the name distribution in the country. Each command is localized [ DE EN FR ES NL PL ]&lt;br /&gt;
&lt;br /&gt;
== TasteKid  ==&lt;br /&gt;
&lt;br /&gt;
*[http://lehphyro.appspot.com/taste/ taste] allows you to get music, movies, book and shows suggestions directly from [http://tastekid.com TasteKid.com] website.&lt;br /&gt;
&lt;br /&gt;
= Web 3.0 (Web Of Data, Semantic Web, etc)  =&lt;br /&gt;
&lt;br /&gt;
Commands allowing the access or manipulation Web 3.0 content, that is [http://www.w3.org/RDF/ RDF]-based datasets such as [http://linkeddata.org linked data]. &lt;br /&gt;
&lt;br /&gt;
*[http://srv.buzzword.org.uk/ Cognition] microformat/RDF/RDFa/eRDF/GRDDL parser. &lt;br /&gt;
*#&amp;lt;code&amp;gt;cognify&amp;lt;/code&amp;gt; &lt;br /&gt;
*[http://jowl.ontologyonline.org/Ubiquity.html jOWL Ubiquity command], Visualize and query on OWL-DL files with [http://jowl.ontologyonline.org jOWL] &lt;br /&gt;
*#&amp;lt;code&amp;gt;view_ontology&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Microformats  ==&lt;br /&gt;
&lt;br /&gt;
*Microformats Extraction commands available at http://transformr.co.uk/ &lt;br /&gt;
*#commands: &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-atom&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hatom hAtom] &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-vcard&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hcard hCard] &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-webcal&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hcalendar hCalendar] &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-podcast&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/haudio hAudio] &lt;br /&gt;
*#*&amp;lt;code&amp;gt;get-rdf&amp;lt;/code&amp;gt; from [http://www.w3.org/TR/xhtml-rdfa-primer/ RDFa]&lt;br /&gt;
&lt;br /&gt;
*Search the [http://microformats.org/wiki/ Microformats Wiki] available at http://weborganics.co.uk/ &lt;br /&gt;
*#command: &lt;br /&gt;
*#*&amp;lt;code&amp;gt;uf-search&amp;lt;/code&amp;gt; (search term)&lt;br /&gt;
&lt;br /&gt;
== WoD  ==&lt;br /&gt;
&lt;br /&gt;
[[User:MichaelHausenblas|Michael Hausenblas]] has put together a [http://sw.joanneum.at/ubiq/ collection of WoD commands]. Currently three commands are available: &lt;br /&gt;
&lt;br /&gt;
*query the semantic indexer [http://sindice.com Sindice] for a term &lt;br /&gt;
*lookup [http://dbpedia.org/About DBpedia] resources [http://gist.github.com/59915 lookupNdbpedia] &lt;br /&gt;
*lookup [http://dbpedia.org/About DBpedia] for things in a certain category &lt;br /&gt;
*perform a [http://curl.haxx.se/ curl] HEAD for a URI&lt;br /&gt;
&lt;br /&gt;
Some more commands &lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/103266 lookup RDF namespaces by prefix at prefix.cc] &lt;br /&gt;
*[http://gist.github.com/103269 search for RDF vocabulary terms at schemacache.com ] &lt;br /&gt;
*[http://gist.github.com/103265 send current url to http://morph.talis.com ] and preview data&lt;br /&gt;
&lt;br /&gt;
== Crunchbase  ==&lt;br /&gt;
&lt;br /&gt;
[http://bnode.org/about Benjamin Nowack] has written the [http://cb.semsol.org/ubiquity cb command] allowing to do [http://www.crunchbase.com/ CrunchBase] lookups for companies, products or people. &lt;br /&gt;
&lt;br /&gt;
== Twine  ==&lt;br /&gt;
&lt;br /&gt;
[http://static.isnotworking.com/add-to-twine.html add-to-twine]: Brings up the dialog for posting the current page to [http://twine.com Twine]. &lt;br /&gt;
&lt;br /&gt;
== Linked Data Exploration  ==&lt;br /&gt;
&lt;br /&gt;
[http://demo.openlinksw.com/ubiq OpenLink Web Resource Description Commands] - Commands for obtaining structured descriptions of Web Resources. Uses [http://virtuoso.openlinksw.com/ Openlink Virtuoso]&#039;s in-built RDFization Middleware (&amp;quot;Sponger&amp;quot;) and Linked Data Deployment technology. &lt;br /&gt;
&lt;br /&gt;
== Link lookup and insertion  ==&lt;br /&gt;
&lt;br /&gt;
*[http://demo.monrai.com summon command] - look up a link representing the keywords or phrase you enter, and inserts it into the page. Good for quickly inserting links into emails, blog, blog comments, twitter, etc.&lt;br /&gt;
&lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/this.html &#039;This&#039;] lets you explore the subject of your current page. If you&#039;re on myspace.com/u2, this command lets you flip over to its web identifier, using freebase and zemanta.&lt;br /&gt;
&lt;br /&gt;
== headup  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.headup.com/ubiquity.html headup]: Connect the artist / city / person / company / movie / book / etc - with relevant and personalized information, using the headup Firefox addon - [http://www.headup.com Get headup].&lt;br /&gt;
&lt;br /&gt;
==Freebase==&lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/westport.html Westport] lets you query freebase in natural language - &amp;quot;david bowie&#039;s birthday&amp;quot;, or &amp;quot;female snowboarders&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== RDFa  ==&lt;br /&gt;
&lt;br /&gt;
[http://yergler.net/projects/ubiquity-rdfa-commands/ RDFa commands]: [http://www.w3.org/2006/07/SWD/RDFa/impl/js/ RDFa WG bookmarklets] as Ubiquity commands &lt;br /&gt;
&lt;br /&gt;
= Visualization  =&lt;br /&gt;
&lt;br /&gt;
*[http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/visualization/word-cloud.js word-cloud] generates a &#039;word cloud&#039; from the selected text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Website manipulation=&lt;br /&gt;
&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/doublespace.html Doublespace]: Doublespace the current page. &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/lights.html Turn down the lights]: change the background colour of the page to dark grey &lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/read.html Read]: View a website as nicely formatted plain text&lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/remove.html Remove] -hide an annoying part of a webpage, by clicking on it.&lt;br /&gt;
*[http://www.spencerwaterbed.com/soft/ubiquity/isolate.html Isolate] - hide the annoying parts of a webpage, by clicking the good part.&lt;br /&gt;
&lt;br /&gt;
= Clocks  =&lt;br /&gt;
*[http://spencerwaterbed.com/soft/ubiquity/timezone.html Timezone] - reconciles the input location using freebase, and grabs its current time using geonames.&lt;br /&gt;
*analog clock - http://www.jpemartin.com/ubiq/time.html (also allows you to specify a timezone) &lt;br /&gt;
*minute-minder: show the time on page-load - http://individual.utoronto.ca/duez/cw.html &lt;br /&gt;
*MJD to UTC and UTC to MJD converters: [http://www.storybookdachshunds.com/surlyfritter/ mjd2utc and utc2mjd] &lt;br /&gt;
*show time in&amp;amp;nbsp;: show the current time of the specified place and this command is comppatible with parser 2 [http://gist.github.com/147092 show-time-in]&lt;br /&gt;
&lt;br /&gt;
see also swies&#039;s commands, below &lt;br /&gt;
&lt;br /&gt;
*[http://swapoff.org/files/ubiquity_time/ An international clock (plus flags!)] This looks pretty cool but say, Moscow time is off by one hour! Looks like the problem with EarthTools, maybe use something else? &lt;br /&gt;
*Sleep.fm [http://gist.github.com/114601] - Allows you to set an alarm in sleep.fm. &lt;br /&gt;
*[http://marcbelmont.com/command/calendar Calendar] with country holidays + clock [http://marcbelmont.com/command/calendar screenshot].&lt;br /&gt;
&lt;br /&gt;
= Travel  =&lt;br /&gt;
&lt;br /&gt;
*[http://widgets.bootsnall.com/ubiquity/flight.html flight search] &lt;br /&gt;
*[http://blog.mikelorengo.com/2008/09/ubiquitizing-jenn-for-flight.html fly-alaskaair]. Shops for flights on Alaska Airlines and Horizon Airlines &amp;quot;fly-alaskaair (cmd)&amp;quot; where (cmd) can be free form text. Examples include: &lt;br /&gt;
**fly-alaskaair sea lih 02/11/2009 return 02/25/2009 &lt;br /&gt;
**fly-alaskaair sea lax next thursday return sunday &lt;br /&gt;
**fly-alaskaair sea sjd next wednesday one way &lt;br /&gt;
*[http://widgets.bootsnall.com/ubiquity/hotel.html hotel search] &lt;br /&gt;
*[http://widgets.bootsnall.com/ubiquity/vacation.htmlvacation package search] (flight+hotel together) &lt;br /&gt;
*[http://widgets.bootsnall.com/ubiquity/car.html car rental search]&lt;br /&gt;
&lt;br /&gt;
= Maths  =&lt;br /&gt;
&lt;br /&gt;
*Converts selected amount to foreign currency (currently supports over 60 currencies) http://users.tpg.com.au/tbchris &lt;br /&gt;
*[http://www.verdsveven.com/ubiquity/metric.html metric]: Converts numbers to metric units. Can recognize numbers in the selection and replace them. &lt;br /&gt;
*[http://earth2marsh.com/ubiquity/charts.html chart-tools]: Draws a bar, line, or pie chart with labels, based on selected tabular data. &lt;br /&gt;
*[http://samespirit.net/ricky/dev/ubiquity/chart.html chart]: Draws a line chart using the Google Charts API based on a selected table row. &lt;br /&gt;
*temperature converter - http://www.jpemartin.com/ubiq/temp.html &lt;br /&gt;
*base64 decode / encode - http://taukon.de/ubiquity-base64.php &lt;br /&gt;
*Integrate - http://tat.wright.name/ubiquity/integrate.html &lt;br /&gt;
*gcalc (interface to Google&#039;s calculator; converts units and currencies, knows constants of nature etc.) - http://math-www.uni-paderborn.de/~axel/ubiquity_gcalc.html &lt;br /&gt;
*calculate2 (a good calculator) - http://www.jpemartin.com/ubiq/calc2.html &lt;br /&gt;
*currency (interface to iGoogle currency converter) - http://waleed.doubleudesigns.com/2008/09/currency-conversion-ubiquity/ &lt;br /&gt;
*currency (uses yql to access yahoo finance) - http://erikvold.com/tools/ubiquity/currency/currency.cfm&lt;br /&gt;
&lt;br /&gt;
= Programming / development tools  =&lt;br /&gt;
&lt;br /&gt;
*[http://www.ewitk.com/char-count.html char-count] is a command to count the number of characters in a block of selected text. &lt;br /&gt;
*Counts characters in the selected text (upated for 0.5 syntax): [http://bhagwad.com/blog/2009/07/firefox-ubiquity-character-count-command.html char-count] &lt;br /&gt;
*[http://www.dahius.com/projects/ubiquity/pwgen/ pwgen] is a password generator service (http://pwgen.net) &lt;br /&gt;
*Whatismyip - http://www.srobbin.com/ubiquity-commands/whatismyip/ &lt;br /&gt;
*[http://gist.github.com/10371 comments]: Display html comments on the page as css roll-over popups &lt;br /&gt;
*[http://mitcho.com/code/select select] - select gives you read access to your MySQL databases right from Ubiquity, with smart suggestions of your table and column names. &lt;br /&gt;
*Wraps selected text around the HTML tags of users choice [http://www.bhagwad.com/blog/2009/technology/inserting-html-tags-using-firefox-ubiquity.html HTML Insert] &lt;br /&gt;
*[http://gist.github.com/176391 check parentheses] Does a simple arithmetic check to see if a selected line of code has enough parentheses. Based on discussion [http://andyanglea.com/blog/2009/08/if-problems/ here].&lt;br /&gt;
&lt;br /&gt;
= String Tools  =&lt;br /&gt;
&lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/length/length.cfm string-length]: Displays the length of the provided string.&lt;br /&gt;
&lt;br /&gt;
= Random tools  =&lt;br /&gt;
*[http://gist.github.com/344620] - Toggles Private Browsing in Firefox.&lt;br /&gt;
*[http://lordi.styleliga.org/UnicodeSearch Unicode search verb] - Searches for Unicode characters and inserts them into the page or an input box.&lt;br /&gt;
*[http://jasonwilsondesign.com/development-locker/ubiquity-commands/BBFlickr.php BBFlickr] - Quickly translates Flickr&#039;s generated HTML links to BBCode in your clipboard. &lt;br /&gt;
*[http://www.bennysheerin.com/ubiquity_open.html open] - Allows you to quickly open your favourite web sites. &lt;br /&gt;
*open-in-tab - http://bergius.org/ubiquity/?open-in-tab &lt;br /&gt;
*Twurl shorten URL - http://xolotl.org/ubiquity &lt;br /&gt;
*xkcd (shows latest xkcd comic in preview pane, and allows selecting prior comics by number or going back in history with negative numbers) - http://alexsydell.com/applications/ubiquity/xkcd/ &lt;br /&gt;
*flags of the world - http://www.jpemartin.com/ubiq/flag.html &lt;br /&gt;
*forecast - http://dothejustice.com/forecast/ &lt;br /&gt;
*images (shows only the images on a page) - http://kloudsolutions.com &lt;br /&gt;
*[http://erikvold.com/tools/ubiquity/comicstrip/comicstrip.cfm comicstrip]: Allows you to view a comicstrip and drop the image into an area selected (such as a gmail email). So far the command supports bc, bornloser, dilbert, garfield, getfuzzy, herman, monty, peanuts, penny-arcade, offthemark, opus, userfriendly, workingitout, and xkcd. &lt;br /&gt;
*[http://members.optusnet.com.au/~crazyjane13/lolcats.html lolcats]: Retrieves the latest LOLCAT in the preview, jumps to page on execute - by Brett Dalton &lt;br /&gt;
*[http://members.optusnet.com.au/~crazyjane13/roll.html roll]: Dice rolling verb, rolls single, multiple dice of any size with option for variable dificulty exploding dice pool (as per World of Darkness) - by Brett Dalton &lt;br /&gt;
*[http://gist.github.com/165471 roll]: Simple die rolling similar to the /roll command found in many MMORPG games. &amp;quot;roll x&amp;quot; will roll a x-sided die. &lt;br /&gt;
*[http://student.dei.uc.pt/~rmramos/ubiquity/lorem.html lorem]: Allows you to copy any given number of words or paragraphs of the &amp;quot;Lorem Ipsum&amp;quot; placeholder text onto your Clipboard, useful if you want to paste it in some other application afterward. Use: lorem [num] nice [words||paragraphs] &lt;br /&gt;
*nofollow - Preview counts no-follow links and execute highlights them. [[http://surfmind.com/lab/mozilla/ubiquity/nofollow.html Install Page]], [[http://surfmind.com/lab/mozilla/ubiquity/nofollow.js Script:]], [[http://flickr.com/photos/andyed/2767130077/in/photostream/ Preview]] &lt;br /&gt;
*[http://www.rakudave.ch/?q=node/26 Rhyme] a word &lt;br /&gt;
*[http://common-lisp.net/project/lifp/ubiquity/sharebee.htm sharebee-download] Sharebee &lt;br /&gt;
*[http://insideoutsites.com/ubiquity/ xbl] - displays your xbox live friends list in the preview window &lt;br /&gt;
*[http://www.nt7s.com/blog/ubiquity-qrz/ qrz] - Lookup amateur radio callsigns on the QRZ.com server. &lt;br /&gt;
*[http://www.kornnuts.com/dev/barcode/qrcode.php qrcode] - generate QR codes for the current page url or any desired text. &lt;br /&gt;
*[http://www.briandgoad.com/blog/ubiquity-commands/websourceit/ websource] - Compares the popularity on the internet of two (or more) terms using Websource.It &lt;br /&gt;
*[http://www.developerfriendly.com/ubiquity/roll.php UbiquityRoll] - get your roll on demand, currently supports rickroll duckroll and hoodroll &lt;br /&gt;
*[http://www.nasser.me/ubiquity/rapidsharecom-link-checker/ rscheck] - check selected links on rapidshare.com link checker. &lt;br /&gt;
*[http://f.resourcehog.net/has-swearing.php has-swearing] - check to see if the selected text has any swearing in it; highlights any instances of swearing. &lt;br /&gt;
*[http://www.dib0.nl/ubiquity.html open-all-bookmarks-in-tabs] - opens all bookmarks filed under the given folder in new tabs. It is also possible to open bookmarks with a specific tag. &lt;br /&gt;
*[http://www.geocities.com/ubiquities1 reverse-telephone] - reverse lookup on a german telephone number via das-oertliche.de &lt;br /&gt;
*[http://www.watersheep.org/~markh/screengrab.html screengrab] - takes a screen grab of the current page. &lt;br /&gt;
*[http://stuarthendren.net/printwyl printwyl] - opens current page in [http://www.printwhatyoulike.com PrintWhayYouLike.com] so you can create a better print out of the information you need. &lt;br /&gt;
*[http://yonen.ca/ubiquity2.html qr_code] - Generates QR Code images. &lt;br /&gt;
*[http://gist.github.com/21311 notepad] - Opens Notepad on Windows &lt;br /&gt;
*[http://gist.github.com/21319 paint] - Opens MS Paint on Windows &lt;br /&gt;
*[http://gist.github.com/76857 magnifier] - Opens magnifier on Windows &lt;br /&gt;
*[http://mike.thedt.net/ubiquity/note/note.php note] - The purpose of this command is to quickly save the inputted text (can be selected text or your own text) to a file on your disk without having to launch a text editor. &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/fx-update-scanner.html fx update scanner] - Update checks for restricted user accounts &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/gd-upload.html google docs upload] - Uploads a document to Google Docs via URL &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/vacuum.html vacuum] - Executes the VACUUM statement on SQLite databases &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/get-all-links.html get-all-links] - Creates a (filtered) list of all links from webpages opened in tabs/windows &lt;br /&gt;
*[http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/placestools.html Places Tools] - List visits for URIs or domains or all URLs in the history, search in bookmark descriptions, fast bookmarking, opens links from bookmark folders &lt;br /&gt;
*[http://gist.github.com/62707 d20] - Searches d20srd.org. &lt;br /&gt;
*[http://gist.github.com/267732 Binary Converter] - Detects whether input is text or binary and converts accordingly. &lt;br /&gt;
*[http://kilianvalkhof.com/uploads/ubiquity-binary Binary tools] - Convert text to binary, and the other way around. &lt;br /&gt;
*[http://kilianvalkhof.com/uploads/ubiquity-yoda Yoda speak] - Convert text to how master Yoda would say it. &lt;br /&gt;
*[http://gist.github.com/70761 lyric]: Lookup song lyrics from lyrics.astraweb.com &lt;br /&gt;
*[http://gist.github.com/69722 muni]: Grab San Francisco, CA muni bus arrival information from nextmuni.com. &#039;&#039;example: muni 24 at Divis and Fulton&#039;&#039; &lt;br /&gt;
*[http://gist.github.com/71981 sqliteutils]: Treats firefox&#039;s builtin sqlite. &lt;br /&gt;
*[http://gist.github.com/67522 undo-closed-tabs]: Reopens tabs you&#039;ve closed recently. &lt;br /&gt;
*[http://gist.github.com/54051 newtab]: Open new tab as... &lt;br /&gt;
*[http://gist.github.com/49362 copy]: Copy to clipboard with some format. (like CopyURL+) &lt;br /&gt;
*[http://gist.github.com/59296 uaswitch]: Switch useragent and open current page again. &lt;br /&gt;
*[http://gist.github.com/64812 xbox360card]: Copy the gamer card of an Xbox Live user. &lt;br /&gt;
*[http://www.zentu.net/ubiq/failblog.html fail] image grabber from [http://www.failblog.org failblog.org] &lt;br /&gt;
*[http://www.zentu.net/ubiq/engrishfunny.html engrish] funny image grabber from [http://www.engrishfunny.com engrishfunny.com] &lt;br /&gt;
*[http://www.zentu.net/ubiq/hotdog.html hotdog] image grabber from [http://www.ihasahotdog.com ihasahotdog.com] &lt;br /&gt;
*[http://gist.github.com/134987 track-package]: Tracks packages via Fedex, UPS, USPS, DHL sites. &lt;br /&gt;
*[http://217.209.1.243/~sertion/ubiquity/colours/ colours] is an easy way to compare colors side by side. Uses hex-colors. &lt;br /&gt;
*[http://gist.github.com/144985 places]: Places command for searching history &amp;amp;amp; bookmarks &lt;br /&gt;
*[http://gist.github.com/192995 shotit] publishes the snapshot of the current browser&#039;s page right on the web and gives you back an url to the captured image (based on [http://dailyffs.com/shotme/ ScreenShootMe]). &lt;br /&gt;
*[http://gist.github.com/213124 pick-color]: easily pick and copy color to your clipboard in RGB or HEX format. &lt;br /&gt;
&lt;br /&gt;
== Flip  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.michaeltheweissman.com/flip flip]: Flips text uʍop ǝpısdn &lt;br /&gt;
*[http://myishi.homeip.net:8080/misc/unicode-inversion.php invert]: Generate inverted (ʇɹəʌuı), reversed (ɘƨяɘvɘя), or small-capped text (sᴍᴀʟʟ ᴄᴀᴘs)&lt;br /&gt;
&lt;br /&gt;
== Bookmark-Jump  ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.iamnub.com:81/bookmark-jump.html]: Opens a bookmark by name&lt;br /&gt;
&lt;br /&gt;
= Development Tools  =&lt;br /&gt;
&lt;br /&gt;
== Gecko Development  ==&lt;br /&gt;
&lt;br /&gt;
*[http://sites.google.com/site/cgranade/projects/ubiquity-scripts xpc-interfaces]: Queries a list of interfaces supported by a given XPCOM contract ID.&lt;br /&gt;
&lt;br /&gt;
= Other Web Applications  =&lt;br /&gt;
&lt;br /&gt;
== Woot  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/41227 Woot Checker] - Previews the current Woot item and takes you to the &amp;quot;Want One&amp;quot; page. &lt;br /&gt;
&lt;br /&gt;
== ESV bible  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.duncanandmeg.org/projects/ubiquity-esv-insert.php insert from ESV, search with ESV] - &#039;&#039;&#039;Compatible with Ubiquity 0.5&#039;&#039;&#039; Either insert text into the current selection from a passage in the ESV Bible, or search the ESV for a given passage or phrase. &lt;br /&gt;
&lt;br /&gt;
[http://jplorenti.googlepages.com/ubiquity-wishamazon WishAmazon] - Allows adding any product page on the web to your Amazon Wish List. Similar functionality to the Amazon Universal Wish List bookmarklet. &lt;br /&gt;
&lt;br /&gt;
[http://avid.me/ubi/skreemr.html Skreemr] - Searches Skreemr.com for downloading Mp3&#039;s&lt;br /&gt;
&lt;br /&gt;
== BookMooch  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.sillybean.net/downloads/ubiquity-commands.html mooch] - Search [http://bookmooch.com/ BookMooch] for the term you provide. &lt;br /&gt;
&lt;br /&gt;
== Finances  ==&lt;br /&gt;
&lt;br /&gt;
=== Buxfer  ===&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/66959 buxfer-spend, buxfer-receive] - Adds a transaction to www.buxfer.com using its remote API, spending or receiving a given amount. (Homepage [http://sites.google.com/site/edgargoncalves/work/software/ubiquity here]). &lt;br /&gt;
&lt;br /&gt;
[http://dl.getdropbox.com/u/103378/projects/buxferubiquity/buxferubiquity.html twixfer] - Adds a transaction to www.buxfer.com, using the Twitter API (obsolete - use buxfer-spend and buxfer-receive instead) (Homepage [http://sites.google.com/site/edgargoncalves/work/software/twixfer here]). &lt;br /&gt;
&lt;br /&gt;
== Google Voice  ==&lt;br /&gt;
&lt;br /&gt;
[http://earth2marsh.com/ubiquity/googlevoice call] - Calls any selected 10-digit number (or enter on command line) &lt;br /&gt;
&lt;br /&gt;
== Internet Radio  ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/94775 What is being played on Radio Paradise? (rp)] - Displays the artist and name of the song that Radio Paradise is playing right now.&amp;lt;br&amp;gt; &lt;br /&gt;
*[http://synapsos.kilu.de/ubiquity/radio/command.html Last.FM Radio Starter] - Starts the similar artists radio station for whatever artist you punch in. (works now with 0.5+ ) - original command by Matthew Garrett[http://gist.github.com/129512 .] &lt;br /&gt;
*[http://gist.github.com/219591 Grooveshark] 2.0 search&lt;br /&gt;
&lt;br /&gt;
== GTD  ==&lt;br /&gt;
&lt;br /&gt;
=== gtd-php  ===&lt;br /&gt;
&lt;br /&gt;
[http://www.gtd-php.com/Developers/Ubiquity gtdphp] - &amp;lt;tt&amp;gt;gtdin&amp;lt;/tt&amp;gt; adds an inbox item, and &amp;lt;tt&amp;gt;gtdref&amp;lt;/tt&amp;gt; creates a reference to the current page, as a child of a specific project &lt;br /&gt;
&lt;br /&gt;
=== Remember The Milk  ===&lt;br /&gt;
&lt;br /&gt;
*[http://garyhodgson.com/ubiquity/rtm-api.html rtm-*] - Commands to manage your Remember The Milk task lists. Add, postpone, prioritise, complete, move and view commands are available. &lt;br /&gt;
*[http://garyhodgson.com/ubiquity/rtm.html rtm (bookmarklet)] - Opens the RTM [http://www.rememberthemilk.com/help/answers/quickadd/ quick-add bookmarklet].&lt;br /&gt;
&lt;br /&gt;
=== Gubb  ===&lt;br /&gt;
&lt;br /&gt;
[http://ivancho.awardspace.com/ubiquity/gubb.html gubb-*] - Interface to [http://gubb.net Gubb], with adding items and inserting lists/contents functionality. &lt;br /&gt;
&lt;br /&gt;
=== Nozbe  ===&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/svd/ubiquity-commands nozbe-*] - commands to manage tasks in Nozbe. &lt;br /&gt;
&lt;br /&gt;
=== mite  ===&lt;br /&gt;
&lt;br /&gt;
[http://mite.yo.lk/en/platform/ubiquity.html mite-*] - Track your working hours: add new time entries to your mite.account or start/stop a timer. &lt;br /&gt;
&lt;br /&gt;
== Science  ==&lt;br /&gt;
&lt;br /&gt;
=== NCBI  ===&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/67266] - Very preliminary attempt to access NCBI and other genomic resources - currently only Pubmed &lt;br /&gt;
&lt;br /&gt;
== Wikis  ==&lt;br /&gt;
&lt;br /&gt;
=== TiddlyWiki  ===&lt;br /&gt;
&lt;br /&gt;
[http://garyhodgson.com/ubiquity/tiddlywiki.html tw-*] - Allows you to Create, Open, or Search for keywords within, Tiddlers from your [http://www.tiddlywiki.com/ TiddlyWiki] &lt;br /&gt;
&lt;br /&gt;
== Temporary Email Address  ==&lt;br /&gt;
&lt;br /&gt;
=== Jetable.org  ===&lt;br /&gt;
&lt;br /&gt;
Script: http://gist.github.com/11261 &lt;br /&gt;
&lt;br /&gt;
Creates a temporary Jetable email address for a given life span (one hour, one day, one week, one month). &lt;br /&gt;
&lt;br /&gt;
=== Mailinator.com  ===&lt;br /&gt;
&lt;br /&gt;
mailinator - http://gist.github.com/16415 &lt;br /&gt;
&lt;br /&gt;
Opens the mailinator inbox of the typed name. &lt;br /&gt;
&lt;br /&gt;
=== Spambox.us  ===&lt;br /&gt;
&lt;br /&gt;
http://gist.github.com/41634 &lt;br /&gt;
&lt;br /&gt;
Creates a temporary Spambox.us email address for a given life span (half hour, hour, half day, day, week, month, half year, year). &lt;br /&gt;
&lt;br /&gt;
== TheSixtyOne.com  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.jpemartin.com/ubiq/pause-TSO.html pause-TSO] pause and resume music playback. &lt;br /&gt;
&lt;br /&gt;
== World of Warcraft  ==&lt;br /&gt;
&lt;br /&gt;
*Gryffyn&#039;s Basic Allakhazam Lookup w/Preview: http://www.gryffyndevelopment.com/ubiquity/alla.html &lt;br /&gt;
*Zenwolf&#039;s WoW Armory Command: [http://www.annieandmatt.com/ubiquity/wowarmory.html Subscribe/View code here] &lt;br /&gt;
*Amosh&#039;s Wowhead Database Search [http://gist.github.com/19910]&lt;br /&gt;
&lt;br /&gt;
== instapaper.com bookmarklet  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.duncanandmeg.org/projects/ubiquity-instapaper.php instapaper]: Saves current page to read later on [http://www.instapaper.com/ Instapaper]. If you select some text from the page, it will be stored as the summary. This command will store your instapaper login and password in the browser password manager. Uses the new [http://blog.instapaper.com/post/73123968/read-later-api instapaper API]. &lt;br /&gt;
&lt;br /&gt;
[http://static.al3x.net/ubiquity.html later]: an alternate implementation that mimics the instapaper.com bookmarklet (requires your bookmarklet hash key). Might be a dead link now??? &lt;br /&gt;
&lt;br /&gt;
== laterloop.com Bookmarklet/RSS  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10172 laterloop-this]: Mimics functionality of the [http://www.laterloop.com laterloop] bookmarklet. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10172 laterloop]: Shows items you have saved for later in your preview. Allows for paging and can open a specific item through use of an &amp;quot;open #&amp;quot; modifier. &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10172 laterloop-clear]: Utility command to clear out preference values stored when initially setting up the laterloop and laterloop-this commands. &lt;br /&gt;
&lt;br /&gt;
== Shoutcast Search  ==&lt;br /&gt;
&lt;br /&gt;
http://myfirstscript.blogspot.com/2008/10/ubiquity-is-awesome_06.html Search for anything in Shoutcast, artist, song, genre. use it everytime you wanna hear that one great song!. &lt;br /&gt;
&lt;br /&gt;
== ROT13  ==&lt;br /&gt;
&lt;br /&gt;
[http://www.randomloci.com/dev/ubiquity/rot13.php ROT13]: Translate selected text using the ROT13 algorithm. Background [http://www.randomloci.com/dev/ubiquity/index.php here]. &lt;br /&gt;
&lt;br /&gt;
== KeepVid  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/113841 KeepVid]: Download any YouTube Video straight from Ubiquity via KeepVid! &lt;br /&gt;
&lt;br /&gt;
== OpenStreetMap  ==&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/150292 osm]: Search for a location and find the OpenStreetMap map of the area. &lt;br /&gt;
&lt;br /&gt;
[http://gitorious.org/mozilla-ubiquity-maarons/osm/blobs/raw/master/osm.html]: Search and preview locations on OpenStreetMap.&lt;br /&gt;
&lt;br /&gt;
= Firefox Extension Integrations  =&lt;br /&gt;
&lt;br /&gt;
== Greasemonkey  ==&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/greasemonkey/gm.cfm greasemonkey]: Searches for available Greasemonkey menu commands, and displays them to you in preview, and offers you the ability to execute them with an input string. &lt;br /&gt;
&lt;br /&gt;
= Command collections  =&lt;br /&gt;
&lt;br /&gt;
[http://devstatus.com/ MySpace command collection]: MySpace Command Collection &lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/101767 StumbleUpon Command Set] adds Stumble functionality to Ubiquity. Has three commands: stumble, want (&amp;quot;Thumbs-Up&amp;quot;), and does-not-want (&amp;quot;Thumbs-Down&amp;quot;). &lt;br /&gt;
&lt;br /&gt;
[http://ianj.appspot.com/insert Insert words using a keyword]: insert and learn-to-insert &lt;br /&gt;
&lt;br /&gt;
[http://jorgensen.ian.googlepages.com/size.html Screen Resolution commands]: size and resize &lt;br /&gt;
&lt;br /&gt;
[http://liketribe.com/liketribe/lktrb-ubiquity.html liketribe]: chat with an intelligent assistant bot to get recommendations, directions, weather, connect with friends, or just ramble on aimlessly. &lt;br /&gt;
&lt;br /&gt;
[http://www.tonight.eu/ubiquity/ Tonight]: searches for venues, restaurants and events in your city, near a specific location. &lt;br /&gt;
&lt;br /&gt;
[http://www.bennysheerin.com/ubiquity.html news command]: simple news command. &lt;br /&gt;
&lt;br /&gt;
[http://www.rakudave.ch/?q=node/18 rakudave&#039;s commands]: firefox add-ons, ubuntu brainstorm, just-ping, rhyme &lt;br /&gt;
&lt;br /&gt;
[http://widgets.bootsnall.com/ubiquity/everystockphoto.html Everystockphoto.com]: Search for images at everystockphoto.com &lt;br /&gt;
&lt;br /&gt;
[http://widgets.bootsnall.com/ubiquity/shopping-search.html Shopping.com]: Search for products and compare prices at Shopping.com &lt;br /&gt;
&lt;br /&gt;
[http://mika.lepisto.com/ubiquity-commands-160.html Ubiquity Commands by Mika]: Random commands including Everystockphoto.com and Shopping.com referenced above. &lt;br /&gt;
&lt;br /&gt;
[http://www.ubiqcmds.co.nr issi_noho&#039;s (and others) commands]: torrentz.com and more soon. Submit your command here. &lt;br /&gt;
&lt;br /&gt;
[http://www.thecompgeek.info/ubiquity/ CyberPrime&#039;s Commands]: SearchMe.Com, demonoid, about:commands and much more to come &lt;br /&gt;
&lt;br /&gt;
[http://enobrev.info/ enobrev&#039;s commands]: php and html (with auto-completion) &lt;br /&gt;
&lt;br /&gt;
[http://swieskowski.net/verbs/ swies&#039;s commands]: dog, clock, msdn &lt;br /&gt;
&lt;br /&gt;
[http://foyrek.com/ubi.html Abi&#039;s commands] &lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/index.cfm Erik Vold&#039;s Commands]: backtype, charlierose, coldfusion, comicstrip, dictionary, greasemonkey, inlinks-yahoo, jquery, mixx, mysql, quarkbase, sphinn. &lt;br /&gt;
&lt;br /&gt;
[http://dietrich.ganx4.com/mozilla/ubiquity.html Dietrich&#039;s commands] &lt;br /&gt;
&lt;br /&gt;
[http://www.gilbertpellegrom.co.uk/2008/08/27/my-ubiquity-commands/ Gilbert&#039;s commands]: date, time-12, time-24 &lt;br /&gt;
&lt;br /&gt;
[http://www.bjtitus.net/ubiquity/ Brandon&#039;s Commands]: FriendFeed &lt;br /&gt;
&lt;br /&gt;
[http://www.fuzzhead.com/ubiquity.html Fuzzhead&#039;s Commands]: What&#039;s My IP? &lt;br /&gt;
&lt;br /&gt;
[http://lokonline.com/ip/ubiq.html Improved IP address retrieval] Should work for ipv6 too. &lt;br /&gt;
&lt;br /&gt;
[http://sites.google.com/site/ubiquitycommands/ Whatthechuck&#039;s commands]: validate (W3C markup validator), vimeo &lt;br /&gt;
&lt;br /&gt;
[http://npattison.com/ubiquity/ Nickworks&#039;s commands]: Seeqpod, PHP.net &lt;br /&gt;
&lt;br /&gt;
[http://aufrank.net/ubiquity/ aufrank&#039;s commands]: gfl, urej &lt;br /&gt;
&lt;br /&gt;
[http://mysite.verizon.net/zaduma/ calhoun_ftw&#039;s commands]: Embiggen TinyURL replacer adaption, newegg, pirate bay, many more, releasing new always. &lt;br /&gt;
&lt;br /&gt;
[http://www.mzzt.net/ubiq.html mzzt.net commands]: remove/replace selection, detach tab to new window, open chromeless window &lt;br /&gt;
&lt;br /&gt;
[http://ubiquity.skumleren.net FreakCERS&#039;s commands]: latex &lt;br /&gt;
&lt;br /&gt;
[http://satf.se/projects/ubiquity-commands/ satf commands]: &amp;amp;lt;blink&amp;amp;gt;, jaen, fix-all-problems, last.fm &lt;br /&gt;
&lt;br /&gt;
[http://web.me.com/yaztromo/rot13-ubiq.html Yaz&#039;s Commands]: rot13 &lt;br /&gt;
&lt;br /&gt;
[http://hoffstein.net/ubiquity hoffstein&#039;s commands]: stock-quote, stock-chart &lt;br /&gt;
&lt;br /&gt;
[http://nocturne.net.nz/verbs Bayard&#039;s commands]: WoWhead, WoW Armoury, BBCode &lt;br /&gt;
&lt;br /&gt;
[http://grantrules.com/ubiquity Grant&#039;s commands]: Facebook, Lorem Ipsum generator, MD5/Sha1 hashes, Penis flood, What.cd artist/torrent search, UPS/USPS/FedEx tracking &lt;br /&gt;
&lt;br /&gt;
[http://www.gfx-fr.com/ubiquity/ Setsuna666&#039;s commands]: Amazon Canada &lt;br /&gt;
&lt;br /&gt;
[http://www.yalazi.org/ubiquity/list.html Onur Yalaz?&#039;s commands]: kissalt, bugmenot &lt;br /&gt;
&lt;br /&gt;
[http://labs.vunite.com/vubiqs/verbs.php vunite&#039;s commands]: goto, shorten, craigslist &lt;br /&gt;
&lt;br /&gt;
[http://common-lisp.net/project/lifp/ubiquity/ Timofei Shatrov&#039;s commands]: clhs, myip, urban-dictionary-search, sharebee-download &lt;br /&gt;
&lt;br /&gt;
[http://jimmahdigital.com/ubiq/ Jim&#039;s commands]: add-to-reader &lt;br /&gt;
&lt;br /&gt;
[http://www.phoque.de/projekte/ubiquity/ phoque.de]: Add marked text to your blog &lt;br /&gt;
&lt;br /&gt;
[http://www.srobbin.com/ubiquity-commands/ srobbin.com]: whatismyip &lt;br /&gt;
&lt;br /&gt;
[http://tim.sorbera.googlepages.com/ubiquity.html Mini-Geek&#039;s commands]: homestar-runner-wiki, starcraft-wiki, tniv-bible-passage, tniv-bible-word, webster-dictionary, webster-thesaurus, open-url, ign, and fileshack &lt;br /&gt;
&lt;br /&gt;
[http://www.geero.net Geero&#039;s commands]: Last.fm track search, Bible Gateway ESV URL builder &lt;br /&gt;
&lt;br /&gt;
[http://www.jasonsmith.ca/articles/ubiquity_by_mozilla_labs amazon-search-all]: Search all items on [http://www.amazon.com Amazon.com] &lt;br /&gt;
&lt;br /&gt;
[http://www.mikedeboer.nl Mike&#039;s commands]: mail (uses mailto: urls) &lt;br /&gt;
&lt;br /&gt;
[http://www.bpeers.com/ubiq/ bpeers.com]: ticker (preview or paste a stock quote and its change); bling (currency conversion in google syntax) &lt;br /&gt;
&lt;br /&gt;
[http://static.al3x.net/ubquity.html]: bit.ly, Instapaper, Soup.io, Google Reader subscribe, Twitter Search, Yep, zap CSS &lt;br /&gt;
&lt;br /&gt;
[http://kollektive.com/ubiquity/ kollektive]: links - converts non-marked up text/html which contains urls and email addresses into proper anchor tags. Works within html pages, and in rich text editing fields (eg. rich text editing in GMAIL) &lt;br /&gt;
&lt;br /&gt;
[http://www.cse.cuhk.edu.hk/~gli/ubiquity.html Xatan&#039;s ubiquity commands]: google scholar, xunlei(??), baidu(??), douban(??), verycd, google news, dict.cn(??), mininova, dictionary.hm (detailed english explanation) &lt;br /&gt;
&lt;br /&gt;
[http://www.acarlos.com.br/ubiquity/ TV Globo Video Search]: searches for TV Globo and GloboSat videos (Brazil). &lt;br /&gt;
&lt;br /&gt;
[http://v0xel.ubuntusrbija.org/2008/08/31/mozilla-ubiquity-i-b92-mape-srbije/ sr-map]: Searches for street names and shows them on a map. Works for couple of cities in Serbia. &lt;br /&gt;
&lt;br /&gt;
[http://www.geocities.com/skyhopper88/ Skyhopper88&#039;s Commands] Several Search Commands, edit of Gmail script below for .1.1 &lt;br /&gt;
&lt;br /&gt;
[http://17th.name/wp-content/uploads/2008/09/fanfou.html Alex&#039;s fanfou command]: post to fanfou (??) &lt;br /&gt;
&lt;br /&gt;
[http://unplugd.com/enblogd Samps&#039;s command collection]: eBay-Au, Ubuntu-WiKi, Skweezer, Wapedia, PHP function search &lt;br /&gt;
&lt;br /&gt;
[http://test.fathomthat.org/ubiquity/evav.html Evilavatar]: Search Evilavatar for new posts containing your search term &lt;br /&gt;
&lt;br /&gt;
[http://icecreamfactory.freehostia.com/ubiquity/ I.C.E.C.R.E.A.M COMMANDS]: directions, reverse-lookup, googlism &lt;br /&gt;
&lt;br /&gt;
[http://users.kilu.de Sieglinde&#039;s commands]: babylon,leo,reverse-telephone,open-thesaurus &lt;br /&gt;
&lt;br /&gt;
[http://www.objectforward.com/ubiquity/ objectforward&#039;s commands]: dictionary - simple command to use dictionary.reference.com for word look up. thesaurus - uses thesaurus.reference.com for similar word look up. I just like this better than the default &#039;define&#039; command. Enjoy! &lt;br /&gt;
&lt;br /&gt;
[http://updates.versionone.com/ubiquity/ VersionOne]: A command set for users of the VersionOne agile project management suite. &lt;br /&gt;
&lt;br /&gt;
[http://craxy.bplaced.de/prog/ubiquity/ find commands]: Commands to control the firefox search (ctrl+f) &lt;br /&gt;
&lt;br /&gt;
[http://pentarious.altervista.org/ubiquity/ pentarious&#039;s command collection]: urlize, scholar-search, torrent-search, music-search &lt;br /&gt;
&lt;br /&gt;
[http://econ-server.umd.edu/~kranker/code/Ubiquity_Econ.php Keith&#039;s Ubiquity Feeds for Economists (and others)]: econpapers, econpapers-author, econpapers-title, umdlib, stata, statalist, scholar, lorem ipsum &lt;br /&gt;
&lt;br /&gt;
= Pre 0.1 Style Commands (Now Broken)  =&lt;br /&gt;
&lt;br /&gt;
#Quote text for BB-style forums. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=quotebb Quotebb.js] &lt;br /&gt;
#Quotes HTML entities in your selection. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=quotehtml quotehtml.js] &lt;br /&gt;
#Opens Gmail in a new tab, as well as showing you the last couple of new messages in the preivew. [http://ubiquity-firefox.googlegroups.com/web/ubiquity_gmail.js?gda=gHCQx0IAAAD_mC6ocghADlnwgKtOZarHy0pz4L1zdfNBZQ-WVQEtDWG1qiJ7UbTIup-M2XPURDThhrjtatuGnhW3da2gcLyrMQ4HhOIVlic7wv2V2HiqYg Gmail.js] &lt;br /&gt;
#Let&#039;s you Twitter from anywhere. This command has been moved into Ubiquity core. [http://theunfocused.net/moz/ubiquity/verbs/twitter.js Twitter.js] &lt;br /&gt;
#Another micro-blogging service like Twitter/Pounce/etc., but open source Essentially identical code to Twitter+Ubiquity above, except for renaming of constants and web addresses [http://ubiquity-firefox.googlegroups.com/web/identica%20(2).js?gda=4oc_PEkAAACqaO7Aax4IB5JX_WYSl8iOrBnsuQS45ejhBtvVuEfs-xpD7Q4I70bg7A2QUTeiVCyg9p4rhRQ_Rj874eUFNZ-HhAioEG5q2hncZWbpWmJ7IQ identica(2).js] &lt;br /&gt;
#[http://www.gialloporpora.netsons.org/ubiquity/diggthis.js DiggThis.js] &lt;br /&gt;
#Converts your selection to lower case. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=tolower tolower.js]&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=210004</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=210004"/>
		<updated>2010-03-21T12:45:32Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Documentation of CmdUtils.makeSearchCommand */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne, satyr&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
All selectors used in the following sections are either paths into the JSON data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]].&lt;br /&gt;
&lt;br /&gt;
Each selector can alternatively be a function that receives its context and returns the expected result for each mode.&lt;br /&gt;
* jQuery mode: jQuery object&lt;br /&gt;
* JSON mode: String if [[#container]] is specified. Object/Array otherwise.&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
Specifies the type of remote data to retrieve. (same as &amp;lt;code&amp;gt;[http://api.jquery.com/jQuery.ajax/ jQuery.ajax()]&amp;lt;/code&amp;gt;&#039;s &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; option). If &amp;lt;code&amp;gt;&amp;quot;json&amp;quot;&amp;lt;/code&amp;gt; is passed, the parser switches to JSON mode.&lt;br /&gt;
&lt;br /&gt;
==== url / postData ====&lt;br /&gt;
Alternative URL and/or POST Data used in case the preview uses a different service or API than the execute function. i.e.: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the jQuery parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the jQuery parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the jQuery parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the jQuery parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== body ====&lt;br /&gt;
Selector for the content of the result.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the URL of the result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the thumbnail image of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseUrl ====&lt;br /&gt;
String used as base URL if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
==== plain ====&lt;br /&gt;
Array of strings naming selector properties (&amp;lt;code&amp;gt;&amp;quot;title&amp;quot;, &amp;quot;body&amp;quot;, &amp;quot;href&amp;quot;, &amp;quot;thumbnail&amp;quot;&amp;lt;/code&amp;gt;) that should be treated as plain text.&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
Function to which the command logs the reponse data and parsed results.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essential ===&lt;br /&gt;
&amp;lt;pre&amp;gt;CmdUtils.makeSearchCommand({url:&amp;quot;http://google.com/search?q=%s&amp;quot;})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding preview ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.youtube.com/results?search_query={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
    title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
    body: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img.vimg120&amp;quot;,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parsing XML / Using functions in the parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  url: &amp;quot;http://wunderground.com/cgi-bin/findweather/getForecast?query=%s&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;xml&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://api.wunderground.com/auto/wui/geo/ForecastXML?query=%s&amp;quot;,&lt;br /&gt;
    container: &amp;quot;simpleforecast &amp;gt; forecastday&amp;quot;,&lt;br /&gt;
    title: &amp;quot;pretty&amp;quot;,&lt;br /&gt;
    body: function() $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;).append(&lt;br /&gt;
      $(&amp;quot;conditions&amp;quot;, this), &amp;quot;&amp;lt;br/&amp;gt;&amp;quot;,&lt;br /&gt;
      $(&amp;quot;&amp;lt;b&amp;gt;&amp;quot;, {&lt;br /&gt;
        text: $(&amp;quot;low &amp;gt; celsius&amp;quot;, this).text() + &amp;quot;\u2103&amp;quot;,&lt;br /&gt;
        style: &amp;quot;color:#66f&amp;quot;,&lt;br /&gt;
      }),&lt;br /&gt;
      &amp;quot; \uFF5E &amp;quot;,&lt;br /&gt;
      $(&amp;quot;&amp;lt;b&amp;gt;&amp;quot;, {&lt;br /&gt;
        text: $(&amp;quot;high &amp;gt; celsius&amp;quot;, this).text() + &amp;quot;\u2103&amp;quot;,&lt;br /&gt;
        style: &amp;quot;color:#f66&amp;quot;,&lt;br /&gt;
      })),&lt;br /&gt;
    thumbnail: function() $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;, {&lt;br /&gt;
      src: &amp;quot;http://icons-pe.wxug.com/i/c/a/&amp;quot; + $(&amp;quot;icon&amp;quot;, this).text() + &amp;quot;.gif&amp;quot;,&lt;br /&gt;
    }),&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
  url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
  charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
    title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
    maxResults: 20,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=210003</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=210003"/>
		<updated>2010-03-21T12:35:31Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Using functions in the parser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne, satyr&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
All selectors used in the following sections are either paths into the JSON data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]].&lt;br /&gt;
&lt;br /&gt;
Each selector can alternatively be a function that receives its context and returns the expected result for each mode.&lt;br /&gt;
* jQuery mode: jQuery object&lt;br /&gt;
* JSON mode: String if [[#container]] is specified. Object/Array otherwise.&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
Specifies the type of remote data to retrieve. (same as &amp;lt;code&amp;gt;[http://api.jquery.com/jQuery.ajax/ jQuery.ajax()]&amp;lt;/code&amp;gt;&#039;s &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; option). If &amp;lt;code&amp;gt;&amp;quot;json&amp;quot;&amp;lt;/code&amp;gt; is passed, the parser switches to JSON mode.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function. i.e.: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the jQuery parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the jQuery parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the jQuery parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the jQuery parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== body ====&lt;br /&gt;
Selector for the content of the result.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the URL of the result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the thumbnail image of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseUrl ====&lt;br /&gt;
String used as base URL if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essential ===&lt;br /&gt;
&amp;lt;pre&amp;gt;CmdUtils.makeSearchCommand({url:&amp;quot;http://google.com/search?q=%s&amp;quot;})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding preview ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.youtube.com/results?search_query={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
    title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
    body: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img.vimg120&amp;quot;,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parsing XML / Using functions in the parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  url: &amp;quot;http://wunderground.com/cgi-bin/findweather/getForecast?query=%s&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;xml&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://api.wunderground.com/auto/wui/geo/ForecastXML?query=%s&amp;quot;,&lt;br /&gt;
    container: &amp;quot;simpleforecast &amp;gt; forecastday&amp;quot;,&lt;br /&gt;
    title: &amp;quot;pretty&amp;quot;,&lt;br /&gt;
    body: function() $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;).append(&lt;br /&gt;
      $(&amp;quot;conditions&amp;quot;, this), &amp;quot;&amp;lt;br/&amp;gt;&amp;quot;,&lt;br /&gt;
      $(&amp;quot;&amp;lt;b&amp;gt;&amp;quot;, {&lt;br /&gt;
        text: $(&amp;quot;low &amp;gt; celsius&amp;quot;, this).text() + &amp;quot;\u2103&amp;quot;,&lt;br /&gt;
        style: &amp;quot;color:#66f&amp;quot;,&lt;br /&gt;
      }),&lt;br /&gt;
      &amp;quot; \uFF5E &amp;quot;,&lt;br /&gt;
      $(&amp;quot;&amp;lt;b&amp;gt;&amp;quot;, {&lt;br /&gt;
        text: $(&amp;quot;high &amp;gt; celsius&amp;quot;, this).text() + &amp;quot;\u2103&amp;quot;,&lt;br /&gt;
        style: &amp;quot;color:#f66&amp;quot;,&lt;br /&gt;
      })),&lt;br /&gt;
    thumbnail: function() $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;, {&lt;br /&gt;
      src: &amp;quot;http://icons-pe.wxug.com/i/c/a/&amp;quot; + $(&amp;quot;icon&amp;quot;, this).text() + &amp;quot;.gif&amp;quot;,&lt;br /&gt;
    }),&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
  url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
  charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
    title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
    maxResults: 20,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209997</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209997"/>
		<updated>2010-03-21T03:54:24Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Adding bodies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne, satyr&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
All selectors used in the following sections are either paths into the JSON data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]].&lt;br /&gt;
&lt;br /&gt;
Each selector can alternatively be a function that receives its context and returns the expected result for each mode.&lt;br /&gt;
* jQuery mode: jQuery object&lt;br /&gt;
* JSON mode: String if [[#container]] is specified. Object/Array otherwise.&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
Specifies the type of remote data to retrieve. (same as &amp;lt;code&amp;gt;[http://api.jquery.com/jQuery.ajax/ jQuery.ajax()]&amp;lt;/code&amp;gt;&#039;s &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; option). If &amp;lt;code&amp;gt;&amp;quot;json&amp;quot;&amp;lt;/code&amp;gt; is passed, the parser switches to JSON mode.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function. i.e.: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the jQuery parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the jQuery parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the jQuery parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the jQuery parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== body ====&lt;br /&gt;
Selector for the content of the result.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the URL of the result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the thumbnail image of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseUrl ====&lt;br /&gt;
String used as base URL if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essential ===&lt;br /&gt;
&amp;lt;pre&amp;gt;CmdUtils.makeSearchCommand({url:&amp;quot;http://google.com/search?q=%s&amp;quot;})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding preview ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.youtube.com/results?search_query={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
    title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
    body: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img.vimg120&amp;quot;,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  url: &amp;quot;http://wunderground.com/cgi-bin/findweather/getForecast?query=%s&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;xml&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://api.wunderground.com/auto/wui/geo/ForecastXML?query=%s&amp;quot;,&lt;br /&gt;
    container: &amp;quot;simpleforecast &amp;gt; forecastday&amp;quot;,&lt;br /&gt;
    title: &amp;quot;pretty&amp;quot;,&lt;br /&gt;
    body: &amp;quot;conditions&amp;quot;,&lt;br /&gt;
    thumbnail: function() $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;, {&lt;br /&gt;
      src: (&amp;quot;http://icons-pe.wxug.com/i/c/a/&amp;quot; +&lt;br /&gt;
            this.find(&amp;quot;icon&amp;quot;).text() + &amp;quot;.gif&amp;quot;),&lt;br /&gt;
    }),&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
  url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
  charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
    title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
    maxResults: 20,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209995</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209995"/>
		<updated>2010-03-21T02:00:23Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Using functions in the parser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne, satyr&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
All selectors used in the following sections are either paths into the JSON data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]].&lt;br /&gt;
&lt;br /&gt;
Each selector can alternatively be a function that receives its context and returns the expected result for each mode.&lt;br /&gt;
* jQuery mode: jQuery object&lt;br /&gt;
* JSON mode: String if [[#container]] is specified. Object/Array otherwise.&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
Specifies the type of remote data to retrieve. (same as &amp;lt;code&amp;gt;[http://api.jquery.com/jQuery.ajax/ jQuery.ajax()]&amp;lt;/code&amp;gt;&#039;s &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; option). If &amp;lt;code&amp;gt;&amp;quot;json&amp;quot;&amp;lt;/code&amp;gt; is passed, the parser switches to JSON mode.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function. i.e.: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the jQuery parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the jQuery parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the jQuery parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the jQuery parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== body ====&lt;br /&gt;
Selector for the content of the result.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the URL of the result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the thumbnail image of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseUrl ====&lt;br /&gt;
String used as base URL if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essential ===&lt;br /&gt;
&amp;lt;pre&amp;gt;CmdUtils.makeSearchCommand({url:&amp;quot;http://google.com/search?q=%s&amp;quot;})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding bodies ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.youtube.com/results?search_query={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
    title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
    body: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img.vimg120&amp;quot;,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  url: &amp;quot;http://wunderground.com/cgi-bin/findweather/getForecast?query=%s&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;xml&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://api.wunderground.com/auto/wui/geo/ForecastXML?query=%s&amp;quot;,&lt;br /&gt;
    container: &amp;quot;simpleforecast &amp;gt; forecastday&amp;quot;,&lt;br /&gt;
    title: &amp;quot;pretty&amp;quot;,&lt;br /&gt;
    body: &amp;quot;conditions&amp;quot;,&lt;br /&gt;
    thumbnail: function() $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;, {&lt;br /&gt;
      src: (&amp;quot;http://icons-pe.wxug.com/i/c/a/&amp;quot; +&lt;br /&gt;
            this.find(&amp;quot;icon&amp;quot;).text() + &amp;quot;.gif&amp;quot;),&lt;br /&gt;
    }),&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
  url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
  charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
    title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
    maxResults: 20,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209759</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209759"/>
		<updated>2010-03-19T03:21:19Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne, satyr&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
All selectors used in the following sections are either paths into the JSON data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]].&lt;br /&gt;
&lt;br /&gt;
Each selector can alternatively be a function that receives its context and returns the expected result for each mode.&lt;br /&gt;
* jQuery mode: jQuery object&lt;br /&gt;
* JSON mode: String if [[#container]] is specified. Object/Array otherwise.&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
Specifies the type of remote data to retrieve. (same as &amp;lt;code&amp;gt;[http://api.jquery.com/jQuery.ajax/ jQuery.ajax()]&amp;lt;/code&amp;gt;&#039;s &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; option). If &amp;lt;code&amp;gt;&amp;quot;json&amp;quot;&amp;lt;/code&amp;gt; is passed, the parser switches to JSON mode.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function. i.e.: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the jQuery parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the jQuery parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the jQuery parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the jQuery parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== body ====&lt;br /&gt;
Selector for the content of the result.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the URL of the result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the thumbnail image of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseUrl ====&lt;br /&gt;
String used as base URL if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essential ===&lt;br /&gt;
&amp;lt;pre&amp;gt;CmdUtils.makeSearchCommand({url:&amp;quot;http://google.com/search?q=%s&amp;quot;})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding bodies ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.youtube.com/results?search_query={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
    title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
    body: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img.vimg120&amp;quot;,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// ToDo: Not a good example any more&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
    title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
    href: function () $(&amp;quot;a.nyhedsbrev&amp;quot;, this),&lt;br /&gt;
    body: function () $(&amp;quot;table table tr:not(:first)&amp;quot;, this),&lt;br /&gt;
    thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
    maxResults: 3,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
  url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
  charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
    title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
    maxResults: 20,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209758</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209758"/>
		<updated>2010-03-19T03:18:43Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* parser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne, satyr&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
All selectors used in the following sections are either paths into the JSON data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]].&lt;br /&gt;
&lt;br /&gt;
Each selector can alternatively be a function that receives its context and returns the expected result for each mode.&lt;br /&gt;
* jQuery mode: jQuery object&lt;br /&gt;
* JSON mode: String if [[#container]] is specified. Object/Array otherwise.&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
Specifies the type of remote data to retrieve. (same as &amp;lt;code&amp;gt;jQuery.ajax()&amp;lt;/code&amp;gt;&#039;s &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; option). If &amp;lt;code&amp;gt;&amp;quot;json&amp;quot;&amp;lt;/code&amp;gt; is passed, the parser switches to JSON mode.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function. i.e.: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the jQuery parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the jQuery parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the jQuery parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the jQuery parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== body ====&lt;br /&gt;
Selector for the content of the result.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the URL of the result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the thumbnail image of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseUrl ====&lt;br /&gt;
String used as base URL if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essential ===&lt;br /&gt;
&amp;lt;pre&amp;gt;CmdUtils.makeSearchCommand({url:&amp;quot;http://google.com/search?q=%s&amp;quot;})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding bodies ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.youtube.com/results?search_query={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
    title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
    body: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img.vimg120&amp;quot;,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// ToDo: Not a good example any more&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
    title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
    href: function () $(&amp;quot;a.nyhedsbrev&amp;quot;, this),&lt;br /&gt;
    body: function () $(&amp;quot;table table tr:not(:first)&amp;quot;, this),&lt;br /&gt;
    thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
    maxResults: 3,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
  url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
  charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
    title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
    maxResults: 20,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209757</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209757"/>
		<updated>2010-03-19T03:16:58Z</updated>

		<summary type="html">&lt;p&gt;Satyr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne, satyr&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
All selectors used in the following sections are either paths into the JSON data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]].&lt;br /&gt;
&lt;br /&gt;
Each selector can alternatively be a function that receives its context and returns the expected result for each mode.&lt;br /&gt;
* jQuery mode: jQuery object&lt;br /&gt;
* JSON mode: string if [#contianer] is specified, object/array otherwise.&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
Specifies the type of remote data to retrieve. (same as &amp;lt;code&amp;gt;jQuery.ajax()&amp;lt;/code&amp;gt;&#039;s &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; option). If &amp;lt;code&amp;gt;&amp;quot;json&amp;quot;&amp;lt;/code&amp;gt; is passed, the parser switches to JSON mode.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function. i.e.: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the jQuery parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the jQuery parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the jQuery parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the jQuery parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== body ====&lt;br /&gt;
Selector for the content of the result.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the URL of the result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the thumbnail image of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseUrl ====&lt;br /&gt;
String used as base URL if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essential ===&lt;br /&gt;
&amp;lt;pre&amp;gt;CmdUtils.makeSearchCommand({url:&amp;quot;http://google.com/search?q=%s&amp;quot;})&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding bodies ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.youtube.com/results?search_query={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
    title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
    body: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img.vimg120&amp;quot;,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// ToDo: Not a good example any more&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
    title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
    href: function () $(&amp;quot;a.nyhedsbrev&amp;quot;, this),&lt;br /&gt;
    body: function () $(&amp;quot;table table tr:not(:first)&amp;quot;, this),&lt;br /&gt;
    thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
    maxResults: 3,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
  url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
  charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
    title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
    thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
    maxResults: 20,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209755</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209755"/>
		<updated>2010-03-19T02:41:43Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Using functions in the parser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; all selectors used in the following sections are either paths into the json data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]]&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
mSC supports two types of parsers, namely &amp;quot;json&amp;quot; and &amp;quot;html&amp;quot;. If not specified, it assumes you want the html parser.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function, ie: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the html parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the html parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the html parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser. Unless [[#href]] is specified, this needs to match either an anchor, or a parent of an anchor, in which case the first such will be used.&lt;br /&gt;
&lt;br /&gt;
==== preview ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the preview of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseurl ====&lt;br /&gt;
String used as base url if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essentials ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Adding a preview ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.youtube.com/results?search_type=&amp;amp;search_query={QUERY}&amp;amp;aq=f&amp;quot;,&lt;br /&gt;
   parser: {container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
            title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
            thumbnail: &amp;quot;img.vimg120&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// ToDo: Not a good example any more&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
    title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
    href: function () $(&amp;quot;a.nyhedsbrev&amp;quot;, this),&lt;br /&gt;
    body: function () $(&amp;quot;table table tr:not(:first)&amp;quot;, this),&lt;br /&gt;
    thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
    maxResults: 3,&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
   url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
   charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
     title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
     thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
     maxResults: 20,&lt;br /&gt;
   },&lt;br /&gt;
 });&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209737</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209737"/>
		<updated>2010-03-19T01:28:29Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Using the JSON parser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; all selectors used in the following sections are either paths into the json data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]]&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
mSC supports two types of parsers, namely &amp;quot;json&amp;quot; and &amp;quot;html&amp;quot;. If not specified, it assumes you want the html parser.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function, ie: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the html parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the html parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the html parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser. Unless [[#href]] is specified, this needs to match either an anchor, or a parent of an anchor, in which case the first such will be used.&lt;br /&gt;
&lt;br /&gt;
==== preview ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the preview of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseurl ====&lt;br /&gt;
String used as base url if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essentials ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Adding a preview ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.youtube.com/results?search_type=&amp;amp;search_query={QUERY}&amp;amp;aq=f&amp;quot;,&lt;br /&gt;
   parser: {container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
            title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
            thumbnail: &amp;quot;img.vimg120&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSearchCommand({&lt;br /&gt;
  name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
  url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
  parser: {&lt;br /&gt;
    type: &amp;quot;json&amp;quot;,&lt;br /&gt;
    url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
    container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
    title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
    body: &amp;quot;content&amp;quot;,&lt;br /&gt;
    href: &amp;quot;url&amp;quot;,&lt;br /&gt;
    html: [&amp;quot;body&amp;quot;],&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
     title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
     href: function(c) {return jQuery(&amp;quot;a.nyhedsbrev&amp;quot;,c).attr(&amp;quot;href&amp;quot;);},&lt;br /&gt;
     preview: function(c) {var p = &amp;quot;&amp;quot;; jQuery(&amp;quot;table table tr:not(:first)&amp;quot;,c).each(function(){p += jQuery(this).text()+&amp;quot;&amp;lt;br&amp;gt;&amp;quot;;});return p;},&lt;br /&gt;
     thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
     maxResults: 3&lt;br /&gt;
   }&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
   url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
   charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
     title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
     thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
     maxResults: 20,&lt;br /&gt;
   },&lt;br /&gt;
 });&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209424</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=209424"/>
		<updated>2010-03-18T01:15:24Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* postData */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string or an object. i.e.:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;q={QUERY}&amp;amp;amp;hl=en&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;{q: &amp;quot;{QUERY}&amp;quot;, hl: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; all selectors used in the following sections are either paths into the json data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]]&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
mSC supports two types of parsers, namely &amp;quot;json&amp;quot; and &amp;quot;html&amp;quot;. If not specified, it assumes you want the html parser.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function, ie: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the html parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the html parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the html parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser. Unless [[#href]] is specified, this needs to match either an anchor, or a parent of an anchor, in which case the first such will be used.&lt;br /&gt;
&lt;br /&gt;
==== preview ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the preview of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseurl ====&lt;br /&gt;
String used as base url if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essentials ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Adding a preview ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.youtube.com/results?search_type=&amp;amp;search_query={QUERY}&amp;amp;aq=f&amp;quot;,&lt;br /&gt;
   parser: {container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
            title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
            thumbnail: &amp;quot;img.vimg120&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
   parser: {type: &amp;quot;JSON&amp;quot;,&lt;br /&gt;
            url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
            container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
            title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;content&amp;quot;,&lt;br /&gt;
            href: &amp;quot;url&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
     title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
     href: function(c) {return jQuery(&amp;quot;a.nyhedsbrev&amp;quot;,c).attr(&amp;quot;href&amp;quot;);},&lt;br /&gt;
     preview: function(c) {var p = &amp;quot;&amp;quot;; jQuery(&amp;quot;table table tr:not(:first)&amp;quot;,c).each(function(){p += jQuery(this).text()+&amp;quot;&amp;lt;br&amp;gt;&amp;quot;;});return p;},&lt;br /&gt;
     thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
     maxResults: 3&lt;br /&gt;
   }&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
   url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
   charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
     title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
     thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
     maxResults: 20,&lt;br /&gt;
   },&lt;br /&gt;
 });&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Skins_In_The_Wild&amp;diff=209299</id>
		<title>Labs/Ubiquity/Skins In The Wild</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Skins_In_The_Wild&amp;diff=209299"/>
		<updated>2010-03-17T19:48:07Z</updated>

		<summary type="html">&lt;p&gt;Satyr: eLasty/SimpliPuity&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A simple list of installable Ubiquity skins.&lt;br /&gt;
==0.5.5==&lt;br /&gt;
* [http://gist.github.com/228271 eLasty] by satyr&lt;br /&gt;
** optimized for 1280x800 screen + &amp;lt;code&amp;gt;extensions.ubiquity.openAt&amp;lt;/code&amp;gt;=0,0&lt;br /&gt;
* [http://gist.github.com/67270 SimpliPuity] by powchin&lt;br /&gt;
&lt;br /&gt;
==0.5==&lt;br /&gt;
* [http://gist.github.com/80593 elasty] by satyr ([http://img.f.hatena.ne.jp/images/fotolife/m/murky-satyr/20090319/20090319091335_original.png shot1] [http://img.f.hatena.ne.jp/images/fotolife/m/murky-satyr/20090319/20090319091336_original.png shot2])&lt;br /&gt;
** optimized for content size of about 960x720&lt;br /&gt;
&lt;br /&gt;
==0.1==&lt;br /&gt;
* [http://www.yatriksolanki.com/?p=24 Enso-like Skin by Yatrik Solanki]&lt;br /&gt;
* [http://www.yatriksolanki.com/?page_id=10 Simpliquity by Yatrik Solanki]&lt;br /&gt;
* [http://www.greenhousecreations.com/josh/ubiquity/ Kiwi by Joshua R. Johnson]&lt;br /&gt;
* [http://gist.github.com/43589 Enso 2.0 by Harry Wincup]&lt;br /&gt;
* [http://gist.github.com/110509 über by indie] [http://www.zentu.net/snaps/uberskin.png screenshot]&lt;br /&gt;
* [http://gist.github.com/113229 botslife by indie] [http://zentu.net/snaps/botlife.png screenshot] with [http://blog.cocoia.com/2009/ubiquibot-goodie/ ubiquibot graphic by cocoia]&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208284</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208284"/>
		<updated>2010-03-15T08:19:31Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Download It */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [http://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on [about:ubiquity?settings].&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208283</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208283"/>
		<updated>2010-03-15T08:18:56Z</updated>

		<summary type="html">&lt;p&gt;Satyr: doc links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on [about:ubiquity?settings].&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#chrome/content/ubiquity.js Ubiquity] ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils] ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/nountypes.js Nouns] ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== [http://jquery.com/ jQuery] ===&lt;br /&gt;
[http://jquery14.com/ 1.4.2]&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208217</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208217"/>
		<updated>2010-03-14T20:36:23Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Nouns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on [about:ubiquity?settings].&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports [https://www.google.com/reader/view/ Google Reader] (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208216</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208216"/>
		<updated>2010-03-14T20:34:12Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Bugs Fixed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on [about:ubiquity?settings].&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* {extensions.ubiquity.inputLimit} is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208215</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208215"/>
		<updated>2010-03-14T20:33:28Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Parser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on [about:ubiquity?settings].&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208214</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208214"/>
		<updated>2010-03-14T20:31:58Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on [about:ubiquity?settings].&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** {extensions.ubiquity.translate.lang.default} : default language code to translate into&lt;br /&gt;
** {extensions.ubiquity.translate.lang.alt} : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved by [http://twitter.com/mitcho mitcho].&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer require restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208213</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208213"/>
		<updated>2010-03-14T20:30:02Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on [about:ubiquity?settings].&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** extensions.ubiquity.translate.lang.default : default language code to translate into&lt;br /&gt;
** extensions.ubiquity.translate.lang.alt : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved.&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer require restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208212</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208212"/>
		<updated>2010-03-14T20:29:31Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages got nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to [http://twitter.com/ChristianSonne cers].&lt;br /&gt;
* Setting {extensions.ubiquity.openAt} to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on [about:ubiquity?settings settings].&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** extensions.ubiquity.translate.lang.default : default language code to translate into&lt;br /&gt;
** extensions.ubiquity.translate.lang.alt : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved.&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer require restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208211</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208211"/>
		<updated>2010-03-14T20:24:57Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Skin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages have now nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to cers.&lt;br /&gt;
* Setting extensions.ubiquity.openAt to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** extensions.ubiquity.translate.lang.default : default language code to translate into&lt;br /&gt;
** extensions.ubiquity.translate.lang.alt : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved.&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer require restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208210</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208210"/>
		<updated>2010-03-14T20:23:47Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages have now nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to cers.&lt;br /&gt;
* Setting extensions.ubiquity.openAt to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** extensions.ubiquity.translate.lang.default : default language code to translate into&lt;br /&gt;
** extensions.ubiquity.translate.lang.alt : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved.&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer require restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to {browser.tabs.loadInBackground} and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208209</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208209"/>
		<updated>2010-03-14T20:21:47Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Default Feed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages have now nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to cers.&lt;br /&gt;
* Setting extensions.ubiquity.openAt to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** extensions.ubiquity.translate.lang.default : default language code to translate into&lt;br /&gt;
** extensions.ubiquity.translate.lang.alt : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved.&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer require restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; works outside of &amp;lt;code&amp;gt;cmd.execute()/cmd.preview()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Functions prefixed with &amp;lt;code&amp;gt;teardown_&amp;lt;/code&amp;gt; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying &amp;lt;code&amp;gt;author(s)/contributor(s)/license/homepage&amp;lt;/code&amp;gt; to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to browser.tabs.loadInBackground and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208208</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=208208"/>
		<updated>2010-03-14T20:18:33Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* new */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages have now nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to cers.&lt;br /&gt;
* Setting extensions.ubiquity.openAt to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** extensions.ubiquity.translate.lang.default : default language code to translate into&lt;br /&gt;
** extensions.ubiquity.translate.lang.alt : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved.&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer require restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* _() works outside of cmd.execute()/cmd.preview().&lt;br /&gt;
* Similar to the &amp;quot;startup_&amp;quot;, functions prefixed with &amp;quot;teardown_&amp;quot; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying author(s)/contributor(s)/license/homepage to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab currentTabs tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows hiddenWindow&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() uniq() seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html clipboard.get() clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() notify() listenOnce() defineLazyProperty() reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* prefs.* gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to browser.tabs.loadInBackground and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=205184</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=205184"/>
		<updated>2010-03-01T13:15:50Z</updated>

		<summary type="html">&lt;p&gt;Satyr: minor fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 introduces new features and APIs as well as fixes bugs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds use persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages have now nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to cers.&lt;br /&gt;
* Setting extensions.ubiquity.openAt to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** extensions.ubiquity.translate.lang.default : default language code to translate into&lt;br /&gt;
** extensions.ubiquity.translate.lang.alt : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved.&lt;br /&gt;
* &amp;quot;open&amp;quot; acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch and German are supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer require restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 handles partial modifiers ([http://ubiquity.mozilla.com/trac/ticket/889 #889]) and verbs on end.&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* _() works outside of cmd.execute()/cmd.preview().&lt;br /&gt;
* Similar to the &amp;quot;startup_&amp;quot;, functions prefixed with &amp;quot;teardown_&amp;quot; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying author(s)/contributor(s)/license/homepage to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab / currentTabs / tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows / hiddenWindow &amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() / uniq() / seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html / clipboard.get() / clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() / notify() / listenOnce() / defineLazyProperty() / reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* / prefs.* / gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; conforms to browser.tabs.loadInBackground and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; can focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs Fixed ==&lt;br /&gt;
* XML errors on Command List are catched and reported.&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Noisy dumps are removed. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=205170</id>
		<title>Labs/Ubiquity/Ubiquity 0.5.5 Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5.5_Release_Notes&amp;diff=205170"/>
		<updated>2010-03-01T09:45:26Z</updated>

		<summary type="html">&lt;p&gt;Satyr: init&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Main Features =&lt;br /&gt;
Ubiquity 0.5.5 fixes bugs and introduces new features and APIs.&lt;br /&gt;
&lt;br /&gt;
= Download [https://bitbucket.org/satyr/ubiquity/downloads/tip.xpi It] =&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
= In Depth =&lt;br /&gt;
&lt;br /&gt;
== New Features ==&lt;br /&gt;
* Supports up to Firefox 3.7a2pre (but no longer supports 3.0.*).&lt;br /&gt;
* More keys are allowed for the key combo to invoke Ubiquity.&lt;br /&gt;
* The help view informs feed updates. ([http://ubiquity.mozilla.com/trac/ticket/835 #835])&lt;br /&gt;
* Toolbar button is added.&lt;br /&gt;
* Bundled feeds now uses persistent URLs (resource: instead of file:), making profiles portable. ([http://ubiquity.mozilla.com/trac/ticket/882 #882])&lt;br /&gt;
* About pages have now nicer URLs. (chrome://ubiquity/content/cmdlist.xhtml → about:ubiquity?cmdlist)&lt;br /&gt;
* Command Editor is now Bespin thanks to cers.&lt;br /&gt;
* Setting extensions.ubiquity.openAt to &amp;quot;X,Y&amp;quot; makes Ubiquity open at that screen coordinates. ([http://getsatisfaction.com/mozilla/topics/open_ubiquity_window_at_outside_of_browser_window])&lt;br /&gt;
* Clicking the highlighted suggestion executes it.&lt;br /&gt;
* Suggestions are mouse-scrollable.&lt;br /&gt;
* Non-left click on a popup menu entry opens its preview instead of executing it.&lt;br /&gt;
* Repeating the last command is now possible (essentially the same as Ctrl+Space → Enter, but far faster). Set a key combo for it on about:ubiquity?settings.&lt;br /&gt;
* Command histories are keyboard accessible.&lt;br /&gt;
** Ctrl+↑↓ (or mouse scroll over command entry)&lt;br /&gt;
** Ctrl+(Shift)+Tab completes current input from history.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
=== new ===&lt;br /&gt;
* Built-in&lt;br /&gt;
** &amp;quot;change skin&amp;quot;&lt;br /&gt;
* Firefox&lt;br /&gt;
** &amp;quot;view extension&amp;quot; / &amp;quot;stop&amp;quot; / &amp;quot;print preview&amp;quot; / &amp;quot;open error console&amp;quot;&lt;br /&gt;
* Developer&lt;br /&gt;
** &amp;quot;jQuery API&amp;quot;&lt;br /&gt;
=== changes ===&lt;br /&gt;
* &amp;quot;check calendar&amp;quot; [http://getsatisfaction.com/mozilla/topics/dates_not_showing_with_check_calendar_command shows dates] correctly.&lt;br /&gt;
* &amp;quot;translate&amp;quot; warns for API limit and fallbacks to page translation ([http://ubiquity.mozilla.com/trac/ticket/854 #854]), retains the original HTML, displays the detectedSourceLanguage, and supports default/alternate language settings ([http://ubiquity.mozilla.com/trac/ticket/884 #884]).&lt;br /&gt;
** extensions.ubiquity.translate.lang.default : default language code to translate into&lt;br /&gt;
** extensions.ubiquity.translate.lang.alt : alternate language code to tranlate into if the source language equals default language&lt;br /&gt;
* &amp;quot;weather&amp;quot; is improved.&lt;br /&gt;
* &amp;quot;open&amp;quot; now acts also like awesomebar.&lt;br /&gt;
* &amp;quot;email&amp;quot; works again by not using the broken [http://code.google.com/p/gmail-greasemonkey/wiki/GmailGreasemonkey10API gmonkey API].&lt;br /&gt;
* Many search commands got better previews.&lt;br /&gt;
* Text editing commands work outside of rich-edits.&lt;br /&gt;
&lt;br /&gt;
== Skin ==&lt;br /&gt;
Because of the security fix, the default preview URL is changed. Use:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(resource://ubiquity/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&amp;lt;pre&amp;gt;@-moz-document url(chrome://ubiquity/content/preview.html) {&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parser ==&lt;br /&gt;
* Dutch/German is supported.&lt;br /&gt;
* Changing the parser and/or parser language no longer requires restart. ([http://ubiquity.mozilla.com/trac/ticket/760 #760])&lt;br /&gt;
* Parser 1 now handles partial modifiers. ([http://ubiquity.mozilla.com/trac/ticket/889 #889])&lt;br /&gt;
&lt;br /&gt;
== New APIs ==&lt;br /&gt;
&lt;br /&gt;
=== Default Feed ===&lt;br /&gt;
* _() works outside of cmd.execute()/cmd.preview().&lt;br /&gt;
* Similar to the &amp;quot;startup_&amp;quot;, functions prefixed with &amp;quot;teardown_&amp;quot; are executed on refreshing/purging the feed.&lt;br /&gt;
* Specifying author(s)/contributor(s)/license/homepage to feed itself is now possible. Simply assign those properties to the &amp;lt;code&amp;gt;feed&amp;lt;/code&amp;gt; object as you do with command objects.&lt;br /&gt;
&lt;br /&gt;
=== Ubiquity ===&lt;br /&gt;
&amp;lt;code&amp;gt;execute() / preview()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;currentTab / currentTabs / tabs.from() BrowserTab()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;chromeWindows / hiddenWindow &amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;sortBy() / uniq() / seq()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;clipboard.html / clipboard.get() / clipboard.set()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp() / notify() / listenOnce() / defineLazyProperty() / reportError()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;regexp.* / prefs.* / gist.*&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* &amp;lt;code&amp;gt;openUrlInBrowser()&amp;lt;/code&amp;gt; now conforms to browser.tabs.loadInBackground and returns the created tab or window.&lt;br /&gt;
* &amp;lt;code&amp;gt;focusUrlInBrowser()&amp;lt;/code&amp;gt; now focus across windows.&lt;br /&gt;
* &amp;lt;code&amp;gt;trim()/encodeJson()/decodeJson()/json&amp;lt;/code&amp;gt; are deprecated.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils ===&lt;br /&gt;
==== new ====&lt;br /&gt;
* &amp;lt;code&amp;gt;CreateAlias() / getCommand() / executeCommand() / previewCommand()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mixNouns()&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;getSelectedNodes()&amp;lt;/code&amp;gt;&lt;br /&gt;
==== changes ====&lt;br /&gt;
* Some methods prefixed with get/set can be accessed as getters/setters. (&amp;lt;code&amp;gt;CmdUtils.getWindow() → CmdUtils.window&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;makeSearchComand()&amp;lt;/code&amp;gt; has &amp;quot;charset&amp;quot; option.&lt;br /&gt;
* &amp;lt;code&amp;gt;onPageLoad()&amp;lt;/code&amp;gt; supports GreaseMonkey style page filters.&lt;br /&gt;
&lt;br /&gt;
=== Nouns ===&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; supports Google Reader (https only).&lt;br /&gt;
&lt;br /&gt;
=== jQuery ===&lt;br /&gt;
1.4.2&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
* PNG file sizes are reduced. ([http://ubiquity.mozilla.com/trac/ticket/888 #888])&lt;br /&gt;
* XHTML feeds now auto-refresh correctly. ([http://ubiquity.mozilla.com/trac/ticket/611 #611])&lt;br /&gt;
* Removed noisy dumps. ([http://ubiquity.mozilla.com/trac/ticket/897 #897])&lt;br /&gt;
* Preview no longer has chrome privilege. ([http://ubiquity.mozilla.com/trac/ticket/714 #714])&lt;br /&gt;
* extensions.ubiquity.inputLimit is added. ([http://ubiquity.mozilla.com/trac/ticket/507 #507])&lt;br /&gt;
* &amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is fixed. (was broken beyond belief)&lt;br /&gt;
* The bug in &amp;lt;code&amp;gt;noun_type_percentage&amp;lt;/code&amp;gt; is fixed, which should fix [http://getsatisfaction.com/mozilla/topics/ubiquity_zoom_comand_bug &amp;quot;zoom&amp;quot;].&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=183337</id>
		<title>Labs/Ubiquity/Ubiquity 0.5 Author Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=183337"/>
		<updated>2009-11-16T17:17:23Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* Persistent Storage */ for -&amp;gt; for each&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]].&lt;br /&gt;
&lt;br /&gt;
Author: Aza Raskin, Blair McBride, Abimanyu Raja, Jono DiCarlo, Atul Varma&lt;br /&gt;
&lt;br /&gt;
= The Ubiquity version 0.5 Command Tutorial =&lt;br /&gt;
&lt;br /&gt;
The great power of Ubiquity&amp;amp;mdash;from a developer standpoint&amp;amp;mdash;is how easy it is to create commands. With only a couple of lines of Javascript, Ubiquity enables even casual web developers to drastically enhance the features of the browser. From an 8-line command to insert a contact&#039;s email address in any text field, to a 50-line Twitter integration, this tutorial walks you through the process of being generative with Ubiquity.&lt;br /&gt;
&lt;br /&gt;
The rest of this page documents the command developer API as it stands frozen in version 0.5.&lt;br /&gt;
&lt;br /&gt;
If you want the bleeding-edge command developer API (which includes any new features that may have been added to the Ubiquity source code in HG but not yet included in a release), then that&#039;s [[Labs/Ubiquity/Ubiquity_Source_Tip_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
If you want the old command developer API, as it stood in Ubiquity 0.1 (not recommended), that&#039;s [[Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
== Real Time Development ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity doesn&#039;t require you to restart Firefox as you develop. Restarting is a drastic measure, and we want none of it. Instead, Ubiquity reloads the commands every time it is summoned. When you are using the built-in editor then you don&#039;t even need to save!&lt;br /&gt;
&lt;br /&gt;
To open the Ubiquity command editor, summon Ubiquity (control/alt + space) and use the &amp;quot;open command editor&amp;quot; command. Throughout this tutorial, when we want you to run a command in Ubiquity, we&#039;ll say &#039;&#039;&#039;Ubiq&#039;&#039;&#039; it. For instance, to open the editor, just Ubiq &amp;quot;open command editor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the following examples, just type in this editor. Updates happen the next time you summon Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Choices, Choices... ==&lt;br /&gt;
&lt;br /&gt;
You may notice a drop-down menu mentioning something about a &amp;quot;feed type&amp;quot; just above the editing field in the command editor:&lt;br /&gt;
&lt;br /&gt;
http://www.toolness.com/images/20090318121423.jpg&lt;br /&gt;
&lt;br /&gt;
For now, just make sure this drop-down is set to &amp;quot;Regular&amp;quot;.  We&#039;ll tell you more about what this means later.&lt;br /&gt;
&lt;br /&gt;
== Hello World: The First Command ==&lt;br /&gt;
&lt;br /&gt;
=== Just a Message: As Simple as it Gets ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start with the standard programing trope: printing &amp;quot;Hello, World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the command editor type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try Ubiq-ing &amp;quot;say hello&amp;quot;. You&#039;ll see that &amp;quot;Hello, World!&amp;quot; is immediately displayed on the screen. If you are on Mac OSX with [http://en.wikipedia.org/wiki/Growl_(software) Growl] installed the message will appear as a Growl notification. If you are on Windows, then it will appears as a standard &amp;quot;toaster&amp;quot; notification in the bottom right-hand corner of the screen.&lt;br /&gt;
&lt;br /&gt;
http://farm3.static.flickr.com/2479/3651542339_022e4aa4c4.jpg&lt;br /&gt;
&lt;br /&gt;
http://img517.imageshack.us/img517/7726/picture2vx2.png&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 8.04 (Hardy Heron) this appears thus:&lt;br /&gt;
&lt;br /&gt;
http://img293.imageshack.us/img293/7746/ubiqubuntuhelloworldeq9.png&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have Growl installed on OSX, or aren&#039;t on a Windows XP/Vista or Ubuntu Hardy, then you won&#039;t get any sort of notification. That&#039;s something to be [http://labs.toolness.com/trac/ticket/19 worked on] in future releases of Ubiquity.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils.CreateCommand ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; is a namespace which contains all the functions you need to create commands.  Commands are created by making an object and passing it to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.  In Javascript, inline curly braces mean &amp;quot;new object&amp;quot;, so this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function () { //etc }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
means &amp;quot;Make an object with two attributes, &#039;names&#039; and &#039;execute&#039;.&amp;quot;  This object is then passed as the argument to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== names ===&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; and &#039;execute&#039; are the only two mandatory attributes for your command object.  &#039;names&#039; specifies what the command is called, and &#039;execute&#039; specifies what it does.  There are plenty of other attributes that you can specify, but they are all optional.&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; is always an array (thus the square brackets).  In the case of this command we provided only one name, &amp;quot;hello world&amp;quot;.  But we could have provided as many names as we wanted.  For instance, if we had said:&lt;br /&gt;
&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
then &amp;quot;say hello&amp;quot; would be the normal name of the command, but Ubiquity would also recognize &amp;quot;greet&amp;quot; as a synonym or alias for the command.&lt;br /&gt;
&lt;br /&gt;
=== execute ===&lt;br /&gt;
&lt;br /&gt;
&#039;execute&#039; is always a function.  When the user executes your command, this is the function that will be run.  It can do pretty much anything you want -- or at least, anything you know how to write in JavaScript.&lt;br /&gt;
&lt;br /&gt;
In the example above, we simply call &amp;lt;code&amp;gt;displayMessage()&amp;lt;/code&amp;gt;, which displays the given message in whichever way the operating system can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a number of other useful functions in the &amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; namespace. We don&#039;t yet have full documentation for these commands, but you&#039;ll get a sense of the useful ones in this tutorial. For more detailed information, take a look at [http://hg.toolness.com/ubiquity-firefox/file/9a6c9935da9f/ubiquity/chrome/content/cmdutils.js cmdutils.js].&lt;br /&gt;
&lt;br /&gt;
=== Making sure your command is localizable ===&lt;br /&gt;
&lt;br /&gt;
Ubiquity now supports multiple languages.  That means that hopefully someday someone will be translating your commands to the other languages that Ubiquity supports.  Making your command localizable is easy, and a good habit to get into!  You just have to locate all strings that appear in your &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; methods, that are intended for display to humans, and wrap them with:&lt;br /&gt;
&lt;br /&gt;
 _()&lt;br /&gt;
&lt;br /&gt;
This may look odd, but what it does is quite important: it makes your strings appear in the template files that localizers will be using.  So let&#039;s make our &amp;quot;Hello world!&amp;quot; command localizable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes it so that when a localization template is generated from your command feed, &amp;quot;Hello, World!&amp;quot; will be listed among the strings to be translated.&lt;br /&gt;
&lt;br /&gt;
Note that we don&#039;t need to wrap the names, or other strings that appear in the command metadata -- these are automatically wrapped for us.  We only need to wrap strings that appear inside the functions.&lt;br /&gt;
&lt;br /&gt;
=== Adding a Preview ===&lt;br /&gt;
&lt;br /&gt;
http://img352.imageshack.us/img352/1002/picture3ex0.png&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a preview to our new command. Previews give the user feedback about what a command does before it&#039;s executed. Previews are great for providing rich visual feedback like displaying a graphical representation of atmospheric conditions when using the weather command as shown above. Previews have the full expressive power of HTML, including animations, so there&#039;s a lot you can do with them.&lt;br /&gt;
&lt;br /&gt;
One point of design: Preview code should never have side-effects. That is, a preview should never (without user interaction) change the state of the system.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;say hello&amp;quot; command, we don&#039;t need anything fancy: just some help text that is more descriptive than the default &amp;quot;Executes the say hello command.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  preview: &amp;quot;Displays a &amp;lt;i&amp;gt;salutary&amp;lt;/i&amp;gt; greeting to the planet.&amp;quot;,&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the preview is an HTML-formatted string. The preview can also be a function. We&#039;ll get to that in the next section.&lt;br /&gt;
&lt;br /&gt;
== The Date Command: The Second Command ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the Selection ===&lt;br /&gt;
&lt;br /&gt;
I often forget what day it is. That may be because I need to go outside more often, but, like any programmer, I generally solve my problem&#039;s symptoms with technology rather then addressing the root cause. My solution is to create a command that inserts the date at the location of the cursor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(new Date().toLocaleDateString());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new function here is &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt;. This inserts the passed-in text onto the page at the location of the cursor. If the cursor is in an editable text or rich-text fields, the text gets dumped there. If the cursor isn&#039;t in an editable area, &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt; will still be able to insert the date. (Even when it isn&#039;t displayed, Firefox always keeps track of a cursor position. To see it, type F7.) Try going to a page, selecting some non-mutable text, and using the command. See, it works! This is particularly useful for commands like &amp;quot;translate&amp;quot;, where you want to replace non-editable text with its translation.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;toLocaleDateString()&amp;lt;/code&amp;gt; function is native to Javascript, so if you&#039;re not familiar with it check out the documentation for the Javascript [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date Date object].&lt;br /&gt;
&lt;br /&gt;
=== A Better Preview ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s time to add a better preview to the date command. Let&#039;s have the preview show the date, so that the user will know what to expect when they execute the command. (As a side benefit the user doesn&#039;t even need to execute the command to do a quick check of the day.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _date: function date__date() {&lt;br /&gt;
    return new Date().toLocaleDateString();&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = _(&#039;Inserts today\&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;);&lt;br /&gt;
    pblock.innerHTML = CmdUtils.renderTemplate(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(this._date());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve done three things here. The first was to factor out the code for getting the date into the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt; function. This way we don&#039;t break [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY] by repeating code across the preview and execute functions. Notice that to access the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt;, we use the &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
The second thing we&#039;ve done is to add a preview function. The first argument is the DOM element that gets displayed as the preview for your command. Modify &amp;lt;code&amp;gt;pblock&amp;lt;/code&amp;gt; and you modify the preview. In this case, we set the &amp;lt;code&amp;gt;innerHTML&amp;lt;/code&amp;gt; of the preview block to be the message we want.&lt;br /&gt;
&lt;br /&gt;
The third thing we&#039;ve done is to do some string formatting using the &amp;lt;code&amp;gt;renderTemplate()&amp;lt;/code&amp;gt; function. This takes a template string and performs the appropriate substitution given the passed-in JSON object. Templates can handle a wide range of functionality, as we are currently using TrimPath&#039;s [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavascriptTemplates]. You should read their site for more documentation. Although JavascriptTemplates has some nice properties, we are contemplating moving to [http://mjtemplate.org/ MJT] sometime soon.&lt;br /&gt;
&lt;br /&gt;
=== A shortcut for localization and rendering templates ===&lt;br /&gt;
&lt;br /&gt;
Note how in the code above, we used the localization wrapper &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; before passing the string to renderTemplate.  Because this is such a very common combination when displaying strings, we have a shortcut for it.  Calling _() with a JSON object as the second argument will automatically trigger &amp;lt;code&amp;gt;CmdUtils.renderTemplate()&amp;lt;/code&amp;gt; on the post-localization string.  So the above preview method could be rewritten more simply as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = &#039;Inserts today&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Networking calls and placeholder previews ===&lt;br /&gt;
&lt;br /&gt;
Previews display something meaningful to the user immediately. If you have a preview that requires an AJAX request&amp;amp;mdash;say, to fetch some search results&amp;amp;mdash;that call might take a while to return. In the meantime, your command should display a placeholder preview giving the user feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function(pblock) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;This will show until the AJAX request returns&amp;quot;);&lt;br /&gt;
    CmdUtils.previewGet(pblock, &amp;quot;http://example.com&amp;quot;, function (htm) {&lt;br /&gt;
      pblock.innerHTML = htm;&lt;br /&gt;
    });&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documentation and Metadata ==&lt;br /&gt;
&lt;br /&gt;
Before you share your command with the world, you should consider adding some attributions to the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you should &amp;lt;em&amp;gt;definitely&amp;lt;/em&amp;gt; add some documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Inserts today&#039;s date.&amp;quot;,&lt;br /&gt;
  help: &amp;quot;If you&#039;re in an editable text area, inserts today&#039;s date, formatted for the current locale.&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.description&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.help&amp;lt;/code&amp;gt; attributes are both automatically displayed alongside your command&#039;s name on the command-list page.  (The user can get to this page at any time by issuing the &amp;quot;list ubiquity commands&amp;quot; command.)  HTML tags can be used in both of these strings.&lt;br /&gt;
&lt;br /&gt;
Description is a one-line summary of what the command does, while Help is a longer description that can include examples, caveats, and so on. If your command is simple enough that all you have to say about it fits in one line, it&#039;s OK to use a description alone and leave out the help.&lt;br /&gt;
&lt;br /&gt;
== Sharing it with the World ==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve got our awesome new &amp;quot;date&amp;quot; command, let&#039;s share it with the world. All you have to do is put the javascript file on the web somewhere, and make an html page linking to it with &amp;quot;link rel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;&amp;lt;link rel=&amp;quot;commands&amp;quot; href=&amp;quot;http://path-to-js&amp;quot; name=&amp;quot;Title Goes Here&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anyone with Ubiquity who visits will get a message offering them the choice of subscribing to your command.&lt;br /&gt;
&lt;br /&gt;
[[Image:Subscribe.png]]&lt;br /&gt;
&lt;br /&gt;
If the user chooses to subscribe to a Regular command feed from an untrusted source, they will get a security warning message before they can install the command.  Because Regular Ubiquity command feeds can execute arbitrary javascript with chrome privileges, subscribing to a command from a website means allowing that site full access to do whatever it wants to your browser.  We want to make sure people understand the dangers before subscribing to commands, so we made the warning page pretty scary.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Feed Types ===&lt;br /&gt;
&lt;br /&gt;
Recall that back near the beginning of the tutorial, you set the &amp;quot;feed type&amp;quot; to &amp;quot;Regular&amp;quot;.  As you may have guessed, there&#039;s actually more than one way to write a command feed.  The advantage of Regular feeds is that they let you do whatever you want, so it&#039;s really easy to innovate, but the disadvantages lie in subscribing to misbehaving or malicious code.  You can alternatively write what&#039;s called a &#039;&#039;Locked-Down Feed&#039;&#039;, which is much safer and doesn&#039;t raise a warning page when a user subscribes to it&amp;amp;mdash;but the consequences are that you have less freedom of implementation as a command author.  If you&#039;re interested in learning more about Locked-Down Feeds, check out the [[Labs/Ubiquity/Locked-Down_Feed_Tutorial|Locked-Down Feed Tutorial]].&lt;br /&gt;
&lt;br /&gt;
=== Trust Networks ===&lt;br /&gt;
&lt;br /&gt;
In the future, we&#039;re going to have something set up that we call a &amp;quot;[[Labs/Ubiquity/TrustNetwork|trust network]]&amp;quot;.  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you&#039;ll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they&#039;ll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.&lt;br /&gt;
&lt;br /&gt;
By the way, the reason we call it &amp;quot;subscribing&amp;quot; to a command, rather than &amp;quot;installing&amp;quot; a command, is that if the javascript file changes -- if the site owner adds new commands, removes old commands, or updates existing commands -- all users subscribed to that URL will automatically get the updates.  This will be very convenient for both users and developers, but it will also introduce another type of security risk: just because you decided a command was safe at one point in time doesn&#039;t mean that the command will always remain safe.  For this reason, we&#039;ll need to make sure that the trust network keeps track of when commands have been modified, and notifies users of changes that may make a command unsafe.&lt;br /&gt;
&lt;br /&gt;
== Map Me! Location, Snapshots, and Inserting HTML ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;map&amp;quot; command that comes with Ubiquity is fairly powerful. It&#039;s also fairly complicated&amp;amp;mdash;well, comparatively. It&#039;s still only a couple hundred lines of code. The command, though, can get even more useful. Imagine being able to select some houses on Craigslist, or a list of restaurant names, and Ubiq &amp;quot;map these&amp;quot; to get just the map you want. The concept of &amp;quot;these&amp;quot; puts the power of mashups into the users hands. But I digress. Let&#039;s make a simple command that inserts a map of your current location.&lt;br /&gt;
&lt;br /&gt;
In this command, we use the Google [http://code.google.com/apis/maps/documentation/staticmaps/ static map API] and the Ubiquity function &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; to insert a map of your current location. Ubiquity currently uses the [http://www.maxmind.com/app/api MaxMind] API for trying to guess your location from your IP. That will probably change in the future.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll call this command &amp;lt;code&amp;gt;&amp;quot;map me&amp;quot;&amp;lt;/code&amp;gt; so that it won&#039;t be confused with the standard &amp;lt;code&amp;gt;&amp;quot;map&amp;quot;&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;map me&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _getMapUrl: function() {&lt;br /&gt;
    var loc = CmdUtils.getGeoLocation();&lt;br /&gt;
    var mapUrl = &amp;quot;http://maps.google.com/staticmap?&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var params = {&lt;br /&gt;
      center: loc.lat + &amp;quot;,&amp;quot; + loc.long,&lt;br /&gt;
      size: &amp;quot;500x400&amp;quot;,&lt;br /&gt;
      zoom: 14,&lt;br /&gt;
      key: &amp;quot;ABQIAAAAGZ11mh1LzgQ8-8LRW3wEShQeSuJunOpTb3RsLsk00-MAdzxmXhQoiCd940lo0KlfQM5PeNYEPLW-3w&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    return mapUrl + jQuery.param( params );&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function( pblock ) {&lt;br /&gt;
    var msg = &amp;quot;Inserts a map of your current location: &amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
              &amp;quot;&amp;lt;img src=&#039;${url}&#039;/&amp;gt;&amp;quot;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {url: this._getMapUrl()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function( ) {&lt;br /&gt;
    CmdUtils.getImageSnapshot( this._getMapUrl(), function(imgData) {&lt;br /&gt;
      CmdUtils.setSelection( &amp;quot;&amp;lt;img src=&#039;&amp;quot; + imgData +&amp;quot;&#039;/&amp;gt;&amp;quot;);&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three new things here: &amp;lt;code&amp;gt;CmdUtils.setSelection&amp;lt;/code&amp;gt; to set HTML (yep, it can do that); the use of &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt;; and using &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt; to capture the bits for the image.&lt;br /&gt;
&lt;br /&gt;
I find getting the location&amp;amp;mdash;as imprecise as IP-based location can be&amp;amp;mdash;useful for doing sensible defaults for location-based commands, like Yelp. &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; returns an object which has the following properties: city, state, country, lat, and long.&lt;br /&gt;
&lt;br /&gt;
Why do we need to use &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt;? Because the Google Maps API requires a key that is tied to a particular URL. If we naively inject the image tag into a random web page, the image won&#039;t load because the key doesn&#039;t match that random web page&#039;s URL. Thus, we use the &amp;lt;code&amp;gt;snapshotImage()&amp;lt;/code&amp;gt; function to convert the image into a [http://en.wikipedia.org/wiki/Data:_URI_scheme data url].&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a &amp;lt;code&amp;gt;CmdUtils.snapshotWindow&amp;lt;/code&amp;gt; function, which allows you to get the image data for any tab/window. The function takes a window as the first paramater, and a callback for the second.&lt;br /&gt;
&lt;br /&gt;
= Commands with Arguments =&lt;br /&gt;
&lt;br /&gt;
== Echo ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ll be working towards making some fun and useful commands&amp;amp;mdash;commands that let you control the seething tendrils of the internet with your little pinky. But, let&#039;s start by making a simple command to echo back whatever you type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;echo&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;your shout&amp;quot;}],&lt;br /&gt;
  preview: function( pblock, arguments ) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Will echo: &amp;quot;) + arguments.object.text;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var msg = arguments.object.text + &amp;quot;... &amp;quot; + arguments.object.text + &amp;quot;......&amp;quot;;&lt;br /&gt;
    displayMessage( msg );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says that the command &amp;quot;echo&amp;quot; takes one argument which is arbitrary text. Whatever text the user enters will get wrapped in an input object and passed into both the preview and execute function.&lt;br /&gt;
&lt;br /&gt;
Try it!  Ubiq &amp;quot;echo hellooooo&amp;quot; and watch what happens.&lt;br /&gt;
&lt;br /&gt;
Ubiquity takes care of parsing the user&#039;s input, so you don&#039;t need to worry about handling prounoun substitution or any of the other natural-language-like features of the Ubiquity parser. Try selecting some text on a page, and Ubiq &amp;quot;echo this&amp;quot;. Ubiquity should now echo the selected text.  &lt;br /&gt;
&lt;br /&gt;
Note that we gave three pieces of information when defining our argument:  its role, its nountype, and its label.  The label is the easiest part: It&#039;s just whatever text you want to have appear in the Ubiquity interface as a prompt for the user.  E.g, if you ubiq &amp;quot;echo&amp;quot;, you will see the label for the argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  echo (your shout)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The roles and the nountypes require some more explanation.  We&#039;ll cover each of them in detail next.&lt;br /&gt;
&lt;br /&gt;
=== Argument Roles ===&lt;br /&gt;
&lt;br /&gt;
Your command can take multiple arguments.  Each one is identified by a &amp;quot;role&amp;quot;.  To understand roles, it helps to think of your command name as a verb, and each argument as a noun.  Remember that Ubiquity&#039;s command line is a pseudo-natural-language environment, so it attempts to be as close to natural language grammar as possible.&lt;br /&gt;
&lt;br /&gt;
For example, if you&#039;ve ever used the &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; command, you know that it takes up to two arguments: a message and a person.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  email message&lt;br /&gt;
  email to person&lt;br /&gt;
  email message to person&lt;br /&gt;
  email to person message&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In grammatical terms, the message argument is the &amp;quot;direct object&amp;quot; of the verb &amp;quot;email&amp;quot;.  The person argument is an indirect object.  We call it the &amp;quot;goal&amp;quot; of the verb.  So if we were writing the email command, we&#039;d define the arguments like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;message&amp;quot;},&lt;br /&gt;
              {role: &amp;quot;goal&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;recipient&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because we give the recipient argument the &amp;quot;goal&amp;quot; role, the Ubiquity parser knows to expect the user to type the word &amp;quot;to&amp;quot;.  When the user enters &amp;quot;email hello to Aza&amp;quot;, the parser knows that the word following &amp;quot;to&amp;quot; -- that is, &amp;quot;Aza&amp;quot; -- should be assigned to the recipient argument.&lt;br /&gt;
&lt;br /&gt;
In our simple &amp;quot;echo&amp;quot; command, we expect the user to type &amp;quot;echo hellooooo&amp;quot; or something like that.  The &amp;quot;hellooooo&amp;quot; is the direct object of the verb &amp;quot;echo&amp;quot;, so we give it the &amp;quot;object&amp;quot; role.  &lt;br /&gt;
&lt;br /&gt;
&amp;quot;Object&amp;quot; is the most common role.  If a command takes only one argument, that argument is usually an &amp;quot;object&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== What Roles Can I Use? ====&lt;br /&gt;
&lt;br /&gt;
* object   (in &amp;quot;echo helloooo&amp;quot;, hello is the object.)&lt;br /&gt;
* goal    (in &amp;quot;email this to brandon&amp;quot;, brandon is the goal.)&lt;br /&gt;
* source   (in &amp;quot;translate this from spanish&amp;quot;, spanish is the source.)&lt;br /&gt;
* location    (in &amp;quot;yelp pizza near boston&amp;quot;, boston is the location.)&lt;br /&gt;
* time    (in &amp;quot;book a flight on thursday&amp;quot;, thursday is the time.)&lt;br /&gt;
* instrument  (in &amp;quot;search monkeys with google&amp;quot;, google is the instrument.)&lt;br /&gt;
* format   (in &amp;quot;check weather in celsius&amp;quot;, celsius is the format.)&lt;br /&gt;
* modifier  (in &amp;quot;get email address for chris&amp;quot;, chris is the modifier.)&lt;br /&gt;
* alias   (in &amp;quot;twitter this as jono&amp;quot;, jono is the alias.)&lt;br /&gt;
&lt;br /&gt;
[https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles More information about these roles].&lt;br /&gt;
&lt;br /&gt;
=== The Arguments Object ===&lt;br /&gt;
&lt;br /&gt;
When your execute method is called, it is passed a single object that encapsulates the values for all arguments.&lt;br /&gt;
&lt;br /&gt;
When your preview method is called, it is passed this object, too.&lt;br /&gt;
&lt;br /&gt;
The object has one attribute corresponding to each role.  In our example above, the command accepts only an object-role argument, so the preview and execute methods get passed an argument with an &amp;quot;arguments.object&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
If we made a command, like email, that takes an object-role argument and a goal-role argument, its preview and execute methods would get passed an argument with &amp;quot;arguments.object&amp;quot; and &amp;quot;arguments.goal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
arguments.object (or arguments.goal) has several attributes of its own:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments.object.text  // a string of the input in plain text, without formatting&lt;br /&gt;
  arguments.object.html  // a string of the input in formatted html, including tags&lt;br /&gt;
  arguments.object.data  // for non-text input types, an arbitrary data object&lt;br /&gt;
  arguments.object.summary // for very long inputs, an abbreviated display string&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our example command only cares about the &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; attribute of the input, because it simply wants plain text.  Often, when the user invokes your command by typing a few short words into the input box, &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.html&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;.summary&amp;lt;/code&amp;gt; will all have exactly the same value, and &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; will be null.  Many, if not most, commands that you write will only care about the text value.  Nevertheless, the other versions of the input data are provided to you in case they differ from &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; and in case your command has a use for them.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Noun Types ==&lt;br /&gt;
&lt;br /&gt;
Noun types specify what &#039;&#039;kind&#039;&#039; of input your command can accept for each one of its arguments.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;echo&amp;quot; command, we wanted the object-role argument to accept any text whatsoever, so for its nountype we passed in the predefined &amp;lt;code&amp;gt;noun_arb_text&amp;lt;/code&amp;gt; object.  This object accepts any arbitrary text as a valid argument and passes it to the command unchanged.&lt;br /&gt;
&lt;br /&gt;
This is OK for very simple commands, like echoing back the user&#039;s input.  But for commands that take structured data, you will want to use more specific nountypes.&lt;br /&gt;
&lt;br /&gt;
For example, if a command can take a date (like the &amp;quot;check calendar&amp;quot; command), you would want to use &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; as the nountype of the argument.  &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; provides several benefits to your command:  it does all of the date parsing for you; it suggests dates that the user might want to enter (for instance, it defaults to today&#039;s date).  And, it lets the parser know that your command takes a date.  This is useful because when the user selects a date on a page and invokes Ubiquity, your command -- along with &amp;quot;check calendar&amp;quot; -- will be one of the top suggestions.&lt;br /&gt;
&lt;br /&gt;
You can write your own noun types -- we&#039;ll get into that later.  For now, let&#039;s take a look at the built-in nountypes that your command can use.  These include:&lt;br /&gt;
&lt;br /&gt;
* noun_arb_text (Arbitrary text)&lt;br /&gt;
* noun_type_language (Name of a human language, e.g. &amp;quot;English&amp;quot;, &amp;quot;Japanese&amp;quot;)&lt;br /&gt;
* noun_type_url (A URL)&lt;br /&gt;
* noun_type_contact (An email address from your address book)&lt;br /&gt;
* noun_type_date (A date, in any format, or a word like &amp;quot;tomorrow&amp;quot;)&lt;br /&gt;
* noun_type_time (A time, in any format)&lt;br /&gt;
* noun_type_percentage&lt;br /&gt;
* noun_type_address&lt;br /&gt;
* noun_type_tab&lt;br /&gt;
* noun_type_searchengine&lt;br /&gt;
* noun_type_tag&lt;br /&gt;
* noun_type_geolocation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are familiar with writing commands, you should check out the [http://hg.toolness.com/ubiquity-firefox/file/6caa9d66b3bb/ubiquity/chrome/content/nlparser/en/nountypes.js nountypes.js], which has the implementation for most of the noun-types.  You can see what noun types are already available for your commands to use, what still needs to be written, and where the existing implementations could use improvement &amp;amp;mdash; and then come [[Labs/Ubiquity#Participation|get involved]] to help us improve them.&lt;br /&gt;
&lt;br /&gt;
=== Regexps as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
If none of the nountypes above is what you&#039;re looking for, there are several ways to define your own.  The simplest is to use a regular expression.  Suppose that (for whatever odd reason) you wanted your command to accept only arguments that begin with the letter N.  The following regexp matches words that start with N:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /^[nN]/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could use it as a noun type, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: /^[nN]/,&lt;br /&gt;
               label: &amp;quot;word that starts with n&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note that you do &#039;&#039;not&#039;&#039; put quotes around the regexp.)&lt;br /&gt;
&lt;br /&gt;
A regexp nountype will reject input that doesn&#039;t match, but it doesn&#039;t know how to help the user by suggesting appropriate input.&lt;br /&gt;
&lt;br /&gt;
=== Lists as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
Suppose you&#039;re writing a command that takes a color as an argument (perhaps it outputs a hexadecimal RGB representation of that color.)  To make a nountype that accepts colors, you can simply pass in an array of strings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  names: [&amp;quot;convert color&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: [&amp;quot;red&amp;quot;, &amp;quot;orange&amp;quot;, &amp;quot;yellow&amp;quot;, &amp;quot;green&amp;quot;, &lt;br /&gt;
                          &amp;quot;blue&amp;quot;, &amp;quot;violet&amp;quot;, &amp;quot;black&amp;quot;, &amp;quot;white&amp;quot;,&lt;br /&gt;
                          &amp;quot;grey&amp;quot;, &amp;quot;brown&amp;quot;, &amp;quot;beige&amp;quot;, &amp;quot;magenta&amp;quot;,&lt;br /&gt;
                          &amp;quot;cerulean&amp;quot;, &amp;quot;puce&amp;quot;],&lt;br /&gt;
               label: &amp;quot;color to convert&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One benefit of using a list is that the parser can use it offer the user suggestions.   If the user enters &amp;quot;get-color bl&amp;quot;, for instance, Ubiquity will be able to suggest &amp;quot;black&amp;quot; and &amp;quot;blue&amp;quot; as the two valid completions based on the input.  This makes list-based nountypes very useful for any command that can accept only a finite set of values.&lt;br /&gt;
&lt;br /&gt;
=== Writing a Noun Type Object ===&lt;br /&gt;
&lt;br /&gt;
Of course, not every type of noun you&#039;d be interested in can be represented&lt;br /&gt;
as a finite list or as a regexp.  If you want to be able to accept or reject input based on some algorithmic test, you can do so by writing a custom JavaScript object that implements a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method (and, optionally, a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; method.)&lt;br /&gt;
&lt;br /&gt;
There is an example of how to do this in the section on the tab commands, below.&lt;br /&gt;
&lt;br /&gt;
== Insert Email: the Contact noun type ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s take a look at one of the built-in noun-types: &amp;lt;code&amp;gt;noun_type_contact&amp;lt;/code&amp;gt;. This lets Ubiquity know to expect a person (either by name or email address). By using the noun-type, Ubiquity will also autocomplete to known people while the user is entering the command. This is what the built-in Ubiquity command &amp;quot;email&amp;quot; uses.&lt;br /&gt;
&lt;br /&gt;
At the moment, Ubiquity figures out what people you know through reading your Gmail contacts. In this prototyped version, you&#039;ll need to use Gmail and be logged in for for Ubiquity to know who you know. Eventually, we&#039;d like to be able to interface with all major web-mail sites, as well as desktop software like Thunderbird.&lt;br /&gt;
&lt;br /&gt;
Enough rambling. It&#039;s time for a command. I constantly find that I need to fetch someone&#039;s email address to paste into a text field because I don&#039;t know it off-hand. This command solves that by letting you insert someone&#039;s email address using autocomplete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert email&amp;quot;],&lt;br /&gt;
  arguments: {modifier: noun_type_contact},&lt;br /&gt;
  preview: &amp;quot;Inserts someone&#039;s email address by name.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    CmdUtils.setSelection( arguments.modifier.text );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To try this out, Ubiq &amp;quot;insert email for &amp;quot; and then the first few letters of someone you email often.&lt;br /&gt;
&lt;br /&gt;
=== Shorter Argument Declarations ===&lt;br /&gt;
&lt;br /&gt;
Notice that we used a shortcut for declaring the arguments.  In the long form, we would have had to say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;modifier&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;contact&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but if we don&#039;t care about specifying extra parameters for the argument, we can get away with using a single object for &amp;quot;arguments&amp;quot;, with the roles as the property names, and the nountypes as the property values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or with label using &amp;lt;code&amp;gt;&amp;quot;_&amp;quot;&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;&amp;quot; &amp;quot;&amp;lt;/code&amp;gt;) as separator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier_contact: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we had several arguments, we could say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {object: noun_arb_text, modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you only have &amp;quot;object&amp;quot; and don&#039;t need to specify a label...:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  argument: noun_arb_text&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aza writes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This one command sums up what I love about Ubiquity. In 8 lines of code, I can &lt;br /&gt;
fundamentally enhance the browser&#039;s functionality. Doing the same thing using &lt;br /&gt;
a normal Firefox extension methodology takes pages and pages of code&amp;amp;mdash;and  the interface would take more thought still. Doing the same thing using a bookmarklet would require a server-side component (to get around cross-site Ajax request ban) as well as forcing the user to give up their email password.&lt;br /&gt;
&lt;br /&gt;
Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TinyURL: Network Calls and jQuery (and the URL noun type)==&lt;br /&gt;
&lt;br /&gt;
Often while writing emails, I&#039;ll discover that I&#039;ve pasted in a URL long enough to be used for unfortunate analogies. I&#039;d like to be able to quickly turn that into a [http://en.wikipedia.org/wiki/Tinyurl TinyURL]&amp;amp;mdash;but the process of making a TinyURL involves lots of fiddly steps. Ubiquity to the rescue.&lt;br /&gt;
&lt;br /&gt;
Because we include [http://en.wikipedia.org/wiki/jQuery jQuery] with Ubiquity, it is simple to perform Ajax calls as well as parse returning data. TinyUrl.com provides an easy to use RESTful API where you pass a URL and it returns its shortened form. We use that API in this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;tinyurl&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_type_url,&lt;br /&gt;
               label: &amp;quot;url to shorten&amp;quot;}],&lt;br /&gt;
  preview: &amp;quot;Replaces the selected URL with a TinyUrl.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var baseUrl = &amp;quot;http://tinyurl.com/api-create.php&amp;quot;;&lt;br /&gt;
    var params = {url: arguments.object.text};&lt;br /&gt;
    jQuery.get( baseUrl, params, function( tinyUrl ) {&lt;br /&gt;
      CmdUtils.setSelection( tinyUrl );&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is a useful nountype because it defaults to the URL of the page that you are currently on.  If that is in fact the URL that the user wants, then they don&#039;t have to type it or even select it.&lt;br /&gt;
&lt;br /&gt;
jQuery is a powerful tool. With it, you can fairly effortlessly cherry-pick the data you need from RSS feeds, XML, and all sorts of other data formats. It also makes doing in-preview animations a breeze.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Twitter: Putting It All Together =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve now covered everything we need to cover in order to write a command that allows us to [http://en.wikipedia.org/wiki/Twitter Twitter] from Ubiquity.  The code below is the actual source code of the Twitter command as it appears in Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
Many thanks to [http://theunfocused.net/moz/ubiquity/verbs/ Blair McBride] for writing this command.  The source code is a bit more intricate than anything we&#039;ve seen so far, but it&#039;s built using exactly the same basic pieces -- and demonstrates nearly all of those pieces in action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const TWITTER_STATUS_MAXLEN = 140;&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;twitter&amp;quot;, &amp;quot;tweet&amp;quot;, &amp;quot;share using twitter&amp;quot;],&lt;br /&gt;
  arguments: [&lt;br /&gt;
    {role: &amp;quot;object&amp;quot;, label: &#039;status&#039;, nountype: noun_arb_text},&lt;br /&gt;
    {role: &amp;quot;alias&amp;quot;, nountype: noun_type_twitter_user}&lt;br /&gt;
  ],&lt;br /&gt;
  icon: &amp;quot;http://twitter.com/favicon.ico&amp;quot;,&lt;br /&gt;
  description:&lt;br /&gt;
  &amp;quot;Sets your Twitter status to a message of at most 160 characters.&amp;quot;,&lt;br /&gt;
  help: (&amp;quot;You&#039;ll need a &amp;lt;a href=\&amp;quot;http://twitter.com\&amp;quot;&amp;gt;Twitter account&amp;lt;/a&amp;gt;,&amp;quot; +&lt;br /&gt;
         &amp;quot; obviously.  If you&#039;re not already logged in&amp;quot; +&lt;br /&gt;
         &amp;quot; you&#039;ll be asked to log in.&amp;quot;),&lt;br /&gt;
  preview: function(previewBlock, args) {&lt;br /&gt;
    var statusText = (args.object ? args.object.text : &#039;&#039;);&lt;br /&gt;
    var usernameText = &amp;quot;&amp;quot;;&lt;br /&gt;
    if (args.alias) {&lt;br /&gt;
      usernameText = args.alias.text;&lt;br /&gt;
    } else if (args.as) {&lt;br /&gt;
      usernameText = args.as.text;&lt;br /&gt;
    }&lt;br /&gt;
    var previewTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;div class=&#039;twitter&#039;&amp;gt;&amp;quot;+_(&amp;quot;Updates your Twitter status ${username} to:&amp;quot;)+&amp;quot;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      &amp;quot;&amp;lt;b class=&#039;status&#039;&amp;gt;${status}&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      _(&amp;quot;Characters remaining: &amp;lt;b&amp;gt;${chars}&amp;lt;/b&amp;gt;&amp;quot;) +&lt;br /&gt;
      &amp;quot;&amp;lt;p&amp;gt;&amp;lt;small&amp;gt;&amp;quot;+_(&amp;quot;tip: tweet @mozillaubiquity for help&amp;quot;)+&amp;quot;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
    var truncateTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;strong&amp;gt;&amp;quot;+_(&amp;quot;The last &amp;lt;b&amp;gt;${truncate}&amp;lt;/b&amp;gt; characters will be truncated!&amp;quot;)+&amp;quot;&amp;lt;/strong&amp;gt;&amp;quot;);&lt;br /&gt;
    var previewData = {&lt;br /&gt;
      status: &amp;lt;&amp;gt;{statusText}&amp;lt;/&amp;gt;.toXMLString(),&lt;br /&gt;
      username: usernameText &amp;amp;&amp;amp; _(&amp;quot;(For user &amp;lt;b&amp;gt;${usernameText}&amp;lt;/b&amp;gt;)&amp;quot;),&lt;br /&gt;
      chars: TWITTER_STATUS_MAXLEN - statusText.length&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var previewHTML = CmdUtils.renderTemplate(&lt;br /&gt;
                        CmdUtils.renderTemplate(previewTemplate, previewData),&lt;br /&gt;
                        {usernameText:usernameText});&lt;br /&gt;
&lt;br /&gt;
    if (previewData.chars &amp;lt; 0) {&lt;br /&gt;
      var truncateData = {&lt;br /&gt;
        truncate: 0 - previewData.chars&lt;br /&gt;
      };&lt;br /&gt;
&lt;br /&gt;
      previewHTML += CmdUtils.renderTemplate(truncateTemplate, truncateData);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    previewBlock.innerHTML = previewHTML;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    var statusText = args.object.text;&lt;br /&gt;
    if(statusText.length &amp;lt; 1) {&lt;br /&gt;
      this._show(_(&amp;quot;requires a status to be entered&amp;quot;));&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var updateUrl = &amp;quot;https://twitter.com/statuses/update.json&amp;quot;;&lt;br /&gt;
    var updateParams = {&lt;br /&gt;
      source: &amp;quot;ubiquity&amp;quot;,&lt;br /&gt;
      status: statusText&lt;br /&gt;
      //dont cut the input since sometimes, the user selects a big url,&lt;br /&gt;
      //and the total lenght is more than 140, but tinyurl takes care of that&lt;br /&gt;
    };&lt;br /&gt;
    var me = this;&lt;br /&gt;
&lt;br /&gt;
    function sendMessage() {&lt;br /&gt;
      jQuery.ajax({&lt;br /&gt;
        type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
        url: updateUrl,&lt;br /&gt;
        data: updateParams,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        error: function() {&lt;br /&gt;
          me._show(_(&amp;quot;error - status not updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        success: function() {&lt;br /&gt;
          me._show(/^d /.test(statusText)&lt;br /&gt;
                   ? _(&amp;quot;direct message sent&amp;quot;)&lt;br /&gt;
                   : _(&amp;quot;status updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        username: login.username,&lt;br /&gt;
        password: login.password&lt;br /&gt;
      });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var login;&lt;br /&gt;
    var alias = args.alias;&lt;br /&gt;
    if (alias &amp;amp;&amp;amp; alias.text &amp;amp;&amp;amp; alias.data) {&lt;br /&gt;
      login = alias.data;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    } else {&lt;br /&gt;
      login = {username: null,&lt;br /&gt;
               password: null};&lt;br /&gt;
      if (alias &amp;amp;&amp;amp; alias.text)&lt;br /&gt;
        login.username = alias.text;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  _show: function(txt){&lt;br /&gt;
    displayMessage({icon: this.icon, title: this.name, text: txt});&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Switching Tabs =&lt;br /&gt;
&lt;br /&gt;
The final command in this tutorial is for switching between tabs. The end goal is this: type a few keys to that matches the title of an open tab (in any window), hit return, and you&#039;ve switched to that tab.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: Writing your own Noun-Types ===&lt;br /&gt;
&lt;br /&gt;
A noun-type needs to only have two things: A &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; function.  It can optionally also have a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
The label is what shows up when the command prompts for input. Suggest returns a list of input objects, each one containing the name of a matching tab. We&#039;re using [http://developer.mozilla.org/en/docs/FUEL FUEL] to interact with the browser, which is where the &amp;quot;Application&amp;quot; variable comes from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_tab = {&lt;br /&gt;
  label: &amp;quot;tab name&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
  // Returns all tabs from all windows.&lt;br /&gt;
  getTabs: function nt_tab_getTabs() {&lt;br /&gt;
    return [tab&lt;br /&gt;
            for each (win in Application.windows)&lt;br /&gt;
            for each (tab in win.tabs)];&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  suggest: function nt_tab_suggest(text, html, callback, selectionIndices) {&lt;br /&gt;
    var textLC = text.toLowerCase();&lt;br /&gt;
    return [CmdUtils.makeSugg(tab.document.title, null, tab)&lt;br /&gt;
            for each (tab in this.getTabs())&lt;br /&gt;
            if (~tab.document.title.toLowerCase().indexOf(textLC))];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The suggest method of a noun type always gets passed both text and html.  If the input is coming from a part of a web page that the user has selected, these&lt;br /&gt;
values can be different: they are both strings, but the html value contains markup tags while the text value does not. The Tab noun type only cares about the plain text of the tab name, so we ignore the value of html.&lt;br /&gt;
&lt;br /&gt;
The callback argument is for use by nountypes that need to run asynchronously, i.e. because they need to do network calls to generate suggestions.  The callback is a function; instead of returning a list of suggestions right away, an asynchronous noun type can call the callback with each suggestion it generates.  More on this later; the tab noun type generates all its suggestions right away, so it just returns them instead of using the callback.&lt;br /&gt;
&lt;br /&gt;
We use the convenience function &amp;lt;code&amp;gt;CmdUtils.makeSugg()&amp;lt;/code&amp;gt; to generate an&lt;br /&gt;
input object of the type that the Ubiquity parser expects.  The full signature of this function is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSugg(text, html, data, score, selectionIndices);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It requires at least one of &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; if you want to skip &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the text or html input is very long, &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; generates a summary for us, and puts it in the &amp;lt;code&amp;gt;summary&amp;lt;/code&amp;gt; attribute of the input object.&lt;br /&gt;
&lt;br /&gt;
We could have accomplished mostly the same thing without calling &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; by returning a list of anonymous objects like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ text: tabName,&lt;br /&gt;
  html: Utils.escapeHtml(tabName),&lt;br /&gt;
  data: tab,&lt;br /&gt;
  summary: Utils.escapeHtml(tabName) };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input objects that our &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method generates are the same objects that will eventually get passed in to the &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; methods of any commands that use this noun type.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: The Command ===&lt;br /&gt;
&lt;br /&gt;
Now that we are armed with the tab noun-type, it is easy to make the tab-switching command. Again, we use FUEL to focus the selected tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;switch tab&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_tab},&lt;br /&gt;
&lt;br /&gt;
  execute: function tab_execute(args) {&lt;br /&gt;
    // must be delayed because Ubiquity restores the focus on close&lt;br /&gt;
    Utils.setTimeout(function delayedFocus() {&lt;br /&gt;
      var tab = args.object.data;&lt;br /&gt;
      tab._window._window.focus();&lt;br /&gt;
      tab.focus();&lt;br /&gt;
    }, 99);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  preview: function tab_preview(pblock, args) {&lt;br /&gt;
    var tabName = args.object.text;&lt;br /&gt;
    if (tabName) {&lt;br /&gt;
      var msg = &amp;quot;Changes to &amp;lt;strong&amp;gt;${tab}&amp;lt;/strong&amp;gt; tab.&amp;quot;;&lt;br /&gt;
      pblock.innerHTML = _(msg, {tab: tabName});&lt;br /&gt;
    }&lt;br /&gt;
    else pblock.innerHTML = _(&amp;quot;Switch to a tab by name.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Development Hints =&lt;br /&gt;
&lt;br /&gt;
You now know all you need to know to get started developing useful Ubiquity commands of your own.&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous tips that didn&#039;t fit elsewhere on this page, that may make development easier for you.&lt;br /&gt;
&lt;br /&gt;
== The Source Code of Built-In Commands ==&lt;br /&gt;
&lt;br /&gt;
Looking at the source code of built-in commands and built-in noun types can be a very useful aid to development.  If you have the source checkout of Ubiquity (see [Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial | the development tutorial] to find out how to get this), the source code can be found in the files:&lt;br /&gt;
&lt;br /&gt;
 ubiquity/standard-feeds/&lt;br /&gt;
 ubiquity/builtin-feeds/builtincmds.js&lt;br /&gt;
 ubiquity/modules/nountypes.js&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a checkout of the source code, you can view the latest version on the web here:&lt;br /&gt;
&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/standard-feeds/ standard-feeds]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/builtin-feeds/builtincmds.js builtincmds.js]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/modules/nountypes.js nountypes.js]&lt;br /&gt;
&lt;br /&gt;
== Interacting with Other Extensions ==&lt;br /&gt;
&lt;br /&gt;
http://img363.imageshack.us/img363/1906/picture7cm5.png&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t much to say here besides that it&#039;s easy. For example, here&#039;s a command (thanks to [http://foyrek.com/lyrics.html Abimanyu Raja] for writing this code) that finds the lyrics for a song. You can simply Ubiq something like &amp;quot;get lyrics for wild international&amp;quot; but the command will also interface with the FoxyTunes extension (if it is installed) and add the currently playing song to the suggestion list. Interfacing with other extensions, too, is easy because you can view the source code for every Firefox extension.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_song = {&lt;br /&gt;
  label: &amp;quot;song name&amp;quot;,&lt;br /&gt;
  suggest: function nt_song_suggest(text) {&lt;br /&gt;
    var suggestions = [CmdUtils.makeSugg(text)];&lt;br /&gt;
    var win = Utils.currentChromeWindow;&lt;br /&gt;
    if (&amp;quot;foxytunesGetCurrentTrackTitle&amp;quot; in win)&lt;br /&gt;
      suggestions.push(CmdUtils.makeSugg(win.foxytunesGetCurrentTrackTitle()));&lt;br /&gt;
    return suggestions;&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;get lyrics&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_song},&lt;br /&gt;
  description: &amp;quot;Searches for lyrics of the song.&amp;quot;,&lt;br /&gt;
  preview: function gl_preview(pblock, {object: {text}}) {&lt;br /&gt;
    if (!text) {&lt;br /&gt;
      this.previewDefault(pblock);&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Searches for the lyrics of &amp;lt;b&amp;gt;${query}&amp;lt;/b&amp;gt;.&amp;quot;,&lt;br /&gt;
                         {query: Utils.escapeHtml(text)});&lt;br /&gt;
  },&lt;br /&gt;
  execute: function gl_execute(args) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      &amp;quot;http://www.google.com/search?q=&amp;quot; +&lt;br /&gt;
      encodeURIComponent(args.object.text + _(&amp;quot; lyrics&amp;quot;)));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing Asynchronous Noun Suggestions ==&lt;br /&gt;
&lt;br /&gt;
The noun types we&#039;ve seen so far in this tutorial have all worked synchronously, returning their suggestions right away. However, Ubiquity also supports asynchronous noun suggestions. These are useful for when a noun type needs to do some potentially time-consuming work before it can make suggestions &amp;amp;mdash; most commonly when it needs to call an external service.&lt;br /&gt;
&lt;br /&gt;
Implementing asynchronous suggestions is simple. Whenever the Ubiquity parser calls a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function, it includes a callback function that may be used to send suggestions back to the parser as they become available. In the most typical case, the noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function makes an AJAX request, invoking the parser&#039;s callback function from within the callback function for the AJAX request.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example: a noun type that suggests [http://www.freebase.com/ Freebase] topics based on the text the user has typed or selected, and a barebones &amp;lt;code&amp;gt;freebase-lookup&amp;lt;/code&amp;gt; command that uses the noun type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_freebase_topic = {&lt;br /&gt;
  name: &amp;quot;Freebase topic&amp;quot;,&lt;br /&gt;
  label: &amp;quot;topic&amp;quot;,&lt;br /&gt;
  suggest: function freebase_topic_suggest(text, html, callback) {&lt;br /&gt;
    return [&lt;br /&gt;
      CmdUtils.makeSugg(text),&lt;br /&gt;
      $.ajax({&lt;br /&gt;
        url: &amp;quot;http://www.freebase.com/api/service/search&amp;quot;,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        data: {prefix: text, limit: 5},&lt;br /&gt;
        success: function suggestTopics(response) {&lt;br /&gt;
          if (response.status === &amp;quot;200 OK&amp;quot;)&lt;br /&gt;
            callback([CmdUtils.makeSugg(result.name, result.name, result)&lt;br /&gt;
                      for each (result in response.result)]);&lt;br /&gt;
        },&lt;br /&gt;
      })];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;lookup on freebase&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_freebase_topic},&lt;br /&gt;
  preview: function preview(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _((&amp;quot;Go to the Freebase topic page for &amp;quot; +&lt;br /&gt;
                          &amp;quot;{if text}${text}{else}any topic{/if}.&amp;quot;),&lt;br /&gt;
                         args.object);&lt;br /&gt;
  },&lt;br /&gt;
  execute: function goToFreebase({object: {text, data}}) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      text&lt;br /&gt;
      ? (data&lt;br /&gt;
         ? &amp;quot;http://www.freebase.com/view&amp;quot; + data.id&lt;br /&gt;
         : (&amp;quot;http://www.freebase.com/search?query=&amp;quot; +&lt;br /&gt;
            encodeURIComponent(text)))&lt;br /&gt;
      : &amp;quot;http://www.freebase.com/&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few notes:&lt;br /&gt;
&lt;br /&gt;
* A noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function typically returns an empty array when it intends to make asynchronous suggestions, but it can return one or more suggestions synchronously if it has them available.&lt;br /&gt;
* Because the work being done to generate asynchronous suggestions is generally somewhat expensive, and because a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function may be called for every keystroke the user makes, you should probably consider implementing a delay before starting the work and/or caching the work at some level. Ubiquity currently leaves this up to each noun type individually.&lt;br /&gt;
* A much more robust implementation of Freebase-derived noun types can be found [http://graynorton.com/ubiquity/freebase-nouns.html here].&lt;br /&gt;
&lt;br /&gt;
== Running on page load, Ubiquity load and startup ==&lt;br /&gt;
&lt;br /&gt;
Commands aren&#039;t the only thing you can put in a command feed.  You can also include functions you want to be run automatically at page-load time and at Firefox startup time.&lt;br /&gt;
&lt;br /&gt;
In order to run some code on page load, you simply have to prefix your function with &amp;lt;code&amp;gt;pageLoad_&amp;lt;/code&amp;gt;. For example, if you want to say &amp;quot;Hi&amp;quot; every time a page is loaded, your code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pageLoad_hi() {&lt;br /&gt;
  displayMessage(&amp;quot;hi&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you modify the function and want to see the changes, remember to first invoke Ubiquity. Although your function like above, might not be a Ubiquity command, this is necessary to refresh the cached code.&lt;br /&gt;
&lt;br /&gt;
Similarly, functions prefixed by &amp;lt;code&amp;gt;ubiquityLoad_&amp;lt;/code&amp;gt; are called whenever Ubiquity is initialized for a main window of Firefox. This is useful when you want to interact with the Ubiquity interface itself, or run some code whenever a new window is opened.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function ubiquityLoad_googleAsDefaultEntry(gUbiquity, mainWindow) {&lt;br /&gt;
  gUbiquity.textBox.value = &amp;quot;google&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if you want to run some code everytime Firefox starts up, you just have to prefix the function with &amp;lt;code&amp;gt;startup_&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The awesome thing about these functions is the ability to develop whole Firefox extensions (that require minimal UI) as Ubiquity plugins in lesser lines of code. You don&#039;t need to worry about chrome.manifest or install.rdf. Another added benefit is that you never have to restart your Firefox during development unless of course, you are running code on Firefox startup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://img388.imageshack.us/img388/3086/picture5eo9.png&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code for [http://foyrek.com/keyscape.js Keyscape] which is a Ubiquity command that makes use of &amp;lt;code&amp;gt;pageLoad&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;startup&amp;lt;/code&amp;gt; to recreate the functionality of the [https://addons.mozilla.org/en-US/firefox/addon/339 Search Keys extension] by Jesse Ruderman. In line with Ubiquity&#039;s aim to let you do things quicker using your keyboard, this command lets you go to search results on Google by just pressing a number. It&#039;ll add hints to show the number of each link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//A lot of this code is borrowed from the Search Keys extension&lt;br /&gt;
//Many thanks to Jeese Ruderman&lt;br /&gt;
&lt;br /&gt;
function startup_keyscape() {&lt;br /&gt;
  window.addEventListener(&amp;quot;keydown&amp;quot;, keyscape_down, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function pageLoad_keyscape(doc){&lt;br /&gt;
&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
  //If we are on about: or chrome://, just return&lt;br /&gt;
  if(uri.scheme != &amp;quot;http&amp;quot;)&lt;br /&gt;
    return;&lt;br /&gt;
&lt;br /&gt;
  //Check if the page we are on is google&lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	      		    &lt;br /&gt;
    for(var num=1; num&amp;lt;=10; num++){&lt;br /&gt;
&lt;br /&gt;
      var link = jQuery(doc.body).find(&#039;a.l&#039;)[num-1];&lt;br /&gt;
      &lt;br /&gt;
      if( link ){&lt;br /&gt;
&lt;br /&gt;
        var hint = doc.createElementNS(&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;, &amp;quot;span&amp;quot;);&lt;br /&gt;
        hint.style.color = &amp;quot;blue&amp;quot;;&lt;br /&gt;
        hint.style.background = &amp;quot;white&amp;quot;;&lt;br /&gt;
        hint.style.padding = &amp;quot;1px 2px 1px 2px&amp;quot;;&lt;br /&gt;
        hint.style.marginLeft = &amp;quot;.5em&amp;quot;;&lt;br /&gt;
        hint.appendChild(doc.createTextNode(num == 10 ? 0 : num));&lt;br /&gt;
        link.parentNode.insertBefore(hint, link.nextSibling);&lt;br /&gt;
      }  		&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_isGoogle(uri){&lt;br /&gt;
  return uri.host.indexOf(&amp;quot;google&amp;quot;) != -1 &lt;br /&gt;
	 &amp;amp;&amp;amp; (uri.path.substr(0,8) == &amp;quot;/search?&amp;quot; &lt;br /&gt;
         || uri.path.substr(0,8) == &amp;quot;/custom?&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_down(event){&lt;br /&gt;
&lt;br /&gt;
  var doc =  Application.activeWindow.activeTab.document;	&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
 &lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	&lt;br /&gt;
   var key = parseInt(event.keyCode || event.charCode);	&lt;br /&gt;
   var num;&lt;br /&gt;
	&lt;br /&gt;
   if(48 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 57) //number keys&lt;br /&gt;
     num = key - 48;&lt;br /&gt;
   else if(96 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 105) //numeric keypad with numlock on&lt;br /&gt;
     num = key - 96;&lt;br /&gt;
   else&lt;br /&gt;
     return;&lt;br /&gt;
&lt;br /&gt;
   //Don&#039;t do anything if we are in a textbox&lt;br /&gt;
   //or some other related elements&lt;br /&gt;
   var elt = window.document.commandDispatcher.focusedElement;&lt;br /&gt;
   &lt;br /&gt;
   if (elt) {&lt;br /&gt;
     var ln = new String(elt.localName).toLowerCase();&lt;br /&gt;
     if (ln == &amp;quot;input&amp;quot; || ln == &amp;quot;textarea&amp;quot; || ln == &amp;quot;select&amp;quot; || ln == &amp;quot;isindex&amp;quot;)&lt;br /&gt;
        return;&lt;br /&gt;
   }&lt;br /&gt;
    &lt;br /&gt;
   //Get the link url from the search results page&lt;br /&gt;
   var url_dest = jQuery(doc.body).find(&#039;a.l&#039;).eq(num-1).attr(&#039;href&#039;);&lt;br /&gt;
   &lt;br /&gt;
   if(event.altKey){&lt;br /&gt;
     //Open in new tab&lt;br /&gt;
     Application.activeWindow.open(Utils.url(url_dest));&lt;br /&gt;
   }else{&lt;br /&gt;
     //Open in same tab&lt;br /&gt;
     doc.location.href = url_dest;&lt;br /&gt;
   }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Ubiquity does indeed become ubiquitous, a lot of extensions can be re-written as Ubiquity commands. This is much nicer for the end-user, as well, because the Ubiquity command installation process is a lot easier.&lt;br /&gt;
&lt;br /&gt;
In the future, Ubiquity is also likely to have the ability to convert your Ubiquity commands into proper Firefox extensions. Look [http://labs.toolness.com/trac/ticket/3 here] to check on the progress of this functionality.&lt;br /&gt;
&lt;br /&gt;
== Persistent Storage ==&lt;br /&gt;
Some commands may want to store data that persist even after closing Firefox. &lt;br /&gt;
Meet &amp;lt;code&amp;gt;Bin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var gId = 42; // used for avoiding needless preview updates when typing&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;memo&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Lets you jot a memo for the page.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  argument: noun_arb_text,&lt;br /&gt;
  execute: function memo_execute({object: {html}}) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]() || [];&lt;br /&gt;
    list.push(html);&lt;br /&gt;
    Bin[href](list);&lt;br /&gt;
    gId = +new Date;&lt;br /&gt;
  },&lt;br /&gt;
  preview: function memo_preview(pb) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]();&lt;br /&gt;
    if (!list) {&lt;br /&gt;
      pb.innerHTML =&lt;br /&gt;
        &amp;lt;&amp;gt;No memos taken for: &amp;lt;small&amp;gt;&amp;lt;code&amp;gt;{href}&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/&amp;gt;;&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    if (pb.ownerDocument.getElementById(gId)) return;&lt;br /&gt;
    var ol = CmdUtils.previewList(pb, list, function deleteMemo(i, ev) {&lt;br /&gt;
      $(ev.target).closest(&amp;quot;li&amp;quot;).slideUp();&lt;br /&gt;
      list.splice(i, 1);&lt;br /&gt;
      Bin[href](list.length ? list : null);&lt;br /&gt;
      gId = +new Date;&lt;br /&gt;
    });&lt;br /&gt;
    ol.id = gId;&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;list memos&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Opens all memos you&#039;ve taken in a new tab.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  execute: function list_memos_execute() {&lt;br /&gt;
    var htm = +Bin + &amp;quot; page(s)&amp;lt;dl&amp;gt;&amp;quot;, {escapeHtml} = Utils;&lt;br /&gt;
    for each (var [url, memos] in Bin) {&lt;br /&gt;
      htm += &amp;quot;&amp;lt;dt&amp;gt;&amp;quot; + escapeHtml(url) + &amp;quot;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;ol&amp;gt;&amp;quot;;&lt;br /&gt;
      for each (var memo in memos) htm += &amp;quot;&amp;lt;li&amp;gt;&amp;quot; + memo + &amp;quot;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
      htm += &amp;quot;&amp;lt;/ol&amp;gt;&amp;lt;/dd&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    Utils.openUrlInBrowser(&amp;quot;data:text/html,&amp;quot; + encodeURI(htm + &amp;quot;&amp;lt;/dl&amp;gt;&amp;quot;));&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details, see the bottom of [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/feedmanager.js FeedManager] documentation.&lt;br /&gt;
&lt;br /&gt;
== Firebug ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity automatically enables Chrome Errors and Warnings on startup so that errors in your code appear in the Firebug console. Just use &amp;lt;tt&amp;gt;CmdUtils.log()&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;console.log()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Where To Go From Here =&lt;br /&gt;
&lt;br /&gt;
Take a look at Ubiquity&#039;s reference documentation for the &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils]&amp;lt;/tt&amp;gt; namespaces.&lt;br /&gt;
&lt;br /&gt;
If you have any questions or comments, feel free to join us on IRC at &amp;lt;tt&amp;gt;#ubiquity&amp;lt;/tt&amp;gt; on &amp;lt;tt&amp;gt;irc.mozilla.org&amp;lt;/tt&amp;gt;, as well as the [http://groups.google.com/group/ubiquity-firefox Ubiquity Google Group].&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
To reiterate a point I made before: Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web. You are one of those agents.&lt;br /&gt;
&lt;br /&gt;
Now, go forth and create.&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Skins_In_The_Wild&amp;diff=179699</id>
		<title>Labs/Ubiquity/Skins In The Wild</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Skins_In_The_Wild&amp;diff=179699"/>
		<updated>2009-10-30T19:16:05Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* 0.5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A simple list of installable Ubiquity skins.&lt;br /&gt;
==0.5==&lt;br /&gt;
* [http://gist.github.com/80593 elasty] by satyr ([http://img.f.hatena.ne.jp/images/fotolife/m/murky-satyr/20090319/20090319091335_original.png shot1] [http://img.f.hatena.ne.jp/images/fotolife/m/murky-satyr/20090319/20090319091336_original.png shot2])&lt;br /&gt;
** optimized for content size of about 960x720&lt;br /&gt;
&lt;br /&gt;
==0.1==&lt;br /&gt;
* [http://www.yatriksolanki.com/?p=24 Enso-like Skin by Yatrik Solanki]&lt;br /&gt;
* [http://www.yatriksolanki.com/?page_id=10 Simpliquity by Yatrik Solanki]&lt;br /&gt;
* [http://www.greenhousecreations.com/josh/ubiquity/ Kiwi by Joshua R. Johnson]&lt;br /&gt;
* [http://gist.github.com/43589 Enso 2.0 by Harry Wincup]&lt;br /&gt;
* [http://gist.github.com/110509 über by indie] [http://www.zentu.net/snaps/uberskin.png screenshot]&lt;br /&gt;
* [http://gist.github.com/113229 botslife by indie] [http://zentu.net/snaps/botlife.png screenshot] with [http://blog.cocoia.com/2009/ubiquibot-goodie/ ubiquibot graphic by cocoia]&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=177634</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=177634"/>
		<updated>2009-10-22T02:07:42Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* url */ += defaultUrl&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== defaultUrl ===&lt;br /&gt;
An optional url string that will be opened in the case where the user has not provided a search string.&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string ie: &amp;quot;q={QUERY}&amp;amp;hl=en&amp;quot; or as an object ie:&lt;br /&gt;
&amp;lt;code&amp;gt;{&amp;quot;q&amp;quot;: &amp;quot;{QUERY}&amp;quot;, &amp;quot;hl&amp;quot;: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; all selectors used in the following sections are either paths into the json data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]]&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
mSC supports two types of parsers, namely &amp;quot;json&amp;quot; and &amp;quot;html&amp;quot;. If not specified, it assumes you want the html parser.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function, ie: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the html parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the html parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; Whilst this is not strictly speaking a required option for the html parser, it is highly recommended that you use it. If not present, mSC will attempt to consolidate the lists of titles, previews and thumbnails into individual results as best it can, but it is a much more fragile method of parsing.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== preview ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the preview of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseurl ====&lt;br /&gt;
String used as base url if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essentials ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Adding a preview ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.youtube.com/results?search_type=&amp;amp;search_query={QUERY}&amp;amp;aq=f&amp;quot;,&lt;br /&gt;
   parser: {container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
            title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
            thumbnail: &amp;quot;img.vimg120&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
   parser: {type: &amp;quot;JSON&amp;quot;,&lt;br /&gt;
            url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
            container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
            title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;content&amp;quot;,&lt;br /&gt;
            href: &amp;quot;url&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
     title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
     href: function(c) {return jQuery(&amp;quot;a.nyhedsbrev&amp;quot;,c).attr(&amp;quot;href&amp;quot;);},&lt;br /&gt;
     preview: function(c) {var p = &amp;quot;&amp;quot;; jQuery(&amp;quot;table table tr:not(:first)&amp;quot;,c).each(function(){p += jQuery(this).text()+&amp;quot;&amp;lt;br&amp;gt;&amp;quot;;});return p;},&lt;br /&gt;
     thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
     maxResults: 3&lt;br /&gt;
   }&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
   url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
   charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
     title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
     thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
     maxResults: 20,&lt;br /&gt;
   },&lt;br /&gt;
 });&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=177367</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=177367"/>
		<updated>2009-10-21T13:46:56Z</updated>

		<summary type="html">&lt;p&gt;Satyr: /* baseurl */ += src&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string ie: &amp;quot;q={QUERY}&amp;amp;hl=en&amp;quot; or as an object ie:&lt;br /&gt;
&amp;lt;code&amp;gt;{&amp;quot;q&amp;quot;: &amp;quot;{QUERY}&amp;quot;, &amp;quot;hl&amp;quot;: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; all selectors used in the following sections are either paths into the json data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]]&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
mSC supports two types of parsers, namely &amp;quot;json&amp;quot; and &amp;quot;html&amp;quot;. If not specified, it assumes you want the html parser.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function, ie: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the html parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the html parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== preview ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the preview of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseurl ====&lt;br /&gt;
String used as base url if [[#href]] and/or [[#thumbnail]]&#039;s src is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essentials ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Adding a preview ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.youtube.com/results?search_type=&amp;amp;search_query={QUERY}&amp;amp;aq=f&amp;quot;,&lt;br /&gt;
   parser: {container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
            title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
            thumbnail: &amp;quot;img.vimg120&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
   parser: {type: &amp;quot;JSON&amp;quot;,&lt;br /&gt;
            url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
            container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
            title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;content&amp;quot;,&lt;br /&gt;
            href: &amp;quot;url&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
     title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
     href: function(c) {return jQuery(&amp;quot;a.nyhedsbrev&amp;quot;,c).attr(&amp;quot;href&amp;quot;);},&lt;br /&gt;
     preview: function(c) {var p = &amp;quot;&amp;quot;; jQuery(&amp;quot;table table tr:not(:first)&amp;quot;,c).each(function(){p += jQuery(this).text()+&amp;quot;&amp;lt;br&amp;gt;&amp;quot;;});return p;},&lt;br /&gt;
     thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
     maxResults: 3&lt;br /&gt;
   }&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
   url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
   charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
     title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
     thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
     maxResults: 20,&lt;br /&gt;
   },&lt;br /&gt;
 });&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=177361</id>
		<title>Labs/Ubiquity/Writing A Search Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Writing_A_Search_Command&amp;diff=177361"/>
		<updated>2009-10-21T12:35:02Z</updated>

		<summary type="html">&lt;p&gt;Satyr: charset: you→your / nowrap&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{draft}}&lt;br /&gt;
&lt;br /&gt;
Author: Christian Sonne&lt;br /&gt;
&lt;br /&gt;
== Documentation of CmdUtils.makeSearchCommand ==&lt;br /&gt;
In the rest of this document, we will refer to makeSearchCommand as &amp;quot;mSC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== name/names ===&lt;br /&gt;
The name(s) of the search command, ie: &amp;lt;code&amp;gt;name: &amp;quot;Youtube&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;names: [&amp;quot;Youtube&amp;quot;, &amp;quot;Video&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== url ===&lt;br /&gt;
The url of the search provider, with the string &amp;quot;{QUERY}&amp;quot; (without the quotes representing the search word, ie: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;.&lt;br /&gt;
If the provider uses POST instead of GET, see [[#postData]].&lt;br /&gt;
&lt;br /&gt;
=== icon ===&lt;br /&gt;
The icon used for the search command. If not provided, the favicon (favicon.ico) located at the root of the search providers domain will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== description ===&lt;br /&gt;
A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.&lt;br /&gt;
&lt;br /&gt;
=== preview ===&lt;br /&gt;
An optional preview string or function that can be used to display results in the Ubiquity preview. For more info see [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Adding_a_Preview]]&lt;br /&gt;
&lt;br /&gt;
To provide a consistent search experience, mSC can generate a preview for you with minimal work on your part. For more information on this, see [[#parser]]. If you leave out both preview and parser, the provided or generated description will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== charset ===&lt;br /&gt;
If your intended input and response cannot be represented properly by UTF-8, you can provide the required charset as a string. It must be a charset supported by [https://developer.mozilla.org/en/nsIScriptableUnicodeConverter nsIScriptableUnicodeConverter] which means one of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
* Big5&lt;br /&gt;
* Big5-HKSCS&lt;br /&gt;
* EUC-JP&lt;br /&gt;
* EUC-KR&lt;br /&gt;
* GB2312&lt;br /&gt;
* GEOSTD8&lt;br /&gt;
* HZ-GB-2312&lt;br /&gt;
* IBM850&lt;br /&gt;
* IBM852&lt;br /&gt;
* IBM855&lt;br /&gt;
* IBM857&lt;br /&gt;
* IBM862&lt;br /&gt;
* IBM864&lt;br /&gt;
* IBM864i&lt;br /&gt;
* IBM866&lt;br /&gt;
* ISO-2022-CN&lt;br /&gt;
* ISO-2022-JP&lt;br /&gt;
* ISO-2022-KR&lt;br /&gt;
* ISO-8859-1&lt;br /&gt;
* ISO-8859-10&lt;br /&gt;
* ISO-8859-11&lt;br /&gt;
* ISO-8859-13&lt;br /&gt;
* ISO-8859-14&lt;br /&gt;
* ISO-8859-15&lt;br /&gt;
* ISO-8859-16&lt;br /&gt;
* ISO-8859-2&lt;br /&gt;
* ISO-8859-3&lt;br /&gt;
* ISO-8859-4&lt;br /&gt;
* ISO-8859-5&lt;br /&gt;
* ISO-8859-6&lt;br /&gt;
* ISO-8859-6-E&lt;br /&gt;
* ISO-8859-6-I&lt;br /&gt;
* ISO-8859-7&lt;br /&gt;
* ISO-8859-8&lt;br /&gt;
* ISO-8859-8-E&lt;br /&gt;
* ISO-8859-8-I&lt;br /&gt;
* ISO-8859-9&lt;br /&gt;
* ISO-IR-111&lt;br /&gt;
* KOI8-R&lt;br /&gt;
* KOI8-U&lt;br /&gt;
* Shift_JIS&lt;br /&gt;
* T.61-8bit&lt;br /&gt;
* TIS-620&lt;br /&gt;
* UTF-16&lt;br /&gt;
* UTF-16BE&lt;br /&gt;
* UTF-16LE&lt;br /&gt;
* UTF-32&lt;br /&gt;
* UTF-32BE&lt;br /&gt;
* UTF-32LE&lt;br /&gt;
* UTF-7&lt;br /&gt;
* UTF-8&lt;br /&gt;
* VISCII&lt;br /&gt;
* armscii-8&lt;br /&gt;
* gb18030&lt;br /&gt;
* us-ascii&lt;br /&gt;
* windows-1250&lt;br /&gt;
* windows-1251&lt;br /&gt;
* windows-1252&lt;br /&gt;
* windows-1253&lt;br /&gt;
* windows-1254&lt;br /&gt;
* windows-1255&lt;br /&gt;
* windows-1256&lt;br /&gt;
* windows-1257&lt;br /&gt;
* windows-1258&lt;br /&gt;
* windows-874&lt;br /&gt;
* windows-936&lt;br /&gt;
* x-euc-tw&lt;br /&gt;
* x-gbk&lt;br /&gt;
* x-imap4-modified-utf7&lt;br /&gt;
* x-johab&lt;br /&gt;
* x-mac-arabic&lt;br /&gt;
* x-mac-ce&lt;br /&gt;
* x-mac-croatian&lt;br /&gt;
* x-mac-cyrillic&lt;br /&gt;
* x-mac-devanagari&lt;br /&gt;
* x-mac-farsi&lt;br /&gt;
* x-mac-greek&lt;br /&gt;
* x-mac-gujarati&lt;br /&gt;
* x-mac-gurmukhi&lt;br /&gt;
* x-mac-hebrew&lt;br /&gt;
* x-mac-icelandic&lt;br /&gt;
* x-mac-roman&lt;br /&gt;
* x-mac-romanian&lt;br /&gt;
* x-mac-turkish&lt;br /&gt;
* x-user-defined&lt;br /&gt;
* x-viet-tcvn5712&lt;br /&gt;
* x-viet-vps&lt;br /&gt;
* x-windows-949&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== postData ===&lt;br /&gt;
Supplying postData will make Ubiquity use POST instead of GET when retrieving the results. It can be either a string ie: &amp;quot;q={QUERY}&amp;amp;hl=en&amp;quot; or as an object ie:&lt;br /&gt;
&amp;lt;code&amp;gt;{&amp;quot;q&amp;quot;: &amp;quot;{QUERY}&amp;quot;, &amp;quot;hl&amp;quot;: &amp;quot;en&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== parser ===&lt;br /&gt;
The parser makes it easy for you as a developer to provide an interactive preview with search results, consistent with other Ubiquity search commands.&lt;br /&gt;
&lt;br /&gt;
Via a number of options, you can tell mSC how to parse the data returned by the search provider.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; all selectors used in the following sections are either paths into the json data in dot-notation, or [http://docs.jquery.com/Selectors jQuery selectors]. Note that the latter are &#039;&#039;&#039;&#039;&#039;NOT&#039;&#039;&#039;&#039;&#039; CSS selectors albeit very similar. Some features you might be used to from CSS are missing, whilst others still are added. Which you should use depend on your choice of [[#type]]&lt;br /&gt;
&lt;br /&gt;
==== type ====&lt;br /&gt;
mSC supports two types of parsers, namely &amp;quot;json&amp;quot; and &amp;quot;html&amp;quot;. If not specified, it assumes you want the html parser.&lt;br /&gt;
&lt;br /&gt;
==== url ====&lt;br /&gt;
Alternative url used in case the preview uses a different service or API than the execute function, ie: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== container ====&lt;br /&gt;
If using the html parser, this must be a selector that matches each result, thus returning a list of result containers. When using the json parser it must match the parent of all the results, ie: &amp;quot;responseData.results&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It is important to note that in the case of the html parser, all details for each individual result must be contained in each container.&lt;br /&gt;
&lt;br /&gt;
==== title ====&lt;br /&gt;
Selector for the title of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as title.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This options is required if you use the parser.&lt;br /&gt;
&lt;br /&gt;
==== preview ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
==== href ====&lt;br /&gt;
Selector for the preview of the result. If using the html parser, it can alternatively be a function that receives a single argument (the jQuery result object) and must return a string that will be used as preview.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NB:&#039;&#039;&#039; This option can usually be left out. If not present, mSC will attempt to find an anchor in the result matched by the [[#title]] option.&lt;br /&gt;
&lt;br /&gt;
==== thumbnail ====&lt;br /&gt;
Selector for the preview of the result. If this does not match an image element, mSC will look for a child element that is an image, and use the first found as thumbnail.&lt;br /&gt;
&lt;br /&gt;
==== maxResults ====&lt;br /&gt;
Integer specifying the maximum number of results displayed in the Ubiquity preview. If not specified, it will default to 4.&lt;br /&gt;
&lt;br /&gt;
==== baseurl ====&lt;br /&gt;
String used as base url if [[#href]] is found to be relative. If not provided, [[#url]] will be used instead.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
mSC passes on the options it gets to CmdUtils.CreateCommand, so most options not mentioned here but available in CreateCommand can be passed as well. Most notably are the meta data documented in [[Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial#Documentation_and_Metadata]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== The bare essentials ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Adding a preview ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;YouTube&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.youtube.com/results?search_type=&amp;amp;search_query={QUERY}&amp;amp;aq=f&amp;quot;,&lt;br /&gt;
   parser: {container: &amp;quot;div.video-entry&amp;quot;,&lt;br /&gt;
            title: &amp;quot;div.video-long-title a&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;div.video-description&amp;quot;,&lt;br /&gt;
            thumbnail: &amp;quot;img.vimg120&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using the JSON parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;Google&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.google.com/search?q={QUERY}&amp;quot;,&lt;br /&gt;
   parser: {type: &amp;quot;JSON&amp;quot;,&lt;br /&gt;
            url: &amp;quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;amp;q={QUERY}&amp;quot;,&lt;br /&gt;
            container: &amp;quot;responseData.results&amp;quot;,&lt;br /&gt;
            title: &amp;quot;titleNoFormatting&amp;quot;,&lt;br /&gt;
            preview: &amp;quot;content&amp;quot;,&lt;br /&gt;
            href: &amp;quot;url&amp;quot;}&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Using functions in the parser ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   name: &amp;quot;MovieZoo&amp;quot;,&lt;br /&gt;
   url: &amp;quot;http://www.moviezoo.dk/alle-produkter/soeg/{QUERY}&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;table.nyhedsbrev_tabel2&amp;quot;,&lt;br /&gt;
     title: &amp;quot;tr:nth-child(2) tr tr:first-child b&amp;quot;,&lt;br /&gt;
     href: function(c) {return jQuery(&amp;quot;a.nyhedsbrev&amp;quot;,c).attr(&amp;quot;href&amp;quot;);},&lt;br /&gt;
     preview: function(c) {var p = &amp;quot;&amp;quot;; jQuery(&amp;quot;table table tr:not(:first)&amp;quot;,c).each(function(){p += jQuery(this).text()+&amp;quot;&amp;lt;br&amp;gt;&amp;quot;;});return p;},&lt;br /&gt;
     thumbnail: &amp;quot;img.lister_img&amp;quot;,&lt;br /&gt;
     maxResults: 3&lt;br /&gt;
   }&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Searching with a different charset ===&lt;br /&gt;
 CmdUtils.makeSearchCommand({&lt;br /&gt;
   names: [&amp;quot;video.baidu&amp;quot;, &amp;quot;百度视频&amp;quot;],&lt;br /&gt;
   url: &amp;quot;http://video.baidu.com/v?word={QUERY}&amp;quot;,&lt;br /&gt;
   charset: &amp;quot;gb2312&amp;quot;,&lt;br /&gt;
   parser: {&lt;br /&gt;
     container: &amp;quot;#result td&amp;quot;,&lt;br /&gt;
     title: &amp;quot;.r a&amp;quot;,&lt;br /&gt;
     thumbnail: &amp;quot;img&amp;quot;,&lt;br /&gt;
     maxResults: 20,&lt;br /&gt;
   },&lt;br /&gt;
 });&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=User:Satyr&amp;diff=172269</id>
		<title>User:Satyr</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=User:Satyr&amp;diff=172269"/>
		<updated>2009-09-30T12:59:24Z</updated>

		<summary type="html">&lt;p&gt;Satyr: test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://ubigist.appspot.com/&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial&amp;diff=170232</id>
		<title>Labs/Ubiquity/Ubiquity 0.1 Development Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial&amp;diff=170232"/>
		<updated>2009-09-23T15:46:43Z</updated>

		<summary type="html">&lt;p&gt;Satyr: outdated info correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Note: these instructions cover development through current versions of Ubiquity, including versions 0.5.x.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you just want to write new commands for Ubiquity, you should read [https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial the Command Author Tutorial] instead.  This page is about how to do development on the Ubiquity core.&lt;br /&gt;
&lt;br /&gt;
= Getting Set Up =&lt;br /&gt;
&lt;br /&gt;
== Getting the Source ==&lt;br /&gt;
&lt;br /&gt;
It is pretty easy to get involved with the development of Ubiquity. Start off by introducing yourself on the irc channel [irc://irc.mozilla.org/ubiquity #ubiquity] on [http://irc.mozilla.org/ irc.mozilla.org].&lt;br /&gt;
&lt;br /&gt;
You will need to have [http://www.python.org Python] installed, preferably Python 2.5.  (If you are on Mac OS X, you have Python already.)  We use Python instead of Make for our build script.&lt;br /&gt;
&lt;br /&gt;
We use [http://www.selenic.com/mercurial/wiki/ Mercurial], called &amp;quot;Hg&amp;quot; for short, for version control. It is very easy to install if you&#039;ve got Python 2.5 with setuptools. Just type:&lt;br /&gt;
&lt;br /&gt;
  easy_install Mercurial&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have setuptools, you can also install Hg the old-fashioned way, by downloading it from [http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages www.selenic.com].&lt;br /&gt;
&lt;br /&gt;
Once installed, you will be able to checkout the current source using the command:&lt;br /&gt;
&lt;br /&gt;
  hg clone https://ubiquity.mozilla.com/hg/ubiquity-firefox&lt;br /&gt;
&lt;br /&gt;
This will put a copy of the Ubiquity source into the home directory on your computer.  You need execute all the hg commands below from inside that directory.&lt;br /&gt;
&lt;br /&gt;
== Installing the Source Version of the Extension ==&lt;br /&gt;
&lt;br /&gt;
Uninstall your current version of Ubiquity from your Firefox Addons and then run:&lt;br /&gt;
&lt;br /&gt;
  python manage.py install --profile=&amp;lt;profile name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Replace &amp;lt;profile name&amp;gt; with the name of the profile into which you prefer to install the extension.)&lt;br /&gt;
&lt;br /&gt;
If you haven&#039;t created any profiles, then the profile you are using is called &#039;default&#039;.  To install Ubiquity into the default profile, do this:&lt;br /&gt;
&lt;br /&gt;
  python manage.py install --profile=default&lt;br /&gt;
&lt;br /&gt;
This will generate a new build of the Ubiquity extension from the source checkout and install it with your local Firefox instance.&lt;br /&gt;
&lt;br /&gt;
Now you are all set to become a pro Ubiquity hacker!&lt;br /&gt;
&lt;br /&gt;
== Uninstalling Ubiquity ==&lt;br /&gt;
&lt;br /&gt;
Just run&lt;br /&gt;
&lt;br /&gt;
 python manage.py uninstall&lt;br /&gt;
&lt;br /&gt;
optionally specifying a profile name/directory if necessary.  Alternatively, you can also uninstall the extension through the normal Firefox addon management UI.&lt;br /&gt;
&lt;br /&gt;
== Building an XPI ==&lt;br /&gt;
&lt;br /&gt;
You generally won&#039;t need to build an XPI when doing development, unless you&#039;re working on a final version intended for release to end-users.&lt;br /&gt;
&lt;br /&gt;
To build an XPI for Ubiquity, just run:&lt;br /&gt;
&lt;br /&gt;
  python manage.py xpi&lt;br /&gt;
&lt;br /&gt;
This will create an XPI with the name &amp;quot;ubiquity-&amp;lt;version&amp;gt;.xpi&amp;quot;, where&lt;br /&gt;
&amp;quot;&amp;lt;version&amp;gt;&amp;quot; is taken from the contents of the &amp;quot;em:version&amp;quot; element in the&lt;br /&gt;
&amp;quot;ubiquity/install.rdf&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
&lt;br /&gt;
If you want to start writing code for Ubiquity, you &amp;lt;b&amp;gt;need&amp;lt;/b&amp;gt; to follow the [http://developer.mozilla.org/en/JavaScript_style_guide Mozilla&#039;s Javascript style guide] (especially with respect to indentation and variable naming). This helps to maintain consistency in Ubiquity&#039;s code.&lt;br /&gt;
&lt;br /&gt;
(TODO: find a style guide for HTML + CSS)&lt;br /&gt;
&lt;br /&gt;
The heart of the code can be found in the subdirectories:&lt;br /&gt;
&lt;br /&gt;
   ubiquity/modules/   &lt;br /&gt;
   ubiquity/chrome/content/&lt;br /&gt;
&lt;br /&gt;
To get started, you may want to first take a look at the built-in and standard commands, which are in the files:&lt;br /&gt;
&lt;br /&gt;
   ubiquity/builtin-feeds/builtincmds.js&lt;br /&gt;
   ubiquity/standard-feeds/*.js&lt;br /&gt;
   ubiquity/standard-feeds/*.xhtml&lt;br /&gt;
&lt;br /&gt;
The feeds are dynamically loaded, so if you make any changes to them, all you have to do is save the file, then go back to Firefox and bring up Ubiquity again.  Your changes will be reflected immediately.  There&#039;s no need to rebuild your extension or restart Firefox.&lt;br /&gt;
&lt;br /&gt;
If you make changes to other files -- parts of the core such as the parser or built-in nountypes, that are not dynamically loaded -- you will have to restart Firefox.  Even in this case, there is no need for you to keep on rebuilding your extension.  Once you&#039;ve run python manage.py for the first time to install the extension, as described above, you shouldn&#039;t need to run it again.  Just save the source file and restart Firefox and whatever changes you&#039;ve made will be reflected in Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Don&#039;t Forget to Test ==&lt;br /&gt;
&lt;br /&gt;
Make sure you run the test suite before committing your changes. From the root directory of your checkout, run:&lt;br /&gt;
&lt;br /&gt;
    python manage.py test&lt;br /&gt;
&lt;br /&gt;
That will only work if you have xpcshell installed.  If you have built Mozilla from source, you should have xpcshell on your system.  If you don&#039;t have it, another way to run the same test suite is by visiting this page:&lt;br /&gt;
&lt;br /&gt;
  chrome://ubiquity/content/test.html&lt;br /&gt;
&lt;br /&gt;
Due to slight differences between running javascript code in xpcshell on the command line, and running it in an html page, a test occasionally will fail on the html page even though it succeeds on the command line.  In that case, you can ignore the failure on the html page. To be specific, you can ignore the following error message:&lt;br /&gt;
&lt;br /&gt;
 Error in test testSandboxSupportsJs17: missing ; before statement (in chrome://ubiquity/content/sandboxfactory.js, line 23)&lt;br /&gt;
&lt;br /&gt;
== Keeping Up to Date ==&lt;br /&gt;
&lt;br /&gt;
I recommend that you frequently update your repository to get the latest changes from the central repository.  In case you&#039;re not familiar with using Mercurial, pulling the code is a two-step process:&lt;br /&gt;
&lt;br /&gt;
 hg pull&lt;br /&gt;
 hg update&lt;br /&gt;
&lt;br /&gt;
You can also view the latest changes to the central repository on the web at [https://ubiquity.mozilla.com/hg/ubiquity-firefox/ ubiquity.mozilla.com].&lt;br /&gt;
&lt;br /&gt;
== Finding Something to Work On ==&lt;br /&gt;
&lt;br /&gt;
We use [http://wiki.mozilla.org/index.php?Ubiquity this Wiki] and [http://getsatisfaction.com/mozilla/products/mozilla_ubiquity GetSatisfaction] as places to get feature requests and bug reports. These feed into an internal Trac-based [https://ubiquity.mozilla.com/trac/report/1 ticketing system].&lt;br /&gt;
&lt;br /&gt;
Login to [https://ubiquity.mozilla.com/trac/report/1 the Trac] using an OpenID account. Look for unassigned tickets (these are the ones that say &amp;quot;New&amp;quot; in the status column as opposed to &amp;quot;Assigned&amp;quot;).  You can also search for the keyword &amp;quot;[http://ubiquity.mozilla.com/trac/search?q=good-for-beginners good-for-beginners]&amp;quot;.  Check out what needs to be done, add things appropriately, choose unassigned tickets and start hacking!&lt;br /&gt;
&lt;br /&gt;
== Submitting Patches ==&lt;br /&gt;
&lt;br /&gt;
When you&#039;re starting out with development, you won&#039;t have push access to the central hg repository.  The best way for you to submit your changes is by creating a source code diff and attaching it to the Trac ticket that you&#039;re working on.  The command line is like this:&lt;br /&gt;
&lt;br /&gt;
 hg diff &amp;gt; filename.diff&lt;br /&gt;
&lt;br /&gt;
Note: In order for patches to be accepted, you &amp;lt;b&amp;gt;need&amp;lt;/b&amp;gt; to follow the [http://developer.mozilla.org/en/JavaScript_style_guide Mozilla&#039;s Javascript style guide] (especially with respect to indentation and variable naming). This helps to maintain consistency in Ubiquity&#039;s code.&lt;br /&gt;
&lt;br /&gt;
Then, on the Trac ticket page, click the &amp;quot;Attach file&amp;quot; button and choose the file you just created.  Add a bit of explanation about your changes, and click &amp;quot;Submit changes&amp;quot;.  Don&#039;t change the status of the ticket yet.&lt;br /&gt;
&lt;br /&gt;
One of the core developers will review your patch and, if it&#039;s found to be good, will commit it to the core repository and close the ticket.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve been developing for a while and have had some patches accepted, someone from the core development team (having noticed how awesome you are) will contact you to talk about getting you direct push access to the repository.&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Commands_In_The_Wild&amp;diff=169619</id>
		<title>Labs/Ubiquity/Commands In The Wild</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Commands_In_The_Wild&amp;diff=169619"/>
		<updated>2009-09-21T20:32:26Z</updated>

		<summary type="html">&lt;p&gt;Satyr: google++&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LEGAL NOTICE: Mozilla is providing links to these third-party Ubiquity commands as a courtesy, and makes no representations regarding the commands or any information related there to. Any questions, complaints or claims regarding the commands must be directed to the appropriate developer or software vendor.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Commands in the Wild &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Please note that the main way we&#039;d like commands to be distributed and shared in the future is via [http://ubiquity.mozilla.com/herd/ The Ubiquity Herd].  Right now there isn&#039;t any social functionality on the Herd, though, which is why we&#039;re using this page to allow for user-contributed commentary and discussion.  At some point in the near future we&#039;ll be adding this kind of functionality to the Herd and will migrate the content on this page there.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; There Be Dragons Here &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pioneering can be crazy fun, but also a bit dangerous. The commands referenced here have not been reviewed by Mozilla. They may contain malicious code, so use them only at your own risk. Until Ubiquity becomes more mature, we recommend only adding commands that come from people you trust, or if you&#039;ve read the code and know that they are safe.&lt;br /&gt;
&lt;br /&gt;
Beware that even if you review the code before subscribing, the code may be subject to change from the publisher, and your copy will automatically update on firefox restart. This problem will be remedied in later versions of Ubiquity.&lt;br /&gt;
&lt;br /&gt;
=Country specific Commands=&lt;br /&gt;
==AR==&lt;br /&gt;
*[http://kontrolakka.tumblr.com/post/143086887/ubiquity-google-search-argentina Google Argentina]: Searches only in Google Argentina (www.google.com.ar) for your words and sets the search to &amp;quot;páginas de Argentina&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==AT==&lt;br /&gt;
*[http://gist.github.com/25096 gist.github.com/25096]: ÖBB Railway time table search&lt;br /&gt;
*[http://www.oststrom.com/ubiquity oebb railway time table search]: *updated* OEBB Railway time table search, parser2 compatible, preview and geolocation&lt;br /&gt;
&lt;br /&gt;
==BG==&lt;br /&gt;
*[http://gist.github.com/179119 .BG search] - you can use this command to search some of bulgarian portals such as Dnevnik, dir.bg and gbg (more comming soon). Just install and try &amp;quot;търси&amp;quot; command.There is Ajax function inside for handling different encodings (utf8 and windows-1251)&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/182349 Smali.me] - you can use smali.me short url service from your ubiquity app. Just wtite &#039;smali&#039; or &#039;смали&#039; and see the result.&lt;br /&gt;
&lt;br /&gt;
==BR==&lt;br /&gt;
*[http://minhavidaorientadaaobjetos.blogspot.com/2009/01/buscap-ubiquity-compare-produtos.html Buscape Command]: Compare products quickly in Buscapé&lt;br /&gt;
*[http://minhavidaorientadaaobjetos.blogspot.com/2009/01/americanascom-para-ubiquity-facilitando.html Americanas.com Command]: Search for products at Americanas.com&lt;br /&gt;
*[http://gist.github.com/65907 lyrics a.k.a. letras]: Search for lyrics at letras.mus.br&lt;br /&gt;
*[http://gist.github.com/65903 whois-br]: Whois search for brazilian hosts (registro.br)&lt;br /&gt;
*[http://gist.github.com/127358 cardapio-ceset]: Shows the menu of the University Restaurant of FATEL-UNICAMP (College of Technology of the State University of Campinas)&lt;br /&gt;
*[http://gist.github.com/159208 MercadoLivre Command]: Search for products at mercadolivre.com.br&lt;br /&gt;
&lt;br /&gt;
==CA==&lt;br /&gt;
* [http://mricon.com/ubi/ Montréal Transit]: Look up STM bus and AMT train schedules&lt;br /&gt;
&lt;br /&gt;
==CH==&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;SBB CFF FFS&#039;&#039;&#039;]: Swiss Railway time table search for [http://www.sbb.ch SBB CFF FFS]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Tel.Search.ch&#039;&#039;&#039;]: Swiss Phone Book search from [http://tel.search.ch tel.search.ch]&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swiss Teletext&#039;&#039;&#039;]: Swiss Teletext page browser. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Rete 3&#039;&#039;&#039;]: visualizza le ultime canzoni in onda su [http://rete3.rtsi.ch/ Rete 3]. Puoi trovare degli screen shot [http://frigi.ch/ubiquity/screenshot qui].&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Meteo-local&#039;&#039;&#039;]: show the calculated meteo for a location. Information from [http://www.meteosvizzera.admin.ch Federal Office of Meteorology and Climatology]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Meteo-radar&#039;&#039;&#039;]: show the last radar image from [http://www.meteosvizzera.admin.ch Federal Office of Meteorology and Climatology]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Slf&#039;&#039;&#039;]: show the latest avalanche bulletin from [http://www.slf.ch Institute for Snow and Avalanche Research SLF]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swisswebcams&#039;&#039;&#039;]: show a random webcam image from the site [http://www.swisswebcams.ch Swisswebcams]. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
*[http://www.frigi.ch/ubiquity &#039;&#039;&#039;Swiss News&#039;&#039;&#039;]: show the last 10 news titles from the most popular swiss web site&#039;s. You can find some screen shot [http://frigi.ch/ubiquity/screenshot here].&lt;br /&gt;
&lt;br /&gt;
==CN==&lt;br /&gt;
* [http://gist.github.com/51784 jiwai]: Command for posting to jiwai.de, a microblogging service in China. For information [http://damienh.org/2009/01/25/ubiquity%e5%8f%bd%e6%ad%aa%e5%91%bd%e4%bb%a4%e5%8a%a0%e5%bc%ba%e7%89%88/ check here].&lt;br /&gt;
*[http://ubidu.sourceforge.net/ ubidu]: Search Baidu.com, the No.1 search engine in China.&lt;br /&gt;
* [http://17th.name/wp-content/uploads/2008/09/fanfou.html Fanfou Command] - post to Fanfou.com (??)&lt;br /&gt;
* [http://www.utblog.com/tools/ubiquity/yodao-dict.htm Youdao or Yodao Dict Search Command] - Translate english to chinese and vice versa through dict.yodao.com service.&lt;br /&gt;
* [http://gist.github.com/25703 Translate word with dict.cn ] - Translate word with dict.cn, both English to Chinese or Chinese to English. (Please re-insatll it for supporting of new API.)&lt;br /&gt;
* [http://gist.github.com/31480 Search in douban] - Search douban items for movie/music/book/generic. With live preview of search results. See a screen shot [http://desktable.blogbus.com/logs/32090698.html here].&lt;br /&gt;
* [http://gist.github.com/49305 Search in Jukuu] - Retrive a word’s pronounce and example sentences from www.jukuu.com, supports English-Chinese and Chinese-English translations. See a screen shot [http://sealence.x10hosting.com/wordpress/?p=61 here].&lt;br /&gt;
* [http://gist.github.com/49422 Recite word everyday on iciba.com] - Retrieving 5 words from the every day recite word lists from www.iciba.com. None input for today’s word, input date string like “2009-1-19″ to retrieve previous day. See a screen shot [http://sealence.x10hosting.com/wordpress/?p=63 here].&lt;br /&gt;
* [http://gist.github.com/88796 Show Chinese Stock] - Show the current price and chart of Chinese Stock, usage: &amp;quot;cnstock jlad in daily&amp;quot; or &amp;quot;cnstock 000623&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==CZ==&lt;br /&gt;
* [http://ubiquity.wegguy.cz/idos/ idos]: Search Czech public transport connections&lt;br /&gt;
&lt;br /&gt;
==DE==&lt;br /&gt;
* [http://gist.github.com/170561 verwandt.de]: Searches verwandt.de for profiles (with preview map for Germany).&lt;br /&gt;
* [http://www.gutegutscheine.de/blog/gutegutscheine-de-ubiquity-command/ gutegutscheine.de]: Searches www.gutegutscheine.de for coupons.&lt;br /&gt;
* [http://gist.github.com/174663 bahn.de]: Searches for train connection and current arrival / departure tables for all train stations in Europe. Live data about delays is only available for Deutsche Bahn (Zugauskunft der DB AG wird genutzt).&lt;br /&gt;
* [http://daniel.lomm.es/projects/ubiquity-vrr vrr]: Searches for timetables for trains, trams and buses in the Rhein-Ruhr region.&lt;br /&gt;
* [http://digioso.org/cgi-bin/ubiquity/amazonde.pl Amazon-DE]: Searches Amazon Germany&lt;br /&gt;
* [http://digioso.org/cgi-bin/ubiquity/googlede.pl Google-DE]: Searches Google Germany&lt;br /&gt;
* [http://digioso.org/cgi-bin/ubiquity/ebayde.pl eBay-DE]: Search for an item on eBay Germany&lt;br /&gt;
* [http://digioso.org/cgi-bin/ubiquity/leo.pl Leo Translation]: Translates a word with Leo English &amp;lt;&amp;gt; German or with all languages with this command: http://frigi.ch/ubiquity&lt;br /&gt;
* [http://gist.github.com/180334 heise.de Preisvergleich]: Searches on heise.de Preisvergleich for price comparisons.&lt;br /&gt;
&lt;br /&gt;
==DK==&lt;br /&gt;
* [http://u.ter.dk/mitkbh mitkbh]: search locations and reviews in Copenhagen&lt;br /&gt;
* [http://u.ter.dk/tv tv]: Danish tv guide&lt;br /&gt;
&lt;br /&gt;
==FI==&lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/eat/ eat]: twelve city specific (e.g. eat-helsinki) finnish restaurant searches from eat.fi&lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/vapaa-aikavirasto/vapaa-aikavirasto.htm vapaa-aikavirasto]: fi-nationwide restaurant/bar search from vapaa-aikavirasto.com&lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/horeca/viini/viini.htm viini]: wine review search from viiniweb.net&lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/jalkapallo/suomencup.htm suomencup]: search material related to finnish cup football from suomencup.net wiki &lt;br /&gt;
*[http://www.juhamakkonen.com/ubiquity/commands/finland/jalkapallo/veikkausliiga.htm veikkausliiga]: rss news feeds from veikkausliiga football teams&lt;br /&gt;
&lt;br /&gt;
==FR==&lt;br /&gt;
*[http://baruchel.free.fr/~thomas/code/ubiquity/amazon/ amazon.fr]: Search books on Amazon.fr.&lt;br /&gt;
&lt;br /&gt;
==KR==&lt;br /&gt;
*[http://dotnet.pe.kr/ubiquity/me2day_ubiquity.html me2day] - Enables ubiquity to send posts to me2DAY(http://me2day.net) a Korean microblogging site. setme2daykey command sets the username and userkey that is required for posting.&lt;br /&gt;
*[http://sites.google.com/site/coosgadgets/east-asian-language-romanization korean] - Romanization of Korean language (Hangul)&lt;br /&gt;
&lt;br /&gt;
==IN==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/156384  meaning_in_hindi]- give the meaning of enlish word in hindi&lt;br /&gt;
*[http://gist.github.com/156386  show_lyrics ]- show the lyrics of a hindi song&lt;br /&gt;
*[http://gist.github.com/156389  map_directions]- show the diretions between two places in India &lt;br /&gt;
*[http://gist.github.com/156397  tv_guide] show you the timing of a serial&lt;br /&gt;
*[http://gist.github.com/156401 university_search] let you search about university for  a particular course&lt;br /&gt;
*[http://gist.github.com/163454 nse] - provides NSE stock exchange quotes,index information,gainers,losers. Also provide company search.&lt;br /&gt;
&lt;br /&gt;
==IT==&lt;br /&gt;
*[http://gstefanoni.netsons.org/ubiquity/treni-from.html treni-from] - Searches for the next available train on the selected route on the Trenitalia network (NOT Found)&lt;br /&gt;
*[http://gist.github.com/145261 GarzantiLinguistica.it] - Italian &amp;lt;=&amp;gt; English and Italian &amp;lt;=&amp;gt; French Dictionary, Italian Dictionary, Italian/English/French Verb Conjugator&lt;br /&gt;
*[http://gist.github.com/155868 televideo] - Script for quick access to Italian public teletext&lt;br /&gt;
&lt;br /&gt;
==JA==&lt;br /&gt;
*[http://gist.github.com/8346 eijiro] - Japanese &amp;lt;=&amp;gt; English&lt;br /&gt;
*[http://sites.google.com/site/coosgadgets/east-asian-language-romanization japanese] - Japanese &amp;lt;=&amp;gt; English with Romaji&lt;br /&gt;
&lt;br /&gt;
==NO==&lt;br /&gt;
* [http://skogvoldconsulting.no/ubiquity/1881/ 1881.no]: Norwegian phone book online.&lt;br /&gt;
* [http://skogvoldconsulting.no/ubiquity/posten/ Sporing p&amp;amp;aring; posten.no]: Norwegian mail tracking&lt;br /&gt;
&lt;br /&gt;
==NL==&lt;br /&gt;
* [http://gist.github.com/35909 vandale]: For looking up words in the free online version of the leading Dutch dictionary: Van Dale.&lt;br /&gt;
* [http://gist.github.com/59840 hyves-zoek]: For looking for people on the social networking site Hyves.&lt;br /&gt;
* [http://kok.thuis99.org/telbo telbo]: For looking up telephone numbers via http://www.telefoongids.nl/&lt;br /&gt;
&lt;br /&gt;
==NZ==&lt;br /&gt;
* [http://tommo39.com/trademe.html trademe]: Searches trademe.co.nz for whatever item you are looking for.&lt;br /&gt;
&lt;br /&gt;
==PT==&lt;br /&gt;
*[http://gist.github.com/19991 priberam] - Looks up a word in the Priberam Portuguese dictionary [http://priberam.pt/dlpo/ Priberam] (Homepage [http://sites.google.com/site/edgargoncalves/work/software/ubiquity here])&lt;br /&gt;
&lt;br /&gt;
==RO==&lt;br /&gt;
* [http://avatars.postiton.net/ avatars] - Search Avatars in English and add to your emails [http://avatars.postiton.net/ avatars.postiton.net]&lt;br /&gt;
* [http://avatare.afisatepe.net/ avatar] - Search Avatar in Romanian and add to your emails [http://avatare.afisatepe.net/ avatare.afisatepe.net]&lt;br /&gt;
&lt;br /&gt;
==RS==&lt;br /&gt;
* [http://gist.github.com/11398 sr-map] - Search maps of major Serbian cities using [http://mape.b92.net mape.b92.net]&lt;br /&gt;
&lt;br /&gt;
==RU==&lt;br /&gt;
*[http://gist.github.com/179881 lingvo] - Looks up a word in the Lingvo dictionary&lt;br /&gt;
&lt;br /&gt;
==SE==&lt;br /&gt;
* [http://raymond.bergmark.googlepages.com/hitta.htm Eniro]: Swedish phone book online.&lt;br /&gt;
* [http://gist.github.com/113738 Hitta.se]: Search hitta.se.&lt;br /&gt;
* [http://www.web.cinaird.se/ubiquity/index.php?dir=hitta Hitta.se for Ubiquity 0.5]: Search hitta.se, compatible with Ubiquity 0.5.&lt;br /&gt;
* [http://www.web.cinaird.se/ubiquity/index.php?dir=kolli Posten.se]: Trace package in sweden with Posten.se.&lt;br /&gt;
&lt;br /&gt;
==TR==&lt;br /&gt;
* [http://burakcelebi.googlepages.com/ubiquity-eksisozluk.html EksiSozluk Commands] - Commands for http://sozluk.sourtimes.org&lt;br /&gt;
&lt;br /&gt;
* [http://www.deniz.web.tr/ubiquity cevir] - Turkish - English translation command.&lt;br /&gt;
&lt;br /&gt;
* [http://www.azizce.com/wp-content/ubiquity/tdk.html Turk Dil Kurumu &#039;nda Arama] - Fast search command for [http://www.tdk.gov.tr/ Official TDK Website].&lt;br /&gt;
&lt;br /&gt;
* [http://www.verisux.com/ubi-seslisozluk.html seslisozluk] - Integration with seslisozluk.com for quick enlish/german/turkish translations&lt;br /&gt;
&lt;br /&gt;
==TW==&lt;br /&gt;
*[http://linlichangjen.googlepages.com/ubiquity ydic]: Translate English word to Tratitional Chinese&lt;br /&gt;
&lt;br /&gt;
*[http://fortelin.net78.net/ubiquity/2r 2r, another extended version of twitter command]: with url shortened and edit dialogue function, enjoy it ^^&lt;br /&gt;
&lt;br /&gt;
*[http://fortelin.net78.net/ubiquity/soso soso Command for Ubiquity]:another extended, tabbed version of the google command.&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/84548 tw-stock]: Quote a stock symbol from Taiwan Stock Exchange&lt;br /&gt;
==UK==&lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK&lt;br /&gt;
&lt;br /&gt;
*[http://www.red-eyed.org.uk/ubiquity.html amazonuk]: Search Amazon.co.uk for any item. A version of amazon-search-all customised for the UK version of the Amazon site.&lt;br /&gt;
&lt;br /&gt;
*[http://tevp.net/projects/ubiquity/ journey]: Searches the TfL journeyplanner for a destination. Currently has hardcoded start point and walking speed.&lt;br /&gt;
&lt;br /&gt;
*[http://tat.wright.name/ubiquity-tfl tfl-directions]: Improved TfL journeyplanner based on the above. Start point is not hard coded. (Requires ubiquity 0.5) &lt;br /&gt;
&lt;br /&gt;
*[http://www.socialanimal.com/pubs/ubiquity.htm pubfinder]: Looks for pubs in the specified place or postcode.&lt;br /&gt;
&lt;br /&gt;
*[http://choffee.co.uk/Ubiquity trainuk]: Simple interface to search for train times in the UK.&lt;br /&gt;
&lt;br /&gt;
*[http://github.com/elson/ubiquity-bbc-iplayer/wikis/command-feed BBC iPlayer]: Watch or listen to recent programmes on BBC iPlayer&lt;br /&gt;
&lt;br /&gt;
==Multiple Countries==&lt;br /&gt;
*[http://garyhodgson.com/ubiquity/amazon.html amazon-locale]: Perform a &#039;Blended&#039; search on Amazon Germany, UK, USA, Japan or Canada.&lt;br /&gt;
&lt;br /&gt;
= Directory Search =&lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK&lt;br /&gt;
* [http://gist.github.com/65093 Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup with preview ]: English (Cambridge). See a screen shot [http://sealence.x10hosting.com/wordpress/?p=66 here].&lt;br /&gt;
&lt;br /&gt;
= Web Search =&lt;br /&gt;
&lt;br /&gt;
* OneLook Reverse Lookup - http://icecreamfactory.freehostia.com/ubiquity/reverse-lookup.html&lt;br /&gt;
&lt;br /&gt;
== Site-specific Search ==&lt;br /&gt;
&lt;br /&gt;
* Agentarius User-Agent-Info - http://www.agentarius.net&lt;br /&gt;
* All Music Guide - http://a9ej32w.googlepages.com/allmusic&lt;br /&gt;
* Allrecipes.com - http://www.javajill.com/ubiquity/recipe.html&lt;br /&gt;
* AltLaw - http://www.keysquaremedia.com/&lt;br /&gt;
* Archive.org - http://ubiquity.washing-up.co.uk/archive.html&lt;br /&gt;
* Aspectweb - http://annoq.aspectweb.org/uq.html&lt;br /&gt;
* Avatars - http://avatars.postiton.net&lt;br /&gt;
* Babylon - http://www.geocities.com/ubiquities1&lt;br /&gt;
* Beat Goes On - http://***.pixelcore.ca/bgo_ubiquity/ (Used CDs DVDs &amp;amp; Video Games)&lt;br /&gt;
* BibleGateway - http://www.zenorsoft.com/ubiquity.php (Looks up Bible Verses)&lt;br /&gt;
* Bing -http://gist.github.com/121595 (Search using Microsoft Bing)&lt;br /&gt;
* Bing - [http://gist.github.com/180834] Searches with result previews and keyword coloring&lt;br /&gt;
* BitDefender Virus Search - http://www.bitdefender.com/site/VirusInfo/browseVirusEnciclopedia/ (Search for viruses in BitDefender&#039;s Virus Encyclopedia)&lt;br /&gt;
* Blogsearch - http://gist.github.com/156383 &lt;br /&gt;
* BoardGameGeek - http://www.hunterandlori.com/ubiquity/&lt;br /&gt;
* Box Office Mojo - http://gist.github.com/165452&lt;br /&gt;
* Brainstorm #9 - http://www.brainstorm9.com.br&lt;br /&gt;
* Cambridge - http://sealence.x10hosting.com/wordpress/?p=66&lt;br /&gt;
* CharlieRose.com - http://erikvold.com/tools/ubiquity/charlierose/charlierose.cfm&lt;br /&gt;
* Common Lisp Hyperspec - http://common-lisp.net/project/lifp/ubiquity/clhs.htm&lt;br /&gt;
* Coxa Creme (Brazil) - http://gist.github.com/10795&lt;br /&gt;
* craigslist - http://labs.vunite.com/vubiqs/verbs.php&lt;br /&gt;
* Deal Extreme - http://skogvoldconsulting.no/ubiquity/dealextreme&lt;br /&gt;
* Demonoid - http://www.thecompgeek.info/ubiquity/demonoid.html&lt;br /&gt;
* Deezer - http://jacquin.pascal.free.fr/ubiquity/ (Search&amp;amp;listen music online)&lt;br /&gt;
* Dictionary.com - http://erikvold.com/tools/ubiquity/dictionary/dictionary.cfm&lt;br /&gt;
* Digg - http://captspify.is-a-geek.com/scripts/Home/Ubiquity (Searches Digg)&lt;br /&gt;
* dinehere.ca - http://dairong.googlepages.com/ubiquity.html&lt;br /&gt;
* Discogs - http://a9ej32w.googlepages.com/discogs&lt;br /&gt;
* eBay (geodetects your location and searches accordingly) - http://mskadu.googlepages.com/ebaysearch2&lt;br /&gt;
* EmacsWiki - http://ubiquity.chrononaut.net/emacswiki.html&lt;br /&gt;
* Engrish Funny - http://www.zentu.net/ubiq/engrishfunny.html&lt;br /&gt;
* eMule Content Database - http://gist.github.com/185090&lt;br /&gt;
* Failblog - http://www.zentu.net/ubiq/failblog.html&lt;br /&gt;
* Fileshunt - http://avid.me/ubi/fileshunt.html&lt;br /&gt;
* Filmweb.pl - http://gist.github.com/19735 http://gist.github.com/120581&lt;br /&gt;
* Firefox add-ons - http://www.rakudave.ch/?q=node/20&lt;br /&gt;
* Freebase - http://hamstersoup.com/freebase/ubiquity/&lt;br /&gt;
* Futureshop.ca - http://dairong.googlepages.com/ubiquity.html&lt;br /&gt;
* GamesCom.de - http://digioso.org/cgi-bin/ubiquity/gcsearch.pl&lt;br /&gt;
* Garzanti - http://gist.github.com/145261&lt;br /&gt;
* GitHub - http://ubiquity.chrononaut.net/github.html&lt;br /&gt;
* Google Image (with preview) - http://gist.github.com/10704&lt;br /&gt;
* Google Image Search (preview, links, embedding) - http://www.jimmy2k.it/getimagescommand&lt;br /&gt;
* Google Trends (with preview) - http://gist.github.com/10706&lt;br /&gt;
* Google Scholar - http://gist.github.com/180078&lt;br /&gt;
* Google Books - http://www.radiantweb.net/ubiquity/&lt;br /&gt;
* Goto webpage - http://gist.github.com/104240&lt;br /&gt;
* Gumtree - http://dave.org.uk/ubiquity/gumtree.html&lt;br /&gt;
* Hoogle - http://www.randomhacks.net/git/ubiquity/hoogle/&lt;br /&gt;
* Hotdog! LOLDogs - http://www.zentu.net/ubiq/hotdog.html&lt;br /&gt;
* Howjsay - http://gist.github.com/150109 (Talking Dictionary of English Pronunciation)&lt;br /&gt;
* Hulu - http://gist.github.com/51468&lt;br /&gt;
* Imdb (with preview) - http://gist.github.com/59109&lt;br /&gt;
* Iciba.com(irecite) - http://sealence.x10hosting.com/wordpress/?p=63&lt;br /&gt;
* Intershame.com - http://intershame.com/ubiquity/&lt;br /&gt;
* Jaiku - http://jonasnockert.com/2008/08/ubiquity-code-for-jaiku-search/&lt;br /&gt;
* Jiwa - http://jacquin.pascal.free.fr/ubiquity/ (Search&amp;amp;listen music online)&lt;br /&gt;
* Jukuu - http://sealence.x10hosting.com/wordpress/?p=61&lt;br /&gt;
* Kewego.fr - http://ht.ubiquity.googlepages.com/ubiquity-kewego.html&lt;br /&gt;
* Last.fm artist and album search - http://progoth.com/ubiquity-lastfm/&lt;br /&gt;
* Last.FM - http://static.isnotworking.com/lastfm-search.html&lt;br /&gt;
* Last.fm &amp;quot;advanced&amp;quot; - http://satf.se/projects/ubiquity-commands/ubiquity-advanced-lastfm-search/&lt;br /&gt;
* Last.fm Artist Lookup - http://gist.github.com/50505&lt;br /&gt;
* last.fm + grooveshark top 5 artists songs - http://gist.github.com/119223&lt;br /&gt;
* leo.org dictionary - http://users.kilu.de or http://frigi.ch/ubiquity&lt;br /&gt;
* LibraryThing - http://www.quicksilverillness.com/ubiquity/librarything_searches.html&lt;br /&gt;
*Lifehacker.com search - http://gist.github.com/47455&lt;br /&gt;
* Lifehacking tagcloud search - http://lifehacking.nl/web20/ubiquity-verbindt-het-web-weer/ (Dutch only!)&lt;br /&gt;
* Live - http://www.powerset.com&lt;br /&gt;
* LolCats latest image - http://members.optusnet.com.au/~crazyjane13/lolcats.html&lt;br /&gt;
* LoveFilm - http://dave.org.uk/ubiquity/lovefilm.html&lt;br /&gt;
* metacritic.com - http://dairong.googlepages.com/ubiquity.html&lt;br /&gt;
* metal-archives.com - http://people.iola.dk/arj/2008/09/02/adding-some-metal-to-ubiquity/&lt;br /&gt;
* Moviefone - http://gist.github.com/91224&lt;br /&gt;
* Mozilla Add-ons - http://projects.fligtar.com/ubiquity/add-on.php&lt;br /&gt;
* Mozilla Add-ons (by folarb) - http://gist.github.com/34678&lt;br /&gt;
* MusicBrainz - http://a9ej32w.googlepages.com/musicbrainz&lt;br /&gt;
* NCIX.com - http://dairong.googlepages.com/ubiquity.html&lt;br /&gt;
* netflix - http://radria.sqlfusion.com/ubiquity.php&lt;br /&gt;
* NewAdvent.org - http://gist.github.com/54249&lt;br /&gt;
* Newegg - http://test.fathomthat.org/ubiquity/newegg.html&lt;br /&gt;
* Newzbin - http://www.quicksilverillness.com/newzbin_search.html&lt;br /&gt;
* Orkut User Search - http://avid.me/ubi/orkut.html&lt;br /&gt;
* PubMed - http://gist.github.com/180067 or [0.5 incompatible] http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/pubmed/search-pubmed.js&lt;br /&gt;
* Powerset - http://www.powerset.com&lt;br /&gt;
* Questionable Content MediaFire Thread - http://bluesuncorp.co.uk/bbq/mfsearch.htm&lt;br /&gt;
* Reddit - http://captspify.is-a-geek.com/scripts/Home/Ubiquity/&lt;br /&gt;
* RetailMeNot - http://www.quicksilverillness.com/ubiquity/retailmenot.html&lt;br /&gt;
* REVU - http://revu.ubuntuwire.com/ubiquity-plugin.py&lt;br /&gt;
* Ruhr-University Bochum OPAC - http://bibliolabs.ub.rub.de/ubiquity&lt;br /&gt;
* Shoutcast Search&lt;br /&gt;
* SearchMe - http://www.thecompgeek.info/ubiquity/searchme.html&lt;br /&gt;
* Skweezer - http://unplugd.com/enblogd&lt;br /&gt;
* Smelly Cat - http://www.smellycat.com.br&lt;br /&gt;
* Smug-search - http://www.robertnyman.com/2009/03/26/search-smugmug-photos-easily-with-smug-search-ubiquity-command/&lt;br /&gt;
* Snow Report - http://www.freewebs.com/wwprograms/ubiquity.htm&lt;br /&gt;
* Social Actions - http://www.crankreport.org/junkdrawer/js/ubiq_social_actions_page.html&lt;br /&gt;
* SongMeanings.net - http://captspify.is-a-geek.com/scripts/Home/Ubiquity/&lt;br /&gt;
* stock.xchng / sxc.hu - http://www.juhamakkonen.com/ubiquity/commands/images/sxc.hu/sxc.htm&lt;br /&gt;
* Subscene - http://avid.me/ubi/subscene.html&lt;br /&gt;
* suggest-experts -  [http://gist.github.com/15544 subscribe], [http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/pubmed/suggest-experts.js project at google code]&lt;br /&gt;
* SurfTheChannel.Com - [http://thecompgeek.info/ubiquity/surfthechannel.html http://thecompgeek.info/ubiquity/surfthechannel.html]&lt;br /&gt;
* TheFreeDictionary - http://gist.github.com/144913&lt;br /&gt;
* Thesaurus - Used to search thesaurus.reference.com http://www.zacharyspencer.com/2008/09/my-first-ubiquity-command/ &lt;br /&gt;
* Thottbot - http://topthis.tv/ubiquity/&lt;br /&gt;
* TinEye - http://common-lisp.net/project/lifp/ubiquity/tineye.htm&lt;br /&gt;
* The Sri Lankan Tech Guide - http://www.thesrilankantechguide.com/ubiquity.html&lt;br /&gt;
* Tonight.eu - http://www.tonight.eu/ubiquity/&lt;br /&gt;
* Ubuntu brainstorm - http://www.rakudave.ch/?q=node/21&lt;br /&gt;
* Ultimate Guitar (supports grabbing FoxyTunes track info) - http://propus.lunarpages.com/~thefo2/ug.htm&lt;br /&gt;
* Update or Die (Brazil) - http://gist.github.com/10788&lt;br /&gt;
* Urban Dictionary - http://common-lisp.net/project/lifp/ubiquity/urban-dictionary.htm (now with preview!)&lt;br /&gt;
* Urban Dictionary, alternate version - http://gist.github.com/47363&lt;br /&gt;
* Vimeo - http://gist.github.com/72179&lt;br /&gt;
* Viu Isso? (Brazil) - http://gist.github.com/10791&lt;br /&gt;
* YTMND.com - http://gist.github.com/21802&lt;br /&gt;
* Walk Score - http://gist.github.com/102868&lt;br /&gt;
* Walk Score (Updated for Ubiquity 0.5) - http://gist.github.com/158453&lt;br /&gt;
* Wapedia Search - http://unplugd.com/enblogd&lt;br /&gt;
* The Wayback Machine - http://www.yardensachs.com/ubiquity/&lt;br /&gt;
* Webmd search - http://predator101.webng.com/ubiquity/webmd.html&lt;br /&gt;
* Websource.It - http://www.briandgoad.com/blog/ubiquity-commands/websourceit/&lt;br /&gt;
* What.CD - http://corevette.googlepages.com/whatcdubiquity.html&lt;br /&gt;
* WhitePages.com - http://charlesconnell.com/ubiquity.html&lt;br /&gt;
* Wikiquote - http://www.geocities.com/ubiquities1&lt;br /&gt;
* Wolfram|Alpha - http://common-lisp.net/project/lifp/ubiquity/wolfram.htm&lt;br /&gt;
* Wordnik – http://jonasnockert.com/2008/10/ubiquity-wordnik/&lt;br /&gt;
* WorldCat - http://bibliolabs.ub.rub.de/ubiquity&lt;br /&gt;
* WTFCalls.com - http://wtfcalls.com/search/&lt;br /&gt;
* WTSBooks.com - http://www.nerdlets.org/2009/01/14/ubiquity-command-for-the-westminster-bookstore/&lt;br /&gt;
* xkcd - http://ieng6.ucsd.edu/~rjc002/&lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts yell]: Search Yell.com for businesses in the UK&lt;br /&gt;
* Yahoo! Finance http://www.hoffstein.net/ubiquity/stock-quote.html Stock quote for one or more tickers (comma-separated)&lt;br /&gt;
* Yahoo! Finance http://www.hoffstein.net/ubiquity/stock-chart.html 1Y stock chart for a given ticker&lt;br /&gt;
* Yahoo! Finance http://www.matthias-schuetz.eu/yfin-ubiquity.html Quickly review stock quotes and charts&lt;br /&gt;
* Yahoo! Finance http://proplus.aptanacloud.com/ubiquity/yahoo-graph.html Tiny Year To Date ticker chart&lt;br /&gt;
* dict.youdao.com / dict.yodao.com - http://www.utblog.com/tools/ubiquity/yodao-dict.htm&lt;br /&gt;
* Zappos - http://topthis.tv/ubiquity/&lt;br /&gt;
* Zipzoomfly - http://test.fathomthat.org/ubiquity/zipzoomfly.html&lt;br /&gt;
* Zootool - http://zootool.com/blog/2008/08/27/zootool-and-ubiquity/&lt;br /&gt;
&lt;br /&gt;
== Web Lookup ==&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm whois]: Performs a whois on selected or typed URL/IP.&lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm ping]: Pings the selected or typed URL/IP&lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm lookup]: Performs a lookup on selected or typed URL/IP.&lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm tracert]: Performs a tracert on selected or typed URL/IP.&lt;br /&gt;
&lt;br /&gt;
[http://www.rakudave.ch/?q=node/25 just-ping]: Pings the selected or typed URL/IP from 32 checkpoints worldwide.&lt;br /&gt;
&lt;br /&gt;
[http://www.starwarsdatapad.741.com/ubiq.htm isdown]: Takes selected or typed URL and determines if it is working using the downforeveryoneorjustme.com tool.&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/9285 Whats-My-IP]: Gets your IP address and displays it in the preview.  Copies IP to clipboard on execute.&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10700 Search-Domain-Name]: Checks the availability of com/org/net TLD domain names.&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10707 Traffic]: Get Compete traffic charts for the given site.&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10703 Host]: Checks the Web Host of the given site.&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10702 Site-Down]: Checks if the site is down.&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10249 Gmane]: Look up gmane group&lt;br /&gt;
&lt;br /&gt;
==Google==&lt;br /&gt;
&lt;br /&gt;
===extensions of the core commands===&lt;br /&gt;
* [http://mytechieself.blogspot.com/2008/08/writing-ubiquity-commands.html Google Scholar and Google Patent Searches]&lt;br /&gt;
* [http://www.radiantweb.net/ubiquity/ Google Book Search]&lt;br /&gt;
* [http://www.radiantweb.net/ubiquity/ Google News Search]&lt;br /&gt;
* [http://hondje.mine.nu/ubiquity/ Google Search within current domain]&lt;br /&gt;
** [http://www.endolith.com/ubiquity_commands.html Version that lets you specify which domain]&lt;br /&gt;
* [http://pynej.blogspot.com/2008/10/ubiquity-command-search-google-web.html Google Web History Search]&lt;br /&gt;
* [http://www.anod1.free.fr/pdf.html pdf] is a command that search pdf files with google.&lt;br /&gt;
*[http://threepipeproblem.com/ubiquity/gmine_ubiquity.html Gmine] searches Gmail, Google Calendar, and GDocs for your search term.&lt;br /&gt;
*[http://gist.github.com/60561?google++ google++] all-in-one pack of google services (web/image/video/mail/reader/code) with improved previews.&lt;br /&gt;
&lt;br /&gt;
===Google Feeling Lucky ===&lt;br /&gt;
* [http://gist.github.com/16507 Quicky] not only runs your input through I&#039;m Feeling Lucky, but lets you preview the page also. A quick, dirty splice up of &#039;go&#039; and &#039;goto&#039;.&lt;br /&gt;
* [http://point.pt/~guillaume/ubiquity/feeling-lucky.html Feeling-lucky] is a simple command that looks up the first result and displays it on the preview, and upon hitting enter, it executes by opening that particular web-page.&lt;br /&gt;
* [http://point.pt/~guillaume/ubiquity/feeling-lucky.html Link-to-feeling-lucky] is a command that is similar to &#039;&#039;link-to-wikipedia&#039;&#039;: upon execution it injects a link to google&#039;s first result on the rich text-editing field. Quite handy when linking to companies websites while blogging.&lt;br /&gt;
&#039;&#039;[[User:Griflet|Griflet]]: I renamed these commands with their natural names. The old commands with their original names can still be found [http://point.pt/~guillaume/ubiquity/myCows.html here]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===google maps - directions===&lt;br /&gt;
* [http://gist.github.com/170980 directions] is a modification of Mike Chow&#039;s [http://icecreamfactory.freehostia.com/ubiquity/directions.php directions command] and shows the route between 2 locations on a map. It works now with Ubiquity 0.5+ (parser 2, localizable) and with many local Google Maps versions. Wanted: users from different countries - I need feedback[mailto:synapsos@gmail.com !]&lt;br /&gt;
Unfortunately the API Site that provides the preview map http://icecreamfactory.freehostia.com/ubiquity/directions.php is gone. If someone has a link to a similar site or some help in this issue, please contact [mailto:synapsos@gmail.com me]!&lt;br /&gt;
&lt;br /&gt;
===google hacks===&lt;br /&gt;
* [http://www.anod1.free.fr/music.html music] is a command that use google hacks in order to find mp3 or ogg music. &lt;br /&gt;
* [http://www.anod1.free.fr/video.html video] is a command that use google hacks in order to find video.&lt;br /&gt;
* [http://icecreamfactory.freehostia.com/ubiquity/googlism.html googlism] shows what google.com thinks of you, your friends or anything&lt;br /&gt;
* [http://icecreamfactory.freehostia.com/ubiquity/directions.php directions] shows how to go from location-a to location-b on google maps, 0.5+ version [http://wiki.mozilla.org/Labs/Ubiquity/Commands_In_The_Wild#google_maps_-_directions here]&lt;br /&gt;
* [http://gist.github.com/123073 gdefine] Performs a google search with the prefix &amp;quot;define:&amp;quot; to find definitions for a word.&lt;br /&gt;
&lt;br /&gt;
===google image search===&lt;br /&gt;
* [http://gist.github.com/85963 Google Image Search] is a command that allows you to search images on google. You can also choose a color and google gives you only the images matching your color. It&#039;s not well programmed, so feel free to improve it. Be sure to give me some feedback.&lt;br /&gt;
&lt;br /&gt;
==Multiple site search==&lt;br /&gt;
&lt;br /&gt;
* [http://math-www.uni-paderborn.de/~axel/ubiquity_search.html multi-search]: Searches Google, Yahoo, MSN Live and Ask.com simultaneously, in different tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Let Me Google That For You==&lt;br /&gt;
&lt;br /&gt;
* [http://gist.github.com/144222 lmgtfy]: create a link to a (not so?) subtle suggestion for someone who asks you, via a computer, about something that Google might be able to answer. Courtesy of [[LetMeGoogleThatForYou.com]]. The [http://gist.github.com/45201 old pre-0.5 version] is deprecated.&lt;br /&gt;
&lt;br /&gt;
==Picitup Visual Search==&lt;br /&gt;
&lt;br /&gt;
[http://www.picitup.com]: 2 commands:&lt;br /&gt;
* shop - Executes a shopping search with visual similarity and shopping compariosn - [http://www.picitup.com/picitup/picShop.jsp]&lt;br /&gt;
* picitup - Executes a visual search query agianst, Yahoo, Flikcr and Picasa image search engines [http://www.picitup.com]&lt;br /&gt;
&lt;br /&gt;
== Legal Citation Search ==&lt;br /&gt;
*[http://www.keysquaremedia.com legal-cite]: Executes search of AltLaw for U.S. Code (federal statutes) and some federal case law (i.e., Supreme Court Opinions and federal appeals court opinions that were reported by West) &lt;br /&gt;
&lt;br /&gt;
== Oracle ==&lt;br /&gt;
*[http://www.pythian.com/blogs/1187/ubiquity-and-tahiti-together-at-last Tahiti]: Executes search of Oracle documentation from their repository at http://tahiti.oracle.com.  Can search all docs or version-specific docs.&lt;br /&gt;
*[http://mskadu.googlepages.com/ubiquityscripts search-oracle-docs:  Search through the Oracle Documentation on] [http://www.oracle.com/technology/documentation/index.html Oracle Documentation website]&lt;br /&gt;
&lt;br /&gt;
== Torrent Search ==&lt;br /&gt;
* [http://slackers.se/projects/ubiquity-hdbits HDBits]: Search for torrents on HDBits.&lt;br /&gt;
*[http://217.209.1.243/~sertion/ubiquity/isohunt/ Search  isoHunt] in the Ubiquity preview. Open results with accesskey or mouseclick.&lt;br /&gt;
* [http://entvibes.com/torrents.htm torrent]: Search for torrents on ALL the big trackers at once (uses Torrent Vortex and Torrent-Finder)&lt;br /&gt;
* [http://www.furey.com.au/stuff/ubiquity/mininova/ mininova]: Search for torrents on [http://Mininova.org Mininova]. Refine your search using categories (&amp;quot;in&amp;quot;) and sort types (&amp;quot;as&amp;quot;). &#039;&#039;&#039;Now version 0.5.4 compatible!&#039;&#039;&#039;&lt;br /&gt;
* [http://garyhodgson.com/ubiquity/torrent.html mininova]: Performs a search for the selected text on [http://Mininova.org Mininova].  Optionally, a category can be defined, e.g. Books, Anime, etc.)&lt;br /&gt;
* [http://garyhodgson.com/ubiquity/torrent.html mininova-imdb]: Performs a search on Mininova.org for a given IMDB code (with or without the &#039;tt&#039;-prefix).&lt;br /&gt;
* [http://gist.github.com/53950 imdbt]: Accurately search for movie torrents on mininova. Type movie keywords and specify desired movie with the &amp;quot;with&amp;quot; mod phrase using the movie&#039;s imdb code shown in the preview (start typing &amp;quot;with t&amp;quot; and choose from autocomplete suggestions). Search will be done using imdb code if available or keywords otherwise.&lt;br /&gt;
* [http://gist.github.com/57852 thePirateBay]: Performs a search for (a) given word(s) on [http://ThePirateBay.org ThePirateBay].  The result will be display directly on the ubiquity preview window, you can start downloading without opening a new tab.&lt;br /&gt;
* [http://gist.github.com/64552 piratebay]: Search for a torrent on Pirate Bay, with the option of specifying a category (Audio/Video/Software/Games/Other) and/or a sort (Type/Name/Uploaded/Size/Seeds).&lt;br /&gt;
* [http://garyhodgson.com/ubiquity/torrent.html piratebay]: Performs a search for the selected text on [http://ThePirateBay.org ThePirateBay].  Optionally, a category can be defined, e.g. Audio, Video, etc.)&lt;br /&gt;
* [http://mskadu.googlepages.com/ubiquityscripts search-torrentz: Search for torrents] on [http://www.torrentz.com Torrentz.com]&lt;br /&gt;
* [http://math-www.uni-paderborn.de/~axel/ubiquity_torrent.html torrent-search]: Searches on PirateBay, Isohunt and Torrentz simultaneously, in different tabs.&lt;br /&gt;
* [http://knightar.artician.com/blog/2008/09/TokyoToshocom-Search-Addon-for-Ubiquity/ tokyotosho]: Searches and lists TokyoTosho.com torrents. (Optionally, a category can be defined, e.g. Anime, Manga, Drama, Raws, etc.)&lt;br /&gt;
* [http://www.thecompgeek.info/ubiquity/demonoid.html Demonoid]: Searches for the predetermined set of keywords on Demonoid.com. Plain and simple.&lt;br /&gt;
* [http://avid.me/ubi/speckly.html Speckly]: Searches for keywords on Speckly.com - Searches 10 torrent sites&lt;br /&gt;
* [http://www.dca.fee.unicamp.br/~tatai/ubiquity btjunkie-search]: Searches for torrents on BTJunkie&lt;br /&gt;
*Searches for torrents on  [http://bhagwad.com/blog/2009/04/ubiquity-torrent-search-mininova-isohunt-piratebay.html Mininova, IsoHunt and PirateBay]. Opens in three new tabs&lt;br /&gt;
&lt;br /&gt;
= Natural Languages =&lt;br /&gt;
* [http://mskadu.googlepages.com/bitly2 langid] - Identify which language any text has been written in.&lt;br /&gt;
* [http://gist.github.com/119827 lingvo]: Russian / English&lt;br /&gt;
* [http://developer.swekee.com/ubiquity/ David Álvaro &amp;lt;&amp;gt; Diccionario de la lengua de la Real Academia Española ]: Español / Spanish (D-RAE)&lt;br /&gt;
* [http://yardensachs.com/ubiquity/ Yarden&#039;s Hebrew&amp;lt;&amp;gt;English Morfix dictionary lookup ]: morfix&lt;br /&gt;
*[http://yardensachs.com/ubiquity/ Yarden&#039;s Hebrish&amp;lt;&amp;gt;Engrew convert - between Hebrew char&#039;s and English char&#039;s with QWERTY layout ]: hetoen / entohe&lt;br /&gt;
* [http://halcy.de/past/2008/8/27/mozilla_ubiquity_beolingus_germanenglish_dictionary/ German&amp;lt;&amp;gt;English dictionary lookup ]: beo&lt;br /&gt;
* [http://www.satf.se/page/ubiquity-japanese-english-romaji-dictionary pihl&#039;s Japanese&amp;lt;&amp;gt;English romaji dictionary lookup ]: jaen&lt;br /&gt;
* [http://radheef.com/ubiquity/ Dhivehi Radheef (dictionary) lookup ]: jaa&lt;br /&gt;
* [http://olobolger.blogspot.com/2008/08/mozilla-ubiquity.html RAE Spanish dictionary definition lookup]: rae&lt;br /&gt;
* [http://pnxk.freehostia.com/ubiquity/cambridge_dictionary.html Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup ]: English (Cambridge)&lt;br /&gt;
* [http://gist.github.com/65093 Cambridge English Advanced Learner&#039;s Dictionary Definition Lookup with preview ]: English (Cambridge). See a screen shot [http://sealence.x10hosting.com/wordpress/?p=66 here].&lt;br /&gt;
* [http://pnxk.freehostia.com/ubiquity/rae_dictionary.html Real Academia Española Diccionário/Dictionary Definition Lookup ]: Español / Spanish (RAE)&lt;br /&gt;
*[http://www.geocities.com/baloo_rch/rae_ubiquity.html Real Academia Española Diccionário/Dictionary Definition Lookup (with preview) ]: definir&lt;br /&gt;
*[http://www.heartsmagic.net/ubi.html Seslisozluk, Zargan English &amp;lt;-&amp;gt; Turkish look up] English &amp;lt;-&amp;gt; Turkish&lt;br /&gt;
*[http://www.verdsveven.com/ubiquity/nn_nb_dict.html Nynorskordboka og Bokmålsordboka]: Norwegian dictionaries&lt;br /&gt;
* [http://www.jpemartin.com/ubiq/calc2.html calc2] - natural language calculator&lt;br /&gt;
* [http://jarfil.net/ubiquity/dict.html dict.org lookup]: dict&lt;br /&gt;
* [http://gist.github.com/60377 dizionario]: - Italian dictonary (Hoepli)&lt;br /&gt;
* [http://gist.github.com/70871 De Mauro]: - Search Italian Dictionary De Mauro Paravia&lt;br /&gt;
* [http://claude.duvergier.fr/developpements/ubiquity/conjugate/conjugate.html conjugate]: French conjugation of verbs using [http://www.leconjugueur.com leconjugueur.com] (CDuv)&lt;br /&gt;
* [http://gist.github.com/84553 pronounce]: Pronounce a selected or typed English word&lt;br /&gt;
* [http://apoema.net/langbot/en/gc.lb?topic=ubiquity grammar]: Performs grammar checking under selected text and suggests corrections. Several languages supported.&lt;br /&gt;
* [http://tat.wright.name/ubiquity-spell/ spell]: Use Google to find a correct spelling for a guessed spelling of a word.&lt;br /&gt;
&lt;br /&gt;
=Programming Languages=&lt;br /&gt;
== Asterisk ==&lt;br /&gt;
[[Labs/Ubiquity/dial]]: Configure your Asterisk PBX to use the &#039;dial&#039; command for Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Common Lisp ==&lt;br /&gt;
* [http://common-lisp.net/project/lifp/ubiquity/clhs.htm Search Common Lisp Hyperspec]&lt;br /&gt;
&lt;br /&gt;
== C++ ==&lt;br /&gt;
[http://abauchu.net/ubiquity/search-cpp.html search-c++] Searches a term on [http://www.cplusplus.com cplusplus.com].&lt;br /&gt;
&lt;br /&gt;
== jQuery ==&lt;br /&gt;
# [http://erikvold.com/tools/ubiquity/jquery/jquery.cfm jquery]: Searches the jQuery documentation.&lt;br /&gt;
# [http://gist.github.com/180834] Searches the jQuery documentation with result previews and keyword coloring&lt;br /&gt;
&lt;br /&gt;
== PHP ==&lt;br /&gt;
[http://josuerodriguez.com/2009/08/ubiquity-php-search-preview-updated/ php]&lt;br /&gt;
Search &amp;amp; Preview PHP function specs, comments, examples, etc.&lt;br /&gt;
example: php strstr examples&lt;br /&gt;
&lt;br /&gt;
[http://taukon.de/ubiquity-php-function.php php]&lt;br /&gt;
search PHP function documentation&lt;br /&gt;
example: php join()&lt;br /&gt;
&lt;br /&gt;
[http://taukon.de/ubiquity-php-function-doc.php phpd]&lt;br /&gt;
search PHP documentation &lt;br /&gt;
example: phpd class&lt;br /&gt;
&lt;br /&gt;
[http://verath.se/phpdoc phpdoc]&lt;br /&gt;
Find information about a selected/entered php function&lt;br /&gt;
example: phpdoc echo&lt;br /&gt;
&lt;br /&gt;
[http://download.sbw.be/projects/ubiquity/php-search.html php]&lt;br /&gt;
A mix of phpd and phpdoc here above, you get a shortlist and when you hit enter, you are taken to the next php.net tabs open pointing to the most appropriate documenation.&lt;br /&gt;
example: php str_repl&lt;br /&gt;
&lt;br /&gt;
== Perl ==&lt;br /&gt;
[http://www.grok.in/ubiquity/perl.html perldoc, cpan, monks]: Three commands, one each to search perldocs, CPAN and perlmonks.org&lt;br /&gt;
&lt;br /&gt;
== Rails ==&lt;br /&gt;
[http://gist.github.com/43619 rails]&lt;br /&gt;
search rails documentation&lt;br /&gt;
example: rails link_to&lt;br /&gt;
&lt;br /&gt;
== ActionScript ==&lt;br /&gt;
[http://anirudhs.chaosnet.org/blog/2008.09.04.html as3livedocs, as3desc, as3package]: Three commands, one to open up livedocs page given a class, one to give the description of an actionscript class and another to give the package to which a class belongs to.&lt;br /&gt;
&lt;br /&gt;
== Coldfusion ==&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/coldfusion/coldfusion.cfm coldfusion]: Search the Coldfusion 8 LiveDocs.&lt;br /&gt;
&lt;br /&gt;
== MySQL ==&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/mysql/mysql.cfm mysql]&lt;br /&gt;
&lt;br /&gt;
* mysql: Search all of the MySQL documentation.&lt;br /&gt;
* mysql5: Search the MySQL 5.0 reference manual.&lt;br /&gt;
* mysql5.1: Search the MySQL 5.1 reference manual.&lt;br /&gt;
* mysql6: Search the MySQL 6.0 reference manual.&lt;br /&gt;
* mysql-admin: Search the MySQL administrator reference manual.&lt;br /&gt;
* mysql-query-browser: Search the MySQL query browser reference manual&lt;br /&gt;
* mysql-migration-toolkit: Search the MySQL migration toolkit reference manual.&lt;br /&gt;
* mysql-workbench: Search the MySQL workbench reference manual.&lt;br /&gt;
&lt;br /&gt;
[http://mitcho.com/code/select select] - select gives you read access to your MySQL databases right from Ubiquity, with smart suggestions of your table and column names.&lt;br /&gt;
&lt;br /&gt;
== Postgres ==&lt;br /&gt;
[http://gist.github.com/44867 postgres]&lt;br /&gt;
&lt;br /&gt;
* postgres: Search all of the Postgress documentation.&lt;br /&gt;
* postgres83: Search the Postgress 8.3 reference manual.&lt;br /&gt;
* postgres82: Search the Postgress 8.2 reference manual.&lt;br /&gt;
* postgres81: Search the Postgress 8.1 reference manual.&lt;br /&gt;
* postgres80: Search the Postgress 8.0 reference manual.&lt;br /&gt;
* postgres74: Search the Postgress 7.4 reference manual&lt;br /&gt;
&lt;br /&gt;
== Java ==&lt;br /&gt;
[http://www.cse.ucsd.edu/users/jnguy/java.html Java API] - Wraps a google search pointing to the java API&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/153808 Java API Search] - Another search of the Java API, with a detailed preview. Compatible with Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
== Javascript ==&lt;br /&gt;
[http://blog.monstuff.com/archives/000341.html Beautify-JS] - Let&#039;s you nicely reformat any selected javascript code. Handy for Ubiquity verb authors.&lt;br /&gt;
&lt;br /&gt;
== HTML/CSS Reference ==&lt;br /&gt;
[http://gist.github.com/62697 W3Schools Search] uses google to search W3Schools&#039;  documentation on HTML, javascript, CSS, and other web technologies.&lt;br /&gt;
&lt;br /&gt;
== HTML Validation ==&lt;br /&gt;
[http://joshhuckabee.com/w3c-validator-ubiquity-plugin W3C Validator Ubiquity Plugin] Submits the current page to the W3C&#039;s markup validator. Enter the command &amp;quot;validate&amp;quot; on any publicly available web page and hit enter.&lt;br /&gt;
&lt;br /&gt;
== Wordpress ==&lt;br /&gt;
[http://avid.me/ubi/wordpress.html Wordpress] Searches the terms in Documentation &amp;amp; Forums on Wordpress.com&lt;br /&gt;
&lt;br /&gt;
[http://wpseek.com/ubiquity/ wpseek] Lookup any WordPress function or Template Tag with wpseek.com&lt;br /&gt;
&lt;br /&gt;
== Drupal API ==&lt;br /&gt;
[http://joshhuckabee.com/drupal-api-ubiquity-plugin Drupal API Ubiquity Plugin] Lookup functions, files, constants, etc. in Drupal&#039;s API. Enter the command &amp;quot;drupal&amp;quot; followed by what you wish to lookup.  Hit enter to be taken to that item in the API.&lt;br /&gt;
&lt;br /&gt;
==Python==&lt;br /&gt;
[http://www.vwelch.com/ubiquity/pydoc.html Pydoc] Lookup any Python terms via http://starship.python.net/crew/theller/pyhelp.cgi. Enter &amp;quot;pydoc&amp;quot; followed by the search term.&lt;br /&gt;
# [http://gist.github.com/180834] Searches the documentation with result previews and keyword coloring&lt;br /&gt;
&lt;br /&gt;
==BSD Man Pages==&lt;br /&gt;
[http://trolocsis.com/ubiquity/ bsdman] Lookup BSD man pages with apropos support. Enter &#039;bsdman&#039; followed by the search term. Updated for Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
=URL Tools=&lt;br /&gt;
&lt;br /&gt;
* goto: Simply navigate to any URL - http://gist.github.com/72189&lt;br /&gt;
* [http://erikvold.com/tools/ubiquity/revcanonical/revcanonical.cfm revcanonical]: Replaces the selected URL with a [http://revcanonical.appspot.com Rev-canonicalized URL!]&lt;br /&gt;
* [http://erikvold.com/tools/ubiquity/relshortlink/relshortlink.cfm relshortlink]: Replaces the selected URL with a [http://rel-shortlink.appspot.com/ rel=shortlink].&lt;br /&gt;
* [http://gibberish.com/hacks/ubiq/lazylink.html lazylink]: Replaces the selected text with a link to its first hit in Google.&lt;br /&gt;
* [http://gist.github.com/169819 url2pdf]: Select a url then print it to pdf.&lt;br /&gt;
&lt;br /&gt;
==mac==&lt;br /&gt;
https://wiki.mozilla.org/Mac&lt;br /&gt;
search for manifacturer with last octet of mac adress&lt;br /&gt;
&lt;br /&gt;
==is.gd==&lt;br /&gt;
[http://arunstechcorner.blogspot.com/2009/02/shorten-urls-in-ubiquity-with-isgd.html is.gd] Shorten and replace the selected URL with is.gd service. The shortened URL is also copied to the clipboard&lt;br /&gt;
&lt;br /&gt;
== Inlinks ==&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/inlinks/inlinks.cfm Inlinks] Find the number of external inlinks to a provided url (yahoo.com only).&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
synonyms: links, parse links, urls, url&lt;br /&gt;
&lt;br /&gt;
[http://kollektive.com/ubiquity/ links] Parses selected text and replaces any URLs found with HTML links. Recognises most common protocols, even creates mailto: links for email addresses. Now works with the new parser in 0.5&lt;br /&gt;
&lt;br /&gt;
== BuiltWith ==&lt;br /&gt;
[http://builtwith.com BuiltWith] Find out what technologies the URL is using.&lt;br /&gt;
&lt;br /&gt;
== Text2Link ==&lt;br /&gt;
&lt;br /&gt;
[http://text2link.jeffreyjmorgan.com/ubiquity/ Text2Link] opens URLs and sends emails to addresses not marked up as HTML links with the A tag. This is the Ubiquity version of the [https://addons.mozilla.org/en-US/firefox/addon/6003 Text2Link Firefox Extension].&lt;br /&gt;
&lt;br /&gt;
== shortText.com ==&lt;br /&gt;
&lt;br /&gt;
2 commands:&lt;br /&gt;
&lt;br /&gt;
* [http://shortText.com/ shorttext]: Creates a shortText URL for any selected text&lt;br /&gt;
* [http://shortText.com/ longtext]: Select any shortText URL on any site and it will replace the URL with the actual content&lt;br /&gt;
&lt;br /&gt;
== Bit.ly ==&lt;br /&gt;
&lt;br /&gt;
* [http://mskadu.googlepages.com/bitly bitly] - Shortens the selected url using [http://bit.ly Bit.ly]. Pretty much the same as the built-in tinyurl.&lt;br /&gt;
* Shorten URL and copy to clipboard using bit.ly service: http://bit.ly/18Fsn2&lt;br /&gt;
* Shorten and replace selected URL in a Rich Text Field or reverse an already shortened bit.ly URL: http://bit.ly/315THd&lt;br /&gt;
* [http://alexsydell.com/applications/ubiquity/bitly/ bit.ly for 0.5] - &#039;&#039;&#039;Works with Ubiquity 0.5&#039;&#039;&#039; Shortens and replaces a URL using bit.ly and copies the shortened URL to the clipboard.&lt;br /&gt;
&lt;br /&gt;
== ping ==&lt;br /&gt;
&lt;br /&gt;
* [http://flesler.com/ubiquity/ping/ ping] - Pings a host a certain amount of times and displays a notification for each success or failure.&lt;br /&gt;
&lt;br /&gt;
== sm00sh ==&lt;br /&gt;
&lt;br /&gt;
Shorten a URL using sm00sh. It uses Bad Behavior and SURBL and URIBL to reduce spam in the database. &lt;br /&gt;
Simply navigate to [http://smsh.me/action/ubiquity  sm00sh] to install using firefox.&lt;br /&gt;
Use the command &amp;quot;sm00sh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== places ==&lt;br /&gt;
Search your places history and bookmarks db with ubiquity:&lt;br /&gt;
* [https://gist.github.com/144985/cd8cd04e8cc427e66aff6e327ddad4648b92eb43] For ubiquity v0.5+&lt;br /&gt;
* [http://gist.github.com/53958] For ubiquity versions before 0.5&lt;br /&gt;
&lt;br /&gt;
=ShortURL=&lt;br /&gt;
* [http://erikvold.com/tools/ubiquity/shorturl/shorturl.cfm shorturl]: Replaces the selected URL with a [http://revcanonical.appspot.com/ Rev-Canonicalized] URL of less than 44 characters or else a [http://tinyurl.com TinyUrl]. &lt;br /&gt;
&lt;br /&gt;
== LongURL ==&lt;br /&gt;
&lt;br /&gt;
[http://longurl.org/tools expand-short-url] Uses the LongURL service to expand URLs shortened with any shortening service (TinyURL.com, Bit.ly, etc.)&lt;br /&gt;
&lt;br /&gt;
== Tr.im ==&lt;br /&gt;
[http://almaer.com/firefox/commands/ trimurl] Uses the tr.im service to shorten a URL and put it in your clipboard if successful&lt;br /&gt;
&lt;br /&gt;
[http://ubiquitycommand.appspot.com/trim trim] Inspired by &#039;tinyurl&#039; and works in a similar way but uses tr.im&lt;br /&gt;
&lt;br /&gt;
== Hurl.ws ==&lt;br /&gt;
&lt;br /&gt;
Shorten a URL using hurl.  &lt;br /&gt;
Simply navigate to [http://www.hurl.ws  hurl.ws] to install using firefox.&lt;br /&gt;
Use the command &amp;quot;hurl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== a.longreply.com ==&lt;br /&gt;
&lt;br /&gt;
Use a.longereply.com to convert any section of text into a URL so you can then send this link via IM, Twitter, email?  Can send very large peices of text.&lt;br /&gt;
Use the command &amp;quot;longreply&amp;quot;.  To install it [http://a.longreply.com a.longreply.com]&lt;br /&gt;
&lt;br /&gt;
== shorten ==&lt;br /&gt;
&lt;br /&gt;
The all in one URL shortner: [http://labs.vunite.com/vubiqs/verbs.php vunite&#039;s commands]&lt;br /&gt;
Usage: shorten [url] using [tinyurl|isgd|bitly|hurl|snipurl]&lt;br /&gt;
&lt;br /&gt;
== kissa.be ==&lt;br /&gt;
&lt;br /&gt;
A new [http://www.yalazi.org/ubiquity/list.html kissalt, url shortening service], kissalt means &amp;quot;shorten&amp;quot; in Turkish (original word: kisalt)&lt;br /&gt;
&lt;br /&gt;
== u.nu ==&lt;br /&gt;
Inspired by &#039;tinyurl&#039; and works in a similar way but uses [http://u.nu u.nu]&lt;br /&gt;
Old API: [http://labs.kaanerturk.net/ubiquity/unu/ u.nu] &lt;br /&gt;
&lt;br /&gt;
New API: [http://gist.github.com/166170 u.nu]&lt;br /&gt;
&lt;br /&gt;
== lincr ==&lt;br /&gt;
&lt;br /&gt;
[http://sathyasays.com/2008/09/21/my-first-ubiquity-command-lincr-it/ Lincr ] is a URL shortening service. The [http://lin.cr homepage] also shows a list of recently Lincr&#039;d URLs and a RSS feed of the same.&lt;br /&gt;
&lt;br /&gt;
== epoxy ==&lt;br /&gt;
[http://gist.github.com/66647 epoxy] is a Code-Snippet to URL service and uses [http://www.openpaste.org/en/ OpenPaste] to perform its function. More information can be found at [http://epoxy.andhapp.com/ epoxy homepage]&lt;br /&gt;
&lt;br /&gt;
==PageRank Determination==&lt;br /&gt;
Allows you to check the Google PageRank of the current or any other page. [http://bhagwad.com/blog/2009/04/check-pagerank-with-ubiquity-extension-page-rank.html page-rank]&lt;br /&gt;
&lt;br /&gt;
==urlShort (u.mavrev.com)==&lt;br /&gt;
[http://u.mavrev.com/ubi u] Shorten and replace the selected URL using the urlShort service at u.mavrev.com. The shortened URL is also copied to the clipboard.&lt;br /&gt;
&lt;br /&gt;
==PunyURL==&lt;br /&gt;
Shortens and replaces the selected URL using [http://puny.sapo.pt SAPO PunyURL], copying the new URL to the clipboard. [http://gist.github.com/159501 http://gist.github.com/159501]&lt;br /&gt;
&lt;br /&gt;
==Cligs==&lt;br /&gt;
Shortes and replaces the selected URL using [http://cli.gs/ Cligs], and copies the short URL to the clipboard. [http://gist.github.com/163191 http://gist.github.com/163191]&lt;br /&gt;
&lt;br /&gt;
== Other URL manipulation==&lt;br /&gt;
* [http://projects.fligtar.com/ubiquity/url.php URL Tool] - Converts selected URLs to links or lets you choose which one to open in a new tab.&lt;br /&gt;
* [http://nevermind85.net63.net/Ubiquity/try.html ToLink] - Converts the selected text link in a real clickable link.&lt;br /&gt;
* [http://blog.monstuff.com/archives/000343.html insert-link] - Search for a link in your history and insert it.&lt;br /&gt;
* [http://earth2marsh.com/ubiquity/percent_encoding Percent Encoding Tools] Commands to percent encode as well as decode (aka &amp;quot;URI encoding&amp;quot;) selected text. Provides preview and/or replaces selected text.&lt;br /&gt;
* [http://kollektive.com/ubiquity/ links] - converts non-marked up text/html which contains urls and email addresses into proper anchor tags. Works within html pages, and in rich text editing fields (eg. rich text editing in GMAIL)&lt;br /&gt;
* [http://pentarious.altervista.org/ubiquity/ urlize] - Scans a text for URLs and opens them in new tabs. A preview is available to open single URLs manually.&lt;br /&gt;
[[Media:Example.ogg]]&lt;br /&gt;
&lt;br /&gt;
= Web 2.0 (Social networks, blogs, recommenders, etc) = &lt;br /&gt;
&lt;br /&gt;
== Add to Any ==&lt;br /&gt;
Share current page using any service.&lt;br /&gt;
Script: http://gist.github.com/102242&lt;br /&gt;
&lt;br /&gt;
== BackType ==&lt;br /&gt;
# [http://erikvold.com/tools/ubiquity/backtype/backtype.cfm backtype]: Starts a search of BackType, which allows you to do a search for a person&#039;s comments on blogs and other sites. &lt;br /&gt;
&lt;br /&gt;
==CipherHive==&lt;br /&gt;
A Global search of Moodle Based Courses, Forums, Wiki&#039;s, Blogs, Users, Posts, Authors, etc.&lt;br /&gt;
&lt;br /&gt;
Script: http://www.cipherhive.org/course/view.php?id=19&lt;br /&gt;
&lt;br /&gt;
To use, just type cipher + the word you wish to search.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Del.icio.us ==&lt;br /&gt;
&lt;br /&gt;
=== Add a page to your delicious bookmarks ===&lt;br /&gt;
&lt;br /&gt;
Script: http://gist.github.com/7516&lt;br /&gt;
&lt;br /&gt;
To use, just type delicious + your tags.&lt;br /&gt;
&lt;br /&gt;
Another Command: http://decafbad.com/UbiquityCommands/&lt;br /&gt;
&lt;br /&gt;
Highlight some text on the page for notes, activate Ubiquity, enter command share-on-delicious.  You can also enter your own notes, assign tags to the bookmark with the &amp;quot;tagged&amp;quot; modifier, and alter the bookmark default page title with the &amp;quot;entitled&amp;quot; modifier.  Note that you must also already be logged in at delicious.com to use this command.&lt;br /&gt;
&lt;br /&gt;
Another Command: http://gist.github.com/9499&lt;br /&gt;
&lt;br /&gt;
Emulates the Delicious.com bookmarklet. Highlight some text on the page for notes, activate Ubiquity, enter command delicious. It will pop up a new window where you can select tags other people have used for the URL.&lt;br /&gt;
&lt;br /&gt;
=== View a users delicious tags ===&lt;br /&gt;
Script: http://parentno.de/ubiquity/?command=get-delicious&lt;br /&gt;
&lt;br /&gt;
Shows del.icio.us bookmarks from this user {username} tagged with {tagname}&lt;br /&gt;
To use, type get-delicious {username} tag {tagname}&lt;br /&gt;
&lt;br /&gt;
=== View the 10 most popular/recent bookmarks in delicious ===&lt;br /&gt;
Script:&lt;br /&gt;
*http://yinosanchez.hostei.com/popular-delicious.php&lt;br /&gt;
*http://yinosanchez.hostei.com/recent-delicious.php&lt;br /&gt;
&lt;br /&gt;
Shows the 10 most popular/recent del.icio.us bookmarks.&lt;br /&gt;
To use, type recent-delicious or popular-delicious.&lt;br /&gt;
&lt;br /&gt;
== Evernote ==&lt;br /&gt;
*[http://gist.github.com/50974 clip to Evernote] Clip the current web page selection to Evernote&lt;br /&gt;
&lt;br /&gt;
== Facebook ==&lt;br /&gt;
&lt;br /&gt;
Lets you update your status and go quickly to a friend&#039;s profile.&lt;br /&gt;
&lt;br /&gt;
[[http://grantrules.com/ubiquity/facebook.html script]] with two commands:&lt;br /&gt;
* &#039;facebook-status (your status)&#039; - Updates your status, doesn&#039;t add &amp;quot;is&amp;quot;!&lt;br /&gt;
* &#039;facebook-friend (your friend)&#039; - Locate a friend. You have to type whole words, though (if searching for Amy Jones, you can&#039;t type Amy Jon; it must be one of: amy, jones, amy jones!)&lt;br /&gt;
&lt;br /&gt;
=== Search Facebook with Preview ===&lt;br /&gt;
Duplicates the functionality of the Facebook search box in Ubiquity.  Start typing the name of a friend, group, or application, and you&#039;ll see matching results right in the preview area.  Pressing return will take you to the first matching profile, and control + alt + number will take you directly to any other match.  If you&#039;re not logged in or there aren&#039;t any matches, pressing enter will take you to the search results on Facebook.  You can even type in parts of a name.  Typing &#039;Stan Brown&#039; or even &#039;Brow Stan,&#039; for example, will match Stanley Brown (just as they would in the actual Facebook search).&lt;br /&gt;
&lt;br /&gt;
Note: In order to get a preview that shows matches, you must be logged into Facebook and have either of the following settings:&lt;br /&gt;
* Third-party cookies enabled&lt;br /&gt;
* www.facebook.com added to the cookie white list&lt;br /&gt;
&lt;br /&gt;
Works with Ubiquity 0.5.*&lt;br /&gt;
&lt;br /&gt;
Script: http://www.princeton.edu/~aweintra/index.html&lt;br /&gt;
&lt;br /&gt;
=== Share on Facebook ===&lt;br /&gt;
Shares the the page in the current tab on Facebook. I parsed the bookmarklet provided by Facebook so you get the nice little pop-up window rather than a whole new tab.&lt;br /&gt;
&lt;br /&gt;
Script: http://jallen7usa.com/ubiquity/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Search Facebook ===&lt;br /&gt;
&lt;br /&gt;
Look anything up in Facebook, contacts, groups and it even works whether you are logged in or not.&lt;br /&gt;
&lt;br /&gt;
script here&lt;br /&gt;
http://myfirstscript.blogspot.com/2008/10/ubiquity-is-awesome_06.html&lt;br /&gt;
&lt;br /&gt;
== Ffffound it! ==&lt;br /&gt;
&lt;br /&gt;
Adds images to the Ffffound! image repository site. You must have a Ffffound! account to be able to use.&lt;br /&gt;
Simply navigate to [http://www.lantern.co.nz/ubiquity/ffffound.html  lantern.co.nz/ubiquity/ffffound.html] to install using firefox.&lt;br /&gt;
Use the command &amp;quot;ffffound it&amp;quot; on a page which has the image you want to save.&lt;br /&gt;
&lt;br /&gt;
== Friendfeed ==&lt;br /&gt;
*[http://gist.github.com/51007 share-on-friendfeed] Simple bookmarklet command to share the current page on friendfeed.&lt;br /&gt;
&lt;br /&gt;
== Hatena ==&lt;br /&gt;
&lt;br /&gt;
*[http://gist.github.com/8351 hatebu]&lt;br /&gt;
*[http://gist.github.com/8575 hotentry]&lt;br /&gt;
*[http://gist.github.com/72762 hatenacopy]&lt;br /&gt;
&lt;br /&gt;
== Identi.ca ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Script: [http://bobbo.me.uk/code/ubiquity/] Allows you to post to Identi.ca from Mozilla Ubiquity. To use, install from link, open Ubiquity and type &amp;quot;identi.ca&amp;quot; followed by your status message.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The above script is no longer hosted at this URL, as the site is no longer available. If someone has a cached version of this code, please contact [[mailto:jon@spriggs.org.uk Jon &amp;quot;The Nice Guy&amp;quot; Spriggs]] who will host it on his site.&lt;br /&gt;
&lt;br /&gt;
* [http://gist.github.com/173013 identi.ca] is an identi.ca clone of the twitter command included by default in Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Mixx==&lt;br /&gt;
# [http://erikvold.com/tools/ubiquity/mixx/mixx.cfm mixx]: Mixx the typed/pasted url, or highlighted url, or otherwise the current page. Also get the mixx count of the url in the preview.&lt;br /&gt;
&lt;br /&gt;
== myExperiment ==&lt;br /&gt;
&lt;br /&gt;
Script: [http://www.myexperiment.org/files/151/download/myexperiment_search.js myExperiment basic search command] Basic search plugin for myExperiment, an online comunity for scientists.&lt;br /&gt;
&lt;br /&gt;
== MySpace.com ==&lt;br /&gt;
&lt;br /&gt;
Four tools to update and interact with your MySpace account.&lt;br /&gt;
&lt;br /&gt;
- Comment&lt;br /&gt;
- Send Message&lt;br /&gt;
- Post Bulletin&lt;br /&gt;
- Create Blog Entry&lt;br /&gt;
&lt;br /&gt;
[http://devstatus.com/ MySpace Command Collection] Quick and easy way to use the contextual information from Ubiquity on MySpace. Read syntax and examples on related pages.&lt;br /&gt;
&lt;br /&gt;
== Pawst.com ==&lt;br /&gt;
&lt;br /&gt;
Search social bookmarking websites using pawst.com&amp;lt;br&amp;gt;&lt;br /&gt;
Simply type &#039;pawst topic&#039; i.e &#039;pawst funny pics&#039;&lt;br /&gt;
&lt;br /&gt;
by [http://shmuel.ahdut.com Shmuel Ahdut] - licensed as MPL&lt;br /&gt;
&lt;br /&gt;
Subscribe: http://pawst.com (You&#039;ll get Ubiquity&#039;s subscribe popline)&amp;lt;br&amp;gt;&lt;br /&gt;
Script: http://pawst.com/javascripts/ubiquity.js&lt;br /&gt;
&lt;br /&gt;
== Sphinn ==&lt;br /&gt;
# [http://erikvold.com/tools/ubiquity/sphinn/sphinn.cfm sphinn]: Sphinns the typed url, or highlighted url, or otherwise the current page. Also get the sphinn count of the url in the preview.&lt;br /&gt;
&lt;br /&gt;
== Jaiku ==&lt;br /&gt;
Script: http://ubiquity.pastebin.com/f495c6d62&lt;br /&gt;
To add your username and api key use the command:&lt;br /&gt;
jaiku-setuserandkey &amp;lt;username&amp;gt; api &amp;lt;apikey&amp;gt; -- you can get your api key on http://api.jaiku.com&lt;br /&gt;
(inspired by http://trodrigues.net/ubiquity/pingfm/)&lt;br /&gt;
to post:&lt;br /&gt;
jaiku &amp;lt;you presence&amp;gt; at &amp;lt;location&amp;gt; : The location is optional, if you don&#039;t pass, the script will try to guess it using CmdUtils.getGeoLocation().&lt;br /&gt;
&lt;br /&gt;
== Idiquity ==&lt;br /&gt;
[http://geekmatters.com/Ubiquity/Idiquity.html Idiquity]allows updating and checking your timeline from Ubiquity. More functionality is to come; details are at the site. It is compatible with any Laconi.ca based site (or any site with a Twitter compatible API).&lt;br /&gt;
&lt;br /&gt;
== News and Feed Readers ==&lt;br /&gt;
&lt;br /&gt;
[http://i8news.appspot.com/ubiquity/nytimes.html NYTimes recent Headlines]: autosuggest recent headlines when you are typing; and if no matching, just hit enter, you will go to NYTimes.com search page. &lt;br /&gt;
&lt;br /&gt;
[http://www.bennysheerin.com/ubiquity.html Simple news feed]: Returns latest headlines from various vendors such as bbc, cnn and digg.&lt;br /&gt;
&lt;br /&gt;
[http://www.planetaki.com/ubiquity Planetaki Commands]: Add the website you&#039;re visiting to your Planet&lt;br /&gt;
&lt;br /&gt;
[http://cokeeffe.wordpress.com/get-news-for-ubiquity/ get-news]: Enables you to search Google News for news titles.&lt;br /&gt;
&lt;br /&gt;
== Nexopia ==&lt;br /&gt;
&lt;br /&gt;
=== Go to user profile ===&lt;br /&gt;
&lt;br /&gt;
Type &amp;quot;nexopia&amp;quot; and the user&#039;s name and it will take you directly to that user&#039;s profile on Nexopia.com.&lt;br /&gt;
&lt;br /&gt;
Script: http://jodyheavener.com/ubiquity/nexopia/&lt;br /&gt;
&lt;br /&gt;
== People Search ==&lt;br /&gt;
* [http://www.123people.com 123people]: Let&#039;s you search people meta data from around the world via Ubiquity.&lt;br /&gt;
* [http://avid.me/ubi/pipl.html pipl]: Searches for People&#039;s name on pipl.com&lt;br /&gt;
* [http://avid.me/ubi/chickipedia.html Chickipedia]: Searchs for Chickipedia, the world’s largest web-based, women-based, wiki-based database of hot chicks.&lt;br /&gt;
&lt;br /&gt;
== Serchilo ==&lt;br /&gt;
[http://wiki.serchilo.net/Serchilo:Ubiquity Serchilo in Ubiquity] allows using [http://serchilo.net Serchilo] commands in Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Slashdot ==&lt;br /&gt;
* [http://blipo.ath.cx/chkslashdot.html Check Slashdot]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scribd Slurrp ==&lt;br /&gt;
* [http://pastebin.com/f5a196f81 Slurrp a URL to Scribd.com]&lt;br /&gt;
&lt;br /&gt;
== Ping.fm ==&lt;br /&gt;
&lt;br /&gt;
Allows you to post messages via the ping.fm service.&lt;br /&gt;
&lt;br /&gt;
Script: http://ubiquity.washing-up.co.uk/pingfm.html&lt;br /&gt;
&lt;br /&gt;
The first time it is used, you must provide it with your ping.fm app key by typing &amp;quot;ping-set-key &amp;lt;your app key&amp;gt;&amp;quot;  Once it has stored your app key, you do not need to provide it again, and can just type &amp;quot;ping &amp;lt;message&amp;gt;&amp;quot;  Your app key can be found at [http://ping.fm/key http://ping.fm/key]&lt;br /&gt;
&lt;br /&gt;
== Tonight.eu ==&lt;br /&gt;
&lt;br /&gt;
Lets you to search venues, restaurants and events in some big european cities.&lt;br /&gt;
&lt;br /&gt;
Script: http://www.tonight.eu/ubiquity/&lt;br /&gt;
&lt;br /&gt;
== Bugmenot ==&lt;br /&gt;
&lt;br /&gt;
A password database site for general public. You can use this command to find passwords for free websites so you don&#039;t have to register to them.&lt;br /&gt;
&lt;br /&gt;
[http://www.yalazi.org/ubiquity/list.html For Ubiquity 0.1.x]&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/146668 For Ubiquity 0.5 (works in new parser)]&lt;br /&gt;
&lt;br /&gt;
== Google Bookmarks ==&lt;br /&gt;
Adds the current page to your Google bookmarks with the title you give it. Still rather rough - not robust against invalid inputs.&lt;br /&gt;
http://www.cs.washington.edu/homes/butaud/ubiquity.html&lt;br /&gt;
&lt;br /&gt;
Google bookmarks search.&lt;br /&gt;
It works like the google search owning shortcut and label display.&lt;br /&gt;
http://gist.github.com/187885&lt;br /&gt;
&lt;br /&gt;
Alternative: &lt;br /&gt;
[http://gist.github.com/93965 gbk and gbk-search]: Search and add bookmarks to Google Bookmarks.&lt;br /&gt;
&lt;br /&gt;
== Google Reader (shared items) ==&lt;br /&gt;
Adds the current selection to your Google Reader Shared Items page&lt;br /&gt;
and allows you to add a note to it.&lt;br /&gt;
[http://abauchu.net/ubiquity/share-on-reader.html share-on-reader command]&lt;br /&gt;
&lt;br /&gt;
Alternate Command: [http://pynej.blogspot.com/2008/10/ubiquity-command-note-in-reader.html Note in Reader]&lt;br /&gt;
&lt;br /&gt;
=== View Google Reader Items ===&lt;br /&gt;
Gread previews your inbox, starred, or shared: [http://gist.github.com/64695]&lt;br /&gt;
&lt;br /&gt;
==Gmail==&lt;br /&gt;
&lt;br /&gt;
* [http://fettig.net/playground/ubiquity/ Gmail Status Message] Update your Google Talk status message in Gmail&lt;br /&gt;
* [http://www.jpemartin.com/ubiq/smiley.html Smiley] Insert smileys into your email message (also works with other email or blog)&lt;br /&gt;
* [http://www.geocities.com/skyhopper88/GmailEdit.html GMail Edit] Edit of an old Ubiquity script to work with latest version (.1.1). Opens Gmail in a new tab, as well as showing you the last couple of new messages in the preivew.&lt;br /&gt;
* [http://www.strangeblackhole.com/sign-it/ Sign It] Now you can sign your message, blog post and other with HTML code.&lt;br /&gt;
&lt;br /&gt;
== Reddit ==&lt;br /&gt;
&lt;br /&gt;
[http://urdna.org/ubiquity Urdna&#039;s &#039;Reddit-This&#039; command]&lt;br /&gt;
&lt;br /&gt;
== Social Graph (FOAF/XFN etc) ==&lt;br /&gt;
&lt;br /&gt;
[http://danbri.org/2008/ubisg/ DanBri&#039;s &#039;foaf&#039; command] (calls Google SGAPI)&lt;br /&gt;
&lt;br /&gt;
== Stickam ==&lt;br /&gt;
&lt;br /&gt;
http://stickhacks.googlepages.com - Watch someone&#039;s live Stickam stream without going to their profile&lt;br /&gt;
&lt;br /&gt;
== mYoUvies.com ==&lt;br /&gt;
[http://myouvies.com/ubiquity/ movieshare]: Allows for simple posting to the social movie news website [http://myouvies.com mYoUvies.com]&lt;br /&gt;
&lt;br /&gt;
== Soup.io ==&lt;br /&gt;
[http://static.al3x.net/ubiquity.html soup] - replicates the functionality of the bookmarklet for the Soup.io tumblelogging service&lt;br /&gt;
&lt;br /&gt;
== shortText ==&lt;br /&gt;
&lt;br /&gt;
2 commands:&lt;br /&gt;
&lt;br /&gt;
* [http://shortText.com/ shorttext]: Creates a URL for any selected text&lt;br /&gt;
* [http://shortText.com/ longtext]: Select any shortText URL on any site and it will replace the URL with the actual content&lt;br /&gt;
&lt;br /&gt;
==Twitter==&lt;br /&gt;
* [http://benatkin.com/ubiquity/tweet/ Ben&#039;s tweet command]: post to twitter (with URL shortener)&lt;br /&gt;
* [http://www.tweetviz.com TweetViz: Twitter Visualiser]: Allows display of text in the TweetViz visualiser.&lt;br /&gt;
* [http://geekmum.com/ubiquity twittersearch]&lt;br /&gt;
* [http://www.matthias-schuetz.eu/twitter-ubiquity.html twitter]With timeline and auto completion for contacts&#039; names.&lt;br /&gt;
* [http://sites.google.com/site/coosgadgets/2ii 2ii], based on matthias&#039; work. Add current url replacement and shorten, hyperlink in the preview etc.&lt;br /&gt;
* [http://gist.github.com/52797 twtplus] Forked from 2ii. Cleared out &amp;quot;ugly hacks&amp;quot; and refactored a lot. New features include shortening all urls in a post, d message with friend username autocompletion, and posting as specified user account. Check out [http://damienh.org/2009/03/02/twtplus-the-missing-twitter-command-for-ubiquity-and-firefox/ this post] for more explanation.&lt;br /&gt;
* [http://gist.github.com/20044 otw] I can&#039;t type such a long username.&lt;br /&gt;
* [http://gist.github.com/38698 wtw] Twitter viewer.&lt;br /&gt;
&lt;br /&gt;
==Tumblr==&lt;br /&gt;
* [http://gist.github.com/48778 ptm] You can post to Tumblr. But please pay attention to L3 and L4 - email and password.&lt;br /&gt;
&lt;br /&gt;
==Diigo==&lt;br /&gt;
 * [http://gist.github.com/179632 Diigo] Add a page to your Diigo bookmarks&lt;br /&gt;
&lt;br /&gt;
==Github==&lt;br /&gt;
 * [http://gist.github.com/91353 github-user] Enhances github user page with repository sorting and additional repository&lt;br /&gt;
 stats.&lt;br /&gt;
&lt;br /&gt;
==Wordpress.com blogs==&lt;br /&gt;
* [http://gist.github.com/92304 gerdk] searches for terms in wordpress.com blogs&lt;br /&gt;
&lt;br /&gt;
==Goosh Command Shell==&lt;br /&gt;
* [http://gist.github.com/97091 opengoosh] opens the Goosh command shell.&lt;br /&gt;
&lt;br /&gt;
==Socialight Search==&lt;br /&gt;
* [http://gist.github.com/97094 socialight] allows to perform a search on [http://socialight.com/ socialight].&lt;br /&gt;
&lt;br /&gt;
==Qaiku==&lt;br /&gt;
&lt;br /&gt;
* [http://static.qaiku.com/js/ubiquity-command.js qaiku] allows you to [http://bergie.iki.fi/blog/qaiku_and_mozilla_ubiquity/ post Qaiku microblogs]&lt;br /&gt;
&lt;br /&gt;
==meme from Yahoo==&lt;br /&gt;
* [http://plets.com.br/meme/ meme] allows you to [http://meme.yahoo.com/ post to meme]&lt;br /&gt;
&lt;br /&gt;
= Web 3.0 (Web Of Data, Semantic Web, etc) =&lt;br /&gt;
Commands allowing the access or manipulation Web 3.0 content, that is [http://www.w3.org/RDF/ RDF]-based datasets such as [http://linkeddata.org linked data].&lt;br /&gt;
&lt;br /&gt;
* [http://srv.buzzword.org.uk/ Cognition] microformat/RDF/RDFa/eRDF/GRDDL parser.&lt;br /&gt;
*# &amp;lt;code&amp;gt;cognify&amp;lt;/code&amp;gt;&lt;br /&gt;
*[http://jowl.ontologyonline.org/Ubiquity.html jOWL Ubiquity command], Visualize and query on OWL-DL files with [http://jowl.ontologyonline.org jOWL]&lt;br /&gt;
*# &amp;lt;code&amp;gt;view_ontology&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Microformats ==&lt;br /&gt;
* Microformats Extraction commands available at http://transformr.co.uk/&lt;br /&gt;
*#commands: &lt;br /&gt;
*#* &amp;lt;code&amp;gt;get-atom&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hatom hAtom] &lt;br /&gt;
*#* &amp;lt;code&amp;gt;get-vcard&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hcard hCard] &lt;br /&gt;
*#* &amp;lt;code&amp;gt;get-webcal&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/hcalendar hCalendar]&lt;br /&gt;
*#* &amp;lt;code&amp;gt;get-podcast&amp;lt;/code&amp;gt; from [http://microformats.org/wiki/haudio hAudio] &lt;br /&gt;
*#* &amp;lt;code&amp;gt;get-rdf&amp;lt;/code&amp;gt; from [http://www.w3.org/TR/xhtml-rdfa-primer/ RDFa]&lt;br /&gt;
&lt;br /&gt;
* Search the [http://microformats.org/wiki/ Microformats Wiki] available at http://weborganics.co.uk/&lt;br /&gt;
*#command: &lt;br /&gt;
*#* &amp;lt;code&amp;gt;uf-search&amp;lt;/code&amp;gt; (search term)&lt;br /&gt;
&lt;br /&gt;
== WoD ==&lt;br /&gt;
[[User:MichaelHausenblas|Michael Hausenblas]] has put together a [http://sw.joanneum.at/ubiq/ collection of WoD commands]. Currently three commands are available:&lt;br /&gt;
* query the semantic indexer [http://sindice.com Sindice] for a term&lt;br /&gt;
* lookup [http://dbpedia.org/About DBpedia] resources [http://gist.github.com/59915 lookupNdbpedia]&lt;br /&gt;
* lookup [http://dbpedia.org/About DBpedia] for things in a certain category&lt;br /&gt;
* perform a [http://curl.haxx.se/ curl] HEAD for a URI&lt;br /&gt;
&lt;br /&gt;
Some more commands&lt;br /&gt;
&lt;br /&gt;
* [http://gist.github.com/103266 lookup RDF namespaces by prefix at prefix.cc]&lt;br /&gt;
* [http://gist.github.com/103269 search for RDF vocabulary terms at schemacache.com ]&lt;br /&gt;
* [http://gist.github.com/103265 send current url to http://morph.talis.com ] and preview data&lt;br /&gt;
&lt;br /&gt;
== Crunchbase ==&lt;br /&gt;
[http://bnode.org/about Benjamin Nowack] has written the [http://cb.semsol.org/ubiquity cb command] allowing to do [http://www.crunchbase.com/ CrunchBase] lookups for companies, products or people.&lt;br /&gt;
&lt;br /&gt;
== Twine ==&lt;br /&gt;
[http://static.isnotworking.com/add-to-twine.html add-to-twine]: &lt;br /&gt;
Brings up the dialog for posting the current page to [http://twine.com Twine].&lt;br /&gt;
&lt;br /&gt;
== Linked Data Exploration ==&lt;br /&gt;
[http://demo.openlinksw.com/ubiq OpenLink Web Resource Description Commands] - Commands for obtaining structured descriptions of Web Resources. Uses [http://virtuoso.openlinksw.com/ Openlink Virtuoso]&#039;s in-built RDFization Middleware (&amp;quot;Sponger&amp;quot;) and Linked Data Deployment technology.&lt;br /&gt;
&lt;br /&gt;
== Link lookup and insertion ==&lt;br /&gt;
[http://demo.monrai.com summon command] - look up a link representing the keywords or phrase you enter, and inserts it into the page. Good for quickly inserting links into emails, blog, blog comments, twitter, etc.&lt;br /&gt;
&lt;br /&gt;
== headup ==&lt;br /&gt;
[http://www.headup.com/ubiquity.html headup]: Connect the artist / city / person / company / movie / book / etc - with  relevant and personalized information, using the headup Firefox addon - [http://www.headup.com Get headup].&lt;br /&gt;
&lt;br /&gt;
== RDFa ==&lt;br /&gt;
&lt;br /&gt;
[http://yergler.net/projects/ubiquity-rdfa-commands/ RDFa commands]: [http://www.w3.org/2006/07/SWD/RDFa/impl/js/ RDFa WG bookmarklets] as Ubiquity commands&lt;br /&gt;
&lt;br /&gt;
= Visualization =&lt;br /&gt;
* [http://code.google.com/p/tl-ubiquity-commands/source/browse/trunk/visualization/word-cloud.js word-cloud] generates a &#039;word cloud&#039; from the selected text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Clocks =&lt;br /&gt;
* analog clock - http://www.jpemartin.com/ubiq/time.html (also allows you to specify a timezone)&lt;br /&gt;
* minute-minder: show the time on page-load - http://individual.utoronto.ca/duez/cw.html&lt;br /&gt;
* MJD to UTC and UTC to MJD converters: [http://www.storybookdachshunds.com/surlyfritter/  mjd2utc and utc2mjd]&lt;br /&gt;
*show time in : show the current time of the specified place and this command is comppatible with parser 2 [http://gist.github.com/147092 show-time-in]&lt;br /&gt;
see also swies&#039;s commands, below&lt;br /&gt;
* [http://swapoff.org/files/ubiquity_time/ An international clock (plus flags!)] This looks pretty cool but say, Moscow time is off by one hour! Looks like the problem with EarthTools, maybe use something else?&lt;br /&gt;
* Sleep.fm [http://gist.github.com/114601] - Allows you to set an alarm in sleep.fm.&lt;br /&gt;
* [http://gist.github.com/188939 Calendar] with country holidays + clock&lt;br /&gt;
&lt;br /&gt;
= Travel =&lt;br /&gt;
* [http://widgets.bootsnall.com/ubiquity/flight.html flight search]&lt;br /&gt;
* [http://blog.mikelorengo.com/2008/09/ubiquitizing-jenn-for-flight.html fly-alaskaair]. Shops for flights on Alaska Airlines and Horizon Airlines  &amp;quot;fly-alaskaair (cmd)&amp;quot; where (cmd) can be free form text. Examples include:&lt;br /&gt;
** fly-alaskaair sea lih 02/11/2009 return 02/25/2009&lt;br /&gt;
** fly-alaskaair sea lax next thursday return sunday&lt;br /&gt;
** fly-alaskaair sea sjd next wednesday one way&lt;br /&gt;
* [http://widgets.bootsnall.com/ubiquity/hotel.html hotel search]&lt;br /&gt;
* [http://widgets.bootsnall.com/ubiquity/vacation.htmlvacation package search] (flight+hotel together)  &lt;br /&gt;
* [http://widgets.bootsnall.com/ubiquity/car.html car rental search]&lt;br /&gt;
&lt;br /&gt;
= Maths = &lt;br /&gt;
* Converts selected amount to foreign currency (currently supports over 60 currencies) http://users.tpg.com.au/tbchris&lt;br /&gt;
* [http://www.verdsveven.com/ubiquity/metric.html metric]: Converts numbers to metric units. Can recognize numbers in the selection and replace them. &#039;&#039;&#039;This version is outdated, new version for Parser2 API is available&#039;&#039;&#039; [http://vivalaevolucion.free.fr/code/metric.htm here].&lt;br /&gt;
* [http://earth2marsh.com/ubiquity/charts.html chart-tools]: Draws a bar, line, or pie chart with labels, based on selected tabular data.&lt;br /&gt;
* [http://samespirit.net/ricky/dev/ubiquity/chart.html  chart]: Draws a line chart using the Google Charts API based on a selected table row.&lt;br /&gt;
* temperature converter - http://www.jpemartin.com/ubiq/temp.html&lt;br /&gt;
* base64 decode / encode - http://taukon.de/ubiquity-base64.php&lt;br /&gt;
* Integrate - http://tat.wright.name/ubiquity/integrate.html&lt;br /&gt;
* gcalc (interface to Google&#039;s calculator; converts units and currencies, knows constants of nature etc.) - http://math-www.uni-paderborn.de/~axel/ubiquity_gcalc.html&lt;br /&gt;
* calculate2 (a good calculator) - http://www.jpemartin.com/ubiq/calc2.html&lt;br /&gt;
* currency (interface to iGoogle currency converter) - http://waleed.doubleudesigns.com/2008/09/currency-conversion-ubiquity/&lt;br /&gt;
&lt;br /&gt;
= Programming / development tools =&lt;br /&gt;
&lt;br /&gt;
* [http://www.ewitk.com/char-count.html char-count] is a command to count the number of characters in a block of selected text.&lt;br /&gt;
* [http://www.dahius.com/projects/ubiquity/pwgen/ pwgen] is a password generator service (http://pwgen.net)&lt;br /&gt;
* Whatismyip - http://www.srobbin.com/ubiquity-commands/whatismyip/&lt;br /&gt;
* [http://gist.github.com/10371 comments]: Display html comments on the page as css roll-over popups&lt;br /&gt;
* [http://mitcho.com/code/select select] - select gives you read access to your MySQL databases right from Ubiquity, with smart suggestions of your table and column names.&lt;br /&gt;
&lt;br /&gt;
= String Tools =&lt;br /&gt;
&lt;br /&gt;
* [http://erikvold.com/tools/ubiquity/length/length.cfm string-length]: Displays the length of the provided string.&lt;br /&gt;
&lt;br /&gt;
= Random tools =&lt;br /&gt;
* [http://jasonwilsondesign.com/development-locker/ubiquity-commands/BBFlickr.php BBFlickr]: Quickly translates Flickr&#039;s generated HTML links to BBCode in your clipboard.&lt;br /&gt;
* [http://www.bennysheerin.com/ubiquity_open.html  open]: Allows you to quickly open your favourite web sites.&lt;br /&gt;
* open-in-tab - http://bergius.org/ubiquity/?open-in-tab&lt;br /&gt;
* Twurl shorten URL - http://xolotl.org/ubiquity&lt;br /&gt;
* xkcd (shows latest xkcd comic in preview pane, and allows selecting prior comics by number or going back in history with negative numbers) - http://alexsydell.com/applications/ubiquity/xkcd/&lt;br /&gt;
* flags of the world - http://www.jpemartin.com/ubiq/flag.html&lt;br /&gt;
* forecast - http://dothejustice.com/forecast/&lt;br /&gt;
* images (shows only the images on a page) - http://kloudsolutions.com&lt;br /&gt;
* [http://erikvold.com/tools/ubiquity/comicstrip/comicstrip.cfm  comicstrip]: Allows you to view a comicstrip and drop the image into an area selected (such as a gmail email). So far the command supports bc, bornloser, dilbert, garfield, getfuzzy, herman, monty, peanuts, penny-arcade, offthemark, opus, userfriendly, workingitout, and xkcd.&lt;br /&gt;
* [http://members.optusnet.com.au/~crazyjane13/lolcats.html lolcats]:  Retrieves the latest LOLCAT in the preview, jumps to page on execute - by Brett Dalton&lt;br /&gt;
*[http://members.optusnet.com.au/~crazyjane13/roll.html roll]:  Dice rolling verb, rolls single, multiple dice of any size with option for variable dificulty exploding dice pool (as per World of Darkness) - by Brett Dalton&lt;br /&gt;
* [http://gist.github.com/165471 roll]: Simple die rolling similar to the /roll command found in many MMORPG games. &amp;quot;roll x&amp;quot; will roll a x-sided die.&lt;br /&gt;
*[http://student.dei.uc.pt/~rmramos/ubiquity/lorem.html lorem]: Allows you to copy any given number of words or paragraphs of the &amp;quot;Lorem Ipsum&amp;quot; placeholder text onto your Clipboard, useful if you want to paste it in some other application afterward. Use: lorem [num] nice [words||paragraphs]&lt;br /&gt;
* nofollow  - Preview counts no-follow links and execute highlights them. [[http://surfmind.com/lab/mozilla/ubiquity/nofollow.html Install Page]], [[http://surfmind.com/lab/mozilla/ubiquity/nofollow.js Script:]], [[http://flickr.com/photos/andyed/2767130077/in/photostream/ Preview]]&lt;br /&gt;
* [http://www.rakudave.ch/?q=node/26 Rhyme] a word&lt;br /&gt;
* [http://common-lisp.net/project/lifp/ubiquity/sharebee.htm sharebee-download] Sharebee &lt;br /&gt;
* [http://insideoutsites.com/ubiquity/ xbl] - displays your xbox live friends list in the preview window&lt;br /&gt;
* [http://www.nt7s.com/blog/ubiquity-qrz/ qrz] - Lookup amateur radio callsigns on the QRZ.com server.&lt;br /&gt;
* [http://www.kornnuts.com/dev/barcode/qrcode.php qrcode] - generate QR codes for the current page url or any desired text.&lt;br /&gt;
* [http://www.briandgoad.com/blog/ubiquity-commands/websourceit/ websource] - Compares the popularity on the internet of two (or more) terms using Websource.It&lt;br /&gt;
* [http://www.developerfriendly.com/ubiquity/roll.php UbiquityRoll] - get your roll on demand, currently supports rickroll duckroll and hoodroll&lt;br /&gt;
* [http://www.nasser.me/ubiquity/rapidsharecom-link-checker/ rscheck] - check selected links on rapidshare.com link checker.&lt;br /&gt;
* [http://f.resourcehog.net/has-swearing.php has-swearing] - check to see if the selected text has any swearing in it; highlights any instances of swearing.&lt;br /&gt;
* [http://www.dib0.nl/ubiquity.html open-all-bookmarks-in-tabs] - opens all bookmarks filed under the given folder in new tabs. It is also possible to open bookmarks with a specific tag.&lt;br /&gt;
* [http://www.geocities.com/ubiquities1 reverse-telephone] - reverse lookup on a german telephone number via das-oertliche.de&lt;br /&gt;
* [http://www.watersheep.org/~markh/screengrab.html screengrab] - takes a screen grab of the current page.&lt;br /&gt;
* [http://stuarthendren.net/printwyl printwyl] - opens current page in [http://www.printwhatyoulike.com PrintWhayYouLike.com] so you can create a better print out of the information you need.&lt;br /&gt;
* [http://yonen.ca/ubiquity2.html qr_code] - Generates QR Code images.&lt;br /&gt;
* [http://gist.github.com/21311 notepad] - Opens Notepad on Windows&lt;br /&gt;
* [http://gist.github.com/21319 paint] - Opens MS Paint on Windows&lt;br /&gt;
* [http://gist.github.com/76857 magnifier] - Opens magnifier on Windows&lt;br /&gt;
* [http://mike.thedt.net/ubiquity/note/note.php note] - The purpose of this command is to quickly save the inputted text (can be selected text or your own text) to a file on your disk without having to launch a text editor.&lt;br /&gt;
* [http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/fx-update-scanner.html fx update scanner] - Update checks for restricted user accounts&lt;br /&gt;
* [http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/gd-upload.html google docs upload] - Uploads a document to Google Docs via URL&lt;br /&gt;
* [http://boardraider-ubiquity-commands.googlecode.com/svn/trunk/vacuum.html vacuum] - Executes the VACUUM statement on SQLite databases&lt;br /&gt;
* [http://gist.github.com/62707 d20] - Searches d20srd.org.&lt;br /&gt;
* [http://kilianvalkhof.com/uploads/ubiquity-binary Binary tools] - Convert text to binary, and the other way around.&lt;br /&gt;
* [http://kilianvalkhof.com/uploads/ubiquity-yoda Yoda speak] - Convert text to how master Yoda would say it.&lt;br /&gt;
* [http://gist.github.com/70761 lyric]: Lookup song lyrics from lyrics.astraweb.com&lt;br /&gt;
* [http://gist.github.com/69722 muni]: Grab San Francisco, CA muni bus arrival information from nextmuni.com.  &#039;&#039;example: muni 24 at Divis and Fulton&#039;&#039;&lt;br /&gt;
* [http://gist.github.com/71981 sqliteutils]: Treats firefox&#039;s builtin sqlite.&lt;br /&gt;
* [http://gist.github.com/67522 undo-closed-tabs]: Reopens tabs you&#039;ve closed recently.&lt;br /&gt;
* [http://gist.github.com/54051 newtab]: Open new tab as...&lt;br /&gt;
* [http://gist.github.com/49362 copy]: Copy to clipboard with some format. (like CopyURL+)&lt;br /&gt;
* [http://gist.github.com/59296 uaswitch]: Switch useragent and open current page again.&lt;br /&gt;
* [http://gist.github.com/64812 xbox360card]: Copy the gamer card of an Xbox Live user.&lt;br /&gt;
* [http://www.zentu.net/ubiq/failblog.html fail] image grabber from [http://www.failblog.org failblog.org]&lt;br /&gt;
* [http://www.zentu.net/ubiq/engrishfunny.html engrish] funny image grabber from [http://www.engrishfunny.com engrishfunny.com]&lt;br /&gt;
* [http://www.zentu.net/ubiq/hotdog.html hotdog] image grabber from [http://www.ihasahotdog.com ihasahotdog.com]&lt;br /&gt;
* [http://gist.github.com/134987 track-package]: Tracks packages via Fedex, UPS, USPS, DHL sites.&lt;br /&gt;
* [http://217.209.1.243/~sertion/ubiquity/colours/ colours] is an easy way to compare colors side by side. Uses hex-colors.&lt;br /&gt;
* [http://gist.github.com/144985 places]: Places command for searching history &amp;amp; bookmarks&lt;br /&gt;
&lt;br /&gt;
==Flip==&lt;br /&gt;
* [http://www.michaeltheweissman.com/flip flip]: Flips text uʍop ǝpısdn&lt;br /&gt;
* [http://myishi.homeip.net:8080/misc/unicode-inversion.php invert]: Generate inverted (ʇɹəʌuı), reversed (ɘƨяɘvɘя), or small-capped text (sᴍᴀʟʟ ᴄᴀᴘs)&lt;br /&gt;
&lt;br /&gt;
==Bookmark-Jump==&lt;br /&gt;
* [http://www.iamnub.com:81/bookmark-jump.html]: Opens a bookmark by name&lt;br /&gt;
&lt;br /&gt;
=Development Tools=&lt;br /&gt;
== Gecko Development ==&lt;br /&gt;
* [http://sites.google.com/site/cgranade/projects/ubiquity-scripts xpc-interfaces]: Queries a list of interfaces supported by a given XPCOM contract ID.&lt;br /&gt;
&lt;br /&gt;
=Other Web Applications=&lt;br /&gt;
== Woot ==&lt;br /&gt;
[http://gist.github.com/41227 Woot Checker] - Previews the current Woot item and takes you to the &amp;quot;Want One&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
== ESV bible ==&lt;br /&gt;
[http://www.duncanandmeg.org/projects/ubiquity-esv-insert.php insert from ESV, search with ESV] - &#039;&#039;&#039;Compatible with Ubiquity 0.5&#039;&#039;&#039; Either insert text into the current selection from a passage in the ESV Bible, or search the ESV for a given passage or phrase.&lt;br /&gt;
&lt;br /&gt;
== Amazon ==&lt;br /&gt;
=== Wish List ===&lt;br /&gt;
[http://jplorenti.googlepages.com/ubiquity-wishamazon WishAmazon] - Allows adding any product page on the web to your Amazon Wish List. Similar functionality to the Amazon Universal Wish List bookmarklet.&lt;br /&gt;
&lt;br /&gt;
[http://avid.me/ubi/skreemr.html Skreemr] - Searches Skreemr.com for downloading Mp3&#039;s&lt;br /&gt;
&lt;br /&gt;
== BookMooch ==&lt;br /&gt;
[http://www.sillybean.net/downloads/ubiquity-commands.html mooch] - Search [http://bookmooch.com/ BookMooch] for the term you provide.&lt;br /&gt;
&lt;br /&gt;
== Finances ==&lt;br /&gt;
=== Buxfer ===&lt;br /&gt;
[http://gist.github.com/66959 buxfer-spend, buxfer-receive] - Adds a transaction to www.buxfer.com using its remote API, spending or receiving a given amount. (Homepage [http://sites.google.com/site/edgargoncalves/work/software/ubiquity here]).&lt;br /&gt;
&lt;br /&gt;
[http://dl.getdropbox.com/u/103378/projects/buxferubiquity/buxferubiquity.html twixfer] - Adds a transaction to www.buxfer.com, using the Twitter API (obsolete - use buxfer-spend and buxfer-receive instead) (Homepage [http://sites.google.com/site/edgargoncalves/work/software/twixfer here]).&lt;br /&gt;
&lt;br /&gt;
== Google Voice ==&lt;br /&gt;
[http://earth2marsh.com/ubiquity/googlevoice call] - Calls any selected 10-digit number (or enter on command line)&lt;br /&gt;
&lt;br /&gt;
== Internet Radio ==&lt;br /&gt;
[http://gist.github.com/94775  What is being played on Radio Paradise? (rp)] - Displays the artist and name of the song that Radio Paradise is playing right now.&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://gist.github.com/129512 Last.FM Radio Starter] - Starts the similar artists radio station for whatever artist you punch in.&lt;br /&gt;
&lt;br /&gt;
== GTD ==&lt;br /&gt;
=== gtd-php ===&lt;br /&gt;
[http://www.gtd-php.com/Developers/Ubiquity gtdphp] - &amp;lt;tt&amp;gt;gtdin&amp;lt;/tt&amp;gt; adds an inbox item, and &amp;lt;tt&amp;gt;gtdref&amp;lt;/tt&amp;gt; creates a reference to the current page, as a child of a specific project&lt;br /&gt;
=== Remember The Milk ===&lt;br /&gt;
* [http://garyhodgson.com/ubiquity/rtm-api.html rtm-*] - Commands to manage your Remember The Milk task lists.  Add, postpone, prioritise, complete, move and view commands are available.&lt;br /&gt;
* [http://garyhodgson.com/ubiquity/rtm.html rtm (bookmarklet)] - Opens the RTM [http://www.rememberthemilk.com/help/answers/quickadd/ quick-add bookmarklet].&lt;br /&gt;
&lt;br /&gt;
=== Gubb ===&lt;br /&gt;
[http://ivancho.awardspace.com/ubiquity/gubb.html gubb-*] - Interface to [http://gubb.net Gubb], with adding items and inserting lists/contents functionality.&lt;br /&gt;
&lt;br /&gt;
=== Nozbe ===&lt;br /&gt;
[http://wiki.github.com/svd/ubiquity-commands nozbe-*] - commands to manage tasks in Nozbe.&lt;br /&gt;
&lt;br /&gt;
=== mite ===&lt;br /&gt;
[http://mite.yo.lk/en/platform/ubiquity.html mite-*] - Track your working hours: add new time entries to your mite.account or start/stop a timer.&lt;br /&gt;
&lt;br /&gt;
== Science ==&lt;br /&gt;
=== NCBI ===&lt;br /&gt;
[http://gist.github.com/67266] - Very preliminary attempt to access NCBI and other genomic resources - currently only Pubmed&lt;br /&gt;
&lt;br /&gt;
== Wikis ==&lt;br /&gt;
=== TiddlyWiki ===&lt;br /&gt;
[http://garyhodgson.com/ubiquity/tiddlywiki.html tw-*] - Allows you to Create, Open, or Search for keywords within, Tiddlers from your [http://www.tiddlywiki.com/ TiddlyWiki]&lt;br /&gt;
&lt;br /&gt;
== Temporary Email Address ==&lt;br /&gt;
=== Jetable.org ===&lt;br /&gt;
Script: http://gist.github.com/11261&lt;br /&gt;
&lt;br /&gt;
Creates a temporary Jetable email address for a given life span (one hour, one day, one week, one month).&lt;br /&gt;
=== Mailinator.com ===&lt;br /&gt;
mailinator - http://gist.github.com/16415&lt;br /&gt;
&lt;br /&gt;
Opens the mailinator inbox of the typed name.&lt;br /&gt;
=== Spambox.us ===&lt;br /&gt;
http://gist.github.com/41634&lt;br /&gt;
&lt;br /&gt;
Creates a temporary Spambox.us email address for a given life span (half hour, hour, half day, day, week, month, half year, year).&lt;br /&gt;
&lt;br /&gt;
== TheSixtyOne.com ==&lt;br /&gt;
[http://www.jpemartin.com/ubiq/pause-TSO.html pause-TSO] pause and resume music playback.&lt;br /&gt;
&lt;br /&gt;
== World of Warcraft ==&lt;br /&gt;
* Gryffyn&#039;s Basic Allakhazam Lookup w/Preview: http://www.gryffyndevelopment.com/ubiquity/alla.html&lt;br /&gt;
* Zenwolf&#039;s WoW Armory Command: [http://www.annieandmatt.com/ubiquity/wowarmory.html Subscribe/View code here]&lt;br /&gt;
* Amosh&#039;s Wowhead Database Search [http://gist.github.com/19910]&lt;br /&gt;
&lt;br /&gt;
== instapaper.com bookmarklet ==&lt;br /&gt;
&lt;br /&gt;
[http://www.duncanandmeg.org/projects/ubiquity-instapaper.php instapaper]: Saves current page to read later on [http://www.instapaper.com/ Instapaper]. If you select some text from the page, it will be stored as the summary. This command will store your instapaper login and password in the browser password manager. Uses the new [http://blog.instapaper.com/post/73123968/read-later-api instapaper API].&lt;br /&gt;
&lt;br /&gt;
[http://static.al3x.net/ubiquity.html later]: an alternate implementation that mimics the instapaper.com bookmarklet (requires your bookmarklet hash key). Might be a dead link now???&lt;br /&gt;
&lt;br /&gt;
== laterloop.com Bookmarklet/RSS ==&lt;br /&gt;
[http://gist.github.com/10172 laterloop-this]: Mimics functionality of the [http://www.laterloop.com laterloop] bookmarklet.&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10172 laterloop]: Shows items you have saved for later in your preview.  Allows for paging and can open a specific item through use of an &amp;quot;open #&amp;quot; modifier.&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/10172 laterloop-clear]: Utility command to clear out preference values stored when initially setting up the laterloop and laterloop-this commands.&lt;br /&gt;
&lt;br /&gt;
== Shoutcast Search ==&lt;br /&gt;
http://myfirstscript.blogspot.com/2008/10/ubiquity-is-awesome_06.html&lt;br /&gt;
Search for anything in Shoutcast, artist, song, genre. use it everytime you wanna hear that one great song!.&lt;br /&gt;
&lt;br /&gt;
== ROT13 ==&lt;br /&gt;
[http://www.randomloci.com/dev/ubiquity/rot13.php ROT13]: Translate selected text using the ROT13 algorithm. Background [http://www.randomloci.com/dev/ubiquity/index.php here].&lt;br /&gt;
&lt;br /&gt;
== KeepVid ==&lt;br /&gt;
[http://gist.github.com/113841 KeepVid]: Download any YouTube Video straight from Ubiquity via KeepVid!&lt;br /&gt;
&lt;br /&gt;
== OpenStreetMap ==&lt;br /&gt;
[http://gist.github.com/150292 osm]: Search for a location and find the OpenStreetMap map of the area.&lt;br /&gt;
&lt;br /&gt;
= Firefox Extension Integrations =&lt;br /&gt;
&lt;br /&gt;
== Greasemonkey ==&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/greasemonkey/gm.cfm greasemonkey]: Searches for available Greasemonkey menu commands, and displays them to you in preview, and offers you the ability to execute them with an input string.&lt;br /&gt;
&lt;br /&gt;
= Command collections =&lt;br /&gt;
&lt;br /&gt;
[http://devstatus.com/ MySpace command collection]: MySpace Command Collection&lt;br /&gt;
&lt;br /&gt;
[http://gist.github.com/101767 StumbleUpon Command Set] adds Stumble functionality to Ubiquity. Has three commands: stumble, want (&amp;quot;Thumbs-Up&amp;quot;), and does-not-want (&amp;quot;Thumbs-Down&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
[http://ianj.appspot.com/insert Insert words using a keyword]: insert and learn-to-insert&lt;br /&gt;
&lt;br /&gt;
[http://jorgensen.ian.googlepages.com/size.html Screen Resolution commands]: size and resize&lt;br /&gt;
&lt;br /&gt;
[http://liketribe.com/liketribe/lktrb-ubiquity.html liketribe]: chat with an intelligent assistant bot to get recommendations, directions, weather, connect with friends, or just ramble on aimlessly.&lt;br /&gt;
&lt;br /&gt;
[http://www.tonight.eu/ubiquity/ Tonight]: searches for venues, restaurants and events in your city, near a specific location.&lt;br /&gt;
&lt;br /&gt;
[http://www.bennysheerin.com/ubiquity.html news command]: simple news command.&lt;br /&gt;
&lt;br /&gt;
[http://www.rakudave.ch/?q=node/18 rakudave&#039;s commands]: firefox add-ons, ubuntu brainstorm, just-ping, rhyme&lt;br /&gt;
&lt;br /&gt;
[http://widgets.bootsnall.com/ubiquity/everystockphoto.html Everystockphoto.com]: Search for images at everystockphoto.com&lt;br /&gt;
&lt;br /&gt;
[http://widgets.bootsnall.com/ubiquity/shopping-search.html Shopping.com]: Search for products and compare prices at Shopping.com&lt;br /&gt;
&lt;br /&gt;
[http://mika.lepisto.com/ubiquity-commands-160.html Ubiquity Commands by Mika]: Random commands including Everystockphoto.com and Shopping.com referenced above.&lt;br /&gt;
&lt;br /&gt;
[http://www.ubiqcmds.co.nr issi_noho&#039;s (and others) commands]: torrentz.com and more soon. Submit your command here.&lt;br /&gt;
&lt;br /&gt;
[http://www.thecompgeek.info/ubiquity/ CyberPrime&#039;s Commands]: SearchMe.Com, demonoid, about:commands and much more to come&lt;br /&gt;
&lt;br /&gt;
[http://enobrev.info/ enobrev&#039;s commands]: php and html (with auto-completion)&lt;br /&gt;
&lt;br /&gt;
[http://swieskowski.net/verbs/ swies&#039;s commands]: dog, clock, msdn&lt;br /&gt;
&lt;br /&gt;
[http://foyrek.com/ubi.html Abi&#039;s commands]&lt;br /&gt;
&lt;br /&gt;
[http://erikvold.com/tools/ubiquity/index.cfm Erik Vold&#039;s Commands]: backtype, charlierose, coldfusion, comicstrip, dictionary, greasemonkey, inlinks-yahoo, jquery, mixx, mysql, quarkbase, sphinn.&lt;br /&gt;
&lt;br /&gt;
[http://dietrich.ganx4.com/mozilla/ubiquity.html Dietrich&#039;s commands]&lt;br /&gt;
&lt;br /&gt;
[http://www.gilbertpellegrom.co.uk/2008/08/27/my-ubiquity-commands/ Gilbert&#039;s commands]: date, time-12, time-24&lt;br /&gt;
&lt;br /&gt;
[http://www.bjtitus.net/ubiquity/ Brandon&#039;s Commands]: FriendFeed&lt;br /&gt;
&lt;br /&gt;
[http://www.fuzzhead.com/ubiquity.html Fuzzhead&#039;s Commands]: What&#039;s My IP?&lt;br /&gt;
&lt;br /&gt;
[http://lokonline.com/ip/ubiq.html Improved IP address retrieval] Should work for ipv6 too.&lt;br /&gt;
&lt;br /&gt;
[http://sites.google.com/site/ubiquitycommands/ Whatthechuck&#039;s commands]: validate (W3C markup validator), vimeo&lt;br /&gt;
&lt;br /&gt;
[http://npattison.com/ubiquity/ Nickworks&#039;s commands]: Seeqpod, PHP.net&lt;br /&gt;
&lt;br /&gt;
[http://aufrank.net/ubiquity/ aufrank&#039;s commands]:  gfl, urej&lt;br /&gt;
&lt;br /&gt;
[http://mysite.verizon.net/zaduma/ calhoun_ftw&#039;s commands]: Embiggen TinyURL replacer adaption, newegg, pirate bay, many more, releasing new always.&lt;br /&gt;
&lt;br /&gt;
[http://www.mzzt.net/ubiq.html mzzt.net commands]: remove/replace selection, detach tab to new window, open chromeless window&lt;br /&gt;
&lt;br /&gt;
[http://ubiquity.skumleren.net FreakCERS&#039;s commands]: latex&lt;br /&gt;
&lt;br /&gt;
[http://satf.se/projects/ubiquity-commands/ satf commands]: &amp;lt;blink&amp;gt;, jaen, fix-all-problems, last.fm&lt;br /&gt;
&lt;br /&gt;
[http://web.me.com/yaztromo/rot13-ubiq.html Yaz&#039;s Commands]: rot13&lt;br /&gt;
&lt;br /&gt;
[http://hoffstein.net/ubiquity hoffstein&#039;s commands]: stock-quote, stock-chart&lt;br /&gt;
&lt;br /&gt;
[http://nocturne.net.nz/verbs Bayard&#039;s commands]: WoWhead, WoW Armoury, BBCode&lt;br /&gt;
&lt;br /&gt;
[http://grantrules.com/ubiquity Grant&#039;s commands]: Facebook, Lorem Ipsum generator, MD5/Sha1 hashes, Penis flood, What.cd artist/torrent search, UPS/USPS/FedEx tracking&lt;br /&gt;
&lt;br /&gt;
[http://www.gfx-fr.com/ubiquity/ Setsuna666&#039;s commands]: Amazon Canada &lt;br /&gt;
&lt;br /&gt;
[http://www.yalazi.org/ubiquity/list.html Onur Yalaz?&#039;s commands]: kissalt, bugmenot  &lt;br /&gt;
&lt;br /&gt;
[http://labs.vunite.com/vubiqs/verbs.php vunite&#039;s commands]: goto, shorten, craigslist&lt;br /&gt;
&lt;br /&gt;
[http://common-lisp.net/project/lifp/ubiquity/ Timofei Shatrov&#039;s commands]: clhs, myip, urban-dictionary-search, sharebee-download&lt;br /&gt;
&lt;br /&gt;
[http://jimmahdigital.com/ubiq/ Jim&#039;s commands]: add-to-reader&lt;br /&gt;
&lt;br /&gt;
[http://www.phoque.de/projekte/ubiquity/ phoque.de]: Add marked text to your blog&lt;br /&gt;
&lt;br /&gt;
[http://www.srobbin.com/ubiquity-commands/ srobbin.com]: whatismyip&lt;br /&gt;
&lt;br /&gt;
[http://tim.sorbera.googlepages.com/ubiquity.html Mini-Geek&#039;s commands]: homestar-runner-wiki, starcraft-wiki, tniv-bible-passage, tniv-bible-word, webster-dictionary, webster-thesaurus, open-url, ign, and fileshack&lt;br /&gt;
&lt;br /&gt;
[http://www.geero.net Geero&#039;s commands]: Last.fm track search, Bible Gateway ESV URL builder&lt;br /&gt;
&lt;br /&gt;
[http://www.jasonsmith.ca/articles/ubiquity_by_mozilla_labs amazon-search-all]: Search all items on [http://www.amazon.com Amazon.com]&lt;br /&gt;
&lt;br /&gt;
[http://www.mikedeboer.nl Mike&#039;s commands]: mail (uses mailto: urls)&lt;br /&gt;
&lt;br /&gt;
[http://www.bpeers.com/ubiq/ bpeers.com]: ticker (preview or paste a stock quote and its change); bling (currency conversion in google syntax)&lt;br /&gt;
&lt;br /&gt;
[http://static.al3x.net/ubquity.html]: bit.ly, Instapaper, Soup.io, Google Reader subscribe, Twitter Search, Yep, zap CSS&lt;br /&gt;
&lt;br /&gt;
[http://kollektive.com/ubiquity/ kollektive]: links - converts non-marked up text/html which contains urls and email addresses into proper anchor tags. Works within html pages, and in rich text editing fields (eg. rich text editing in GMAIL)&lt;br /&gt;
&lt;br /&gt;
[http://www.cse.cuhk.edu.hk/~gli/ubiquity.html Xatan&#039;s ubiquity commands]: google scholar, xunlei(??), baidu(??), douban(??), verycd, google news, dict.cn(??), mininova, dictionary.hm (detailed english explanation)&lt;br /&gt;
&lt;br /&gt;
[http://www.acarlos.com.br/ubiquity/ TV Globo Video Search]: searches for TV Globo and GloboSat videos (Brazil).&lt;br /&gt;
&lt;br /&gt;
[http://v0xel.ubuntusrbija.org/2008/08/31/mozilla-ubiquity-i-b92-mape-srbije/ sr-map]: Searches for street names and shows them on a map. Works for couple of cities in Serbia. &lt;br /&gt;
&lt;br /&gt;
[http://www.geocities.com/skyhopper88/ Skyhopper88&#039;s Commands] Several Search Commands, edit of Gmail script below for .1.1&lt;br /&gt;
&lt;br /&gt;
[http://17th.name/wp-content/uploads/2008/09/fanfou.html Alex&#039;s fanfou command]: post to fanfou (??)&lt;br /&gt;
&lt;br /&gt;
[http://unplugd.com/enblogd Samps&#039;s command collection]: eBay-Au, Ubuntu-WiKi, Skweezer, Wapedia, PHP function search&lt;br /&gt;
&lt;br /&gt;
[http://test.fathomthat.org/ubiquity/evav.html Evilavatar]: Search Evilavatar for new posts containing your search term&lt;br /&gt;
&lt;br /&gt;
[http://icecreamfactory.freehostia.com/ubiquity/ I.C.E.C.R.E.A.M COMMANDS]: directions, reverse-lookup, googlism&lt;br /&gt;
&lt;br /&gt;
[http://users.kilu.de Sieglinde&#039;s commands]: babylon,leo,reverse-telephone,open-thesaurus&lt;br /&gt;
&lt;br /&gt;
[http://www.objectforward.com/ubiquity/ objectforward&#039;s commands]:&lt;br /&gt;
dictionary - simple command to use dictionary.reference.com for word look up.&lt;br /&gt;
thesaurus - uses thesaurus.reference.com for similar word look up.&lt;br /&gt;
I just like this better than the default &#039;define&#039; command. Enjoy!&lt;br /&gt;
&lt;br /&gt;
[http://updates.versionone.com/ubiquity/ VersionOne]: A command set for users of the VersionOne agile project management suite.&lt;br /&gt;
&lt;br /&gt;
[http://craxy.bplaced.de/prog/ubiquity/ find commands]: Commands to control the firefox search (ctrl+f)&lt;br /&gt;
&lt;br /&gt;
[http://pentarious.altervista.org/ubiquity/ pentarious&#039;s command collection]: urlize, scholar-search, torrent-search, music-search&lt;br /&gt;
&lt;br /&gt;
[http://econ-server.umd.edu/~kranker/code/Ubiquity_Econ.php Keith&#039;s Ubiquity Feeds for Economists (and others)]:  econpapers, econpapers-author, econpapers-title, umdlib, stata, statalist, scholar, lorem ipsum&lt;br /&gt;
&lt;br /&gt;
= Pre 0.1 Style Commands (Now Broken) =&lt;br /&gt;
&lt;br /&gt;
# Quote text for BB-style forums. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=quotebb Quotebb.js]&lt;br /&gt;
# Quotes HTML entities in your selection. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=quotehtml quotehtml.js]&lt;br /&gt;
# Opens Gmail in a new tab, as well as showing you the last couple of new messages in the preivew. [http://ubiquity-firefox.googlegroups.com/web/ubiquity_gmail.js?gda=gHCQx0IAAAD_mC6ocghADlnwgKtOZarHy0pz4L1zdfNBZQ-WVQEtDWG1qiJ7UbTIup-M2XPURDThhrjtatuGnhW3da2gcLyrMQ4HhOIVlic7wv2V2HiqYg Gmail.js]&lt;br /&gt;
#Let&#039;s you Twitter from anywhere. This command has been moved into Ubiquity core. [http://theunfocused.net/moz/ubiquity/verbs/twitter.js Twitter.js]&lt;br /&gt;
#Another micro-blogging service like Twitter/Pounce/etc., but open source Essentially identical code to Twitter+Ubiquity above, except for renaming of constants and web addresses [http://ubiquity-firefox.googlegroups.com/web/identica%20(2).js?gda=4oc_PEkAAACqaO7Aax4IB5JX_WYSl8iOrBnsuQS45ejhBtvVuEfs-xpD7Q4I70bg7A2QUTeiVCyg9p4rhRQ_Rj874eUFNZ-HhAioEG5q2hncZWbpWmJ7IQ identica(2).js]&lt;br /&gt;
#[http://www.gialloporpora.netsons.org/ubiquity/diggthis.js DiggThis.js]&lt;br /&gt;
# Converts your selection to lower case. [http://www.gialloporpora.netsons.org/ubiquity/index.php?command=tolower tolower.js]&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=165589</id>
		<title>Labs/Ubiquity/Ubiquity 0.5 Author Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=165589"/>
		<updated>2009-09-01T13:52:24Z</updated>

		<summary type="html">&lt;p&gt;Satyr: more for arguments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]].&lt;br /&gt;
&lt;br /&gt;
Author: Aza Raskin, Blair McBride, Abimanyu Raja, Jono DiCarlo, Atul Varma&lt;br /&gt;
&lt;br /&gt;
= The Ubiquity version 0.5 Command Tutorial =&lt;br /&gt;
&lt;br /&gt;
The great power of Ubiquity&amp;amp;mdash;from a developer standpoint&amp;amp;mdash;is how easy it is to create commands. With only a couple of lines of Javascript, Ubiquity enables even casual web developers to drastically enhance the features of the browser. From an 8-line command to insert a contact&#039;s email address in any text field, to a 50-line Twitter integration, this tutorial walks you through the process of being generative with Ubiquity.&lt;br /&gt;
&lt;br /&gt;
The rest of this page documents the command developer API as it stands frozen in version 0.5.&lt;br /&gt;
&lt;br /&gt;
If you want the bleeding-edge command developer API (which includes any new features that may have been added to the Ubiquity source code in HG but not yet included in a release), then that&#039;s [[Labs/Ubiquity/Ubiquity_Source_Tip_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
If you want the old command developer API, as it stood in Ubiquity 0.1 (not recommended), that&#039;s [[Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
== Real Time Development ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity doesn&#039;t require you to restart Firefox as you develop. Restarting is a drastic measure, and we want none of it. Instead, Ubiquity reloads the commands every time it is summoned. When you are using the built-in editor then you don&#039;t even need to save!&lt;br /&gt;
&lt;br /&gt;
To open the Ubiquity command editor, summon Ubiquity (control/alt + space) and use the &amp;quot;open command editor&amp;quot; command. Throughout this tutorial, when we want you to run a command in Ubiquity, we&#039;ll say &#039;&#039;&#039;Ubiq&#039;&#039;&#039; it. For instance, to open the editor, just Ubiq &amp;quot;open command editor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the following examples, just type in this editor. Updates happen the next time you summon Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Choices, Choices... ==&lt;br /&gt;
&lt;br /&gt;
You may notice a drop-down menu mentioning something about a &amp;quot;feed type&amp;quot; just above the editing field in the command editor:&lt;br /&gt;
&lt;br /&gt;
http://www.toolness.com/images/20090318121423.jpg&lt;br /&gt;
&lt;br /&gt;
For now, just make sure this drop-down is set to &amp;quot;Regular&amp;quot;.  We&#039;ll tell you more about what this means later.&lt;br /&gt;
&lt;br /&gt;
== Hello World: The First Command ==&lt;br /&gt;
&lt;br /&gt;
=== Just a Message: As Simple as it Gets ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start with the standard programing trope: printing &amp;quot;Hello, World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the command editor type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try Ubiq-ing &amp;quot;say hello&amp;quot;. You&#039;ll see that &amp;quot;Hello, World!&amp;quot; is immediately displayed on the screen. If you are on Mac OSX with [http://en.wikipedia.org/wiki/Growl_(software) Growl] installed the message will appear as a Growl notification. If you are on Windows, then it will appears as a standard &amp;quot;toaster&amp;quot; notification in the bottom right-hand corner of the screen.&lt;br /&gt;
&lt;br /&gt;
http://farm3.static.flickr.com/2479/3651542339_022e4aa4c4.jpg&lt;br /&gt;
&lt;br /&gt;
http://img517.imageshack.us/img517/7726/picture2vx2.png&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 8.04 (Hardy Heron) this appears thus:&lt;br /&gt;
&lt;br /&gt;
http://img293.imageshack.us/img293/7746/ubiqubuntuhelloworldeq9.png&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have Growl installed on OSX, or aren&#039;t on a Windows XP/Vista or Ubuntu Hardy, then you won&#039;t get any sort of notification. That&#039;s something to be [http://labs.toolness.com/trac/ticket/19 worked on] in future releases of Ubiquity.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils.CreateCommand ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; is a namespace which contains all the functions you need to create commands.  Commands are created by making an object and passing it to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.  In Javascript, inline curly braces mean &amp;quot;new object&amp;quot;, so this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function () { //etc }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
means &amp;quot;Make an object with two attributes, &#039;names&#039; and &#039;execute&#039;.&amp;quot;  This object is then passed as the argument to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== names ===&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; and &#039;execute&#039; are the only two mandatory attributes for your command object.  &#039;names&#039; specifies what the command is called, and &#039;execute&#039; specifies what it does.  There are plenty of other attributes that you can specify, but they are all optional.&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; is always an array (thus the square brackets).  In the case of this command we provided only one name, &amp;quot;hello world&amp;quot;.  But we could have provided as many names as we wanted.  For instance, if we had said:&lt;br /&gt;
&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
then &amp;quot;say hello&amp;quot; would be the normal name of the command, but Ubiquity would also recognize &amp;quot;greet&amp;quot; as a synonym or alias for the command.&lt;br /&gt;
&lt;br /&gt;
=== execute ===&lt;br /&gt;
&lt;br /&gt;
&#039;execute&#039; is always a function.  When the user executes your command, this is the function that will be run.  It can do pretty much anything you want -- or at least, anything you know how to write in JavaScript.&lt;br /&gt;
&lt;br /&gt;
In the example above, we simply call &amp;lt;code&amp;gt;displayMessage()&amp;lt;/code&amp;gt;, which displays the given message in whichever way the operating system can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a number of other useful functions in the &amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; namespace. We don&#039;t yet have full documentation for these commands, but you&#039;ll get a sense of the useful ones in this tutorial. For more detailed information, take a look at [http://hg.toolness.com/ubiquity-firefox/file/9a6c9935da9f/ubiquity/chrome/content/cmdutils.js cmdutils.js].&lt;br /&gt;
&lt;br /&gt;
=== Making sure your command is localizable ===&lt;br /&gt;
&lt;br /&gt;
Ubiquity now supports multiple languages.  That means that hopefully someday someone will be translating your commands to the other languages that Ubiquity supports.  Making your command localizable is easy, and a good habit to get into!  You just have to locate all strings that appear in your &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; methods, that are intended for display to humans, and wrap them with:&lt;br /&gt;
&lt;br /&gt;
 _()&lt;br /&gt;
&lt;br /&gt;
This may look odd, but what it does is quite important: it makes your strings appear in the template files that localizers will be using.  So let&#039;s make our &amp;quot;Hello world!&amp;quot; command localizable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes it so that when a localization template is generated from your command feed, &amp;quot;Hello, World!&amp;quot; will be listed among the strings to be translated.&lt;br /&gt;
&lt;br /&gt;
Note that we don&#039;t need to wrap the names, or other strings that appear in the command metadata -- these are automatically wrapped for us.  We only need to wrap strings that appear inside the functions.&lt;br /&gt;
&lt;br /&gt;
=== Adding a Preview ===&lt;br /&gt;
&lt;br /&gt;
http://img352.imageshack.us/img352/1002/picture3ex0.png&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a preview to our new command. Previews give the user feedback about what a command does before it&#039;s executed. Previews are great for providing rich visual feedback like displaying a graphical representation of atmospheric conditions when using the weather command as shown above. Previews have the full expressive power of HTML, including animations, so there&#039;s a lot you can do with them.&lt;br /&gt;
&lt;br /&gt;
One point of design: Preview code should never have side-effects. That is, a preview should never (without user interaction) change the state of the system.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;say hello&amp;quot; command, we don&#039;t need anything fancy: just some help text that is more descriptive than the default &amp;quot;Executes the say hello command.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  preview: &amp;quot;Displays a &amp;lt;i&amp;gt;salutary&amp;lt;/i&amp;gt; greeting to the planet.&amp;quot;,&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the preview is an HTML-formatted string. The preview can also be a function. We&#039;ll get to that in the next section.&lt;br /&gt;
&lt;br /&gt;
== The Date Command: The Second Command ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the Selection ===&lt;br /&gt;
&lt;br /&gt;
I often forget what day it is. That may be because I need to go outside more often, but, like any programmer, I generally solve my problem&#039;s symptoms with technology rather then addressing the root cause. My solution is to create a command that inserts the date at the location of the cursor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(new Date().toLocaleDateString());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new function here is &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt;. This inserts the passed-in text onto the page at the location of the cursor. If the cursor is in an editable text or rich-text fields, the text gets dumped there. If the cursor isn&#039;t in an editable area, &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt; will still be able to insert the date. (Even when it isn&#039;t displayed, Firefox always keeps track of a cursor position. To see it, type F7.) Try going to a page, selecting some non-mutable text, and using the command. See, it works! This is particularly useful for commands like &amp;quot;translate&amp;quot;, where you want to replace non-editable text with its translation.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;toLocaleDateString()&amp;lt;/code&amp;gt; function is native to Javascript, so if you&#039;re not familiar with it check out the documentation for the Javascript [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date Date object].&lt;br /&gt;
&lt;br /&gt;
=== A Better Preview ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s time to add a better preview to the date command. Let&#039;s have the preview show the date, so that the user will know what to expect when they execute the command. (As a side benefit the user doesn&#039;t even need to execute the command to do a quick check of the day.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _date: function date__date() {&lt;br /&gt;
    return new Date().toLocaleDateString();&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = _(&#039;Inserts today\&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;);&lt;br /&gt;
    pblock.innerHTML = CmdUtils.renderTemplate(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(this._date());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve done three things here. The first was to factor out the code for getting the date into the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt; function. This way we don&#039;t break [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY] by repeating code across the preview and execute functions. Notice that to access the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt;, we use the &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
The second thing we&#039;ve done is to add a preview function. The first argument is the DOM element that gets displayed as the preview for your command. Modify &amp;lt;code&amp;gt;pblock&amp;lt;/code&amp;gt; and you modify the preview. In this case, we set the &amp;lt;code&amp;gt;innerHTML&amp;lt;/code&amp;gt; of the preview block to be the message we want.&lt;br /&gt;
&lt;br /&gt;
The third thing we&#039;ve done is to do some string formatting using the &amp;lt;code&amp;gt;renderTemplate()&amp;lt;/code&amp;gt; function. This takes a template string and performs the appropriate substitution given the passed-in JSON object. Templates can handle a wide range of functionality, as we are currently using TrimPath&#039;s [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavascriptTemplates]. You should read their site for more documentation. Although JavascriptTemplates has some nice properties, we are contemplating moving to [http://mjtemplate.org/ MJT] sometime soon.&lt;br /&gt;
&lt;br /&gt;
=== A shortcut for localization and rendering templates ===&lt;br /&gt;
&lt;br /&gt;
Note how in the code above, we used the localization wrapper &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; before passing the string to renderTemplate.  Because this is such a very common combination when displaying strings, we have a shortcut for it.  Calling _() with a JSON object as the second argument will automatically trigger &amp;lt;code&amp;gt;CmdUtils.renderTemplate()&amp;lt;/code&amp;gt; on the post-localization string.  So the above preview method could be rewritten more simply as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = &#039;Inserts today&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Networking calls and placeholder previews ===&lt;br /&gt;
&lt;br /&gt;
Previews display something meaningful to the user immediately. If you have a preview that requires an AJAX request&amp;amp;mdash;say, to fetch some search results&amp;amp;mdash;that call might take a while to return. In the meantime, your command should display a placeholder preview giving the user feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function(pblock) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;This will show until the AJAX request returns&amp;quot;);&lt;br /&gt;
    CmdUtils.previewGet(pblock, &amp;quot;http://example.com&amp;quot;, function (htm) {&lt;br /&gt;
      pblock.innerHTML = htm;&lt;br /&gt;
    });&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documentation and Metadata ==&lt;br /&gt;
&lt;br /&gt;
Before you share your command with the world, you should consider adding some attributions to the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you should &amp;lt;em&amp;gt;definitely&amp;lt;/em&amp;gt; add some documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Inserts today&#039;s date.&amp;quot;,&lt;br /&gt;
  help: &amp;quot;If you&#039;re in an editable text area, inserts today&#039;s date, formatted for the current locale.&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.description&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.help&amp;lt;/code&amp;gt; attributes are both automatically displayed alongside your command&#039;s name on the command-list page.  (The user can get to this page at any time by issuing the &amp;quot;list ubiquity commands&amp;quot; command.)  HTML tags can be used in both of these strings.&lt;br /&gt;
&lt;br /&gt;
Description is a one-line summary of what the command does, while Help is a longer description that can include examples, caveats, and so on. If your command is simple enough that all you have to say about it fits in one line, it&#039;s OK to use a description alone and leave out the help.&lt;br /&gt;
&lt;br /&gt;
== Sharing it with the World ==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve got our awesome new &amp;quot;date&amp;quot; command, let&#039;s share it with the world. All you have to do is put the javascript file on the web somewhere, and make an html page linking to it with &amp;quot;link rel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;&amp;lt;link rel=&amp;quot;commands&amp;quot; href=&amp;quot;http://path-to-js&amp;quot; name=&amp;quot;Title Goes Here&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anyone with Ubiquity who visits will get a message offering them the choice of subscribing to your command.&lt;br /&gt;
&lt;br /&gt;
[[Image:Subscribe.png]]&lt;br /&gt;
&lt;br /&gt;
If the user chooses to subscribe to a Regular command feed from an untrusted source, they will get a security warning message before they can install the command.  Because Regular Ubiquity command feeds can execute arbitrary javascript with chrome privileges, subscribing to a command from a website means allowing that site full access to do whatever it wants to your browser.  We want to make sure people understand the dangers before subscribing to commands, so we made the warning page pretty scary.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Feed Types ===&lt;br /&gt;
&lt;br /&gt;
Recall that back near the beginning of the tutorial, you set the &amp;quot;feed type&amp;quot; to &amp;quot;Regular&amp;quot;.  As you may have guessed, there&#039;s actually more than one way to write a command feed.  The advantage of Regular feeds is that they let you do whatever you want, so it&#039;s really easy to innovate, but the disadvantages lie in subscribing to misbehaving or malicious code.  You can alternatively write what&#039;s called a &#039;&#039;Locked-Down Feed&#039;&#039;, which is much safer and doesn&#039;t raise a warning page when a user subscribes to it&amp;amp;mdash;but the consequences are that you have less freedom of implementation as a command author.  If you&#039;re interested in learning more about Locked-Down Feeds, check out the [[Labs/Ubiquity/Locked-Down_Feed_Tutorial|Locked-Down Feed Tutorial]].&lt;br /&gt;
&lt;br /&gt;
=== Trust Networks ===&lt;br /&gt;
&lt;br /&gt;
In the future, we&#039;re going to have something set up that we call a &amp;quot;[[Labs/Ubiquity/TrustNetwork|trust network]]&amp;quot;.  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you&#039;ll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they&#039;ll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.&lt;br /&gt;
&lt;br /&gt;
By the way, the reason we call it &amp;quot;subscribing&amp;quot; to a command, rather than &amp;quot;installing&amp;quot; a command, is that if the javascript file changes -- if the site owner adds new commands, removes old commands, or updates existing commands -- all users subscribed to that URL will automatically get the updates.  This will be very convenient for both users and developers, but it will also introduce another type of security risk: just because you decided a command was safe at one point in time doesn&#039;t mean that the command will always remain safe.  For this reason, we&#039;ll need to make sure that the trust network keeps track of when commands have been modified, and notifies users of changes that may make a command unsafe.&lt;br /&gt;
&lt;br /&gt;
== Map Me! Location, Snapshots, and Inserting HTML ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;map&amp;quot; command that comes with Ubiquity is fairly powerful. It&#039;s also fairly complicated&amp;amp;mdash;well, comparatively. It&#039;s still only a couple hundred lines of code. The command, though, can get even more useful. Imagine being able to select some houses on Craigslist, or a list of restaurant names, and Ubiq &amp;quot;map these&amp;quot; to get just the map you want. The concept of &amp;quot;these&amp;quot; puts the power of mashups into the users hands. But I digress. Let&#039;s make a simple command that inserts a map of your current location.&lt;br /&gt;
&lt;br /&gt;
In this command, we use the Google [http://code.google.com/apis/maps/documentation/staticmaps/ static map API] and the Ubiquity function &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; to insert a map of your current location. Ubiquity currently uses the [http://www.maxmind.com/app/api MaxMind] API for trying to guess your location from your IP. That will probably change in the future.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll call this command &amp;lt;code&amp;gt;&amp;quot;map me&amp;quot;&amp;lt;/code&amp;gt; so that it won&#039;t be confused with the standard &amp;lt;code&amp;gt;&amp;quot;map&amp;quot;&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;map me&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _getMapUrl: function() {&lt;br /&gt;
    var loc = CmdUtils.getGeoLocation();&lt;br /&gt;
    var mapUrl = &amp;quot;http://maps.google.com/staticmap?&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var params = {&lt;br /&gt;
      center: loc.lat + &amp;quot;,&amp;quot; + loc.long,&lt;br /&gt;
      size: &amp;quot;500x400&amp;quot;,&lt;br /&gt;
      zoom: 14,&lt;br /&gt;
      key: &amp;quot;ABQIAAAAGZ11mh1LzgQ8-8LRW3wEShQeSuJunOpTb3RsLsk00-MAdzxmXhQoiCd940lo0KlfQM5PeNYEPLW-3w&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    return mapUrl + jQuery.param( params );&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function( pblock ) {&lt;br /&gt;
    var msg = &amp;quot;Inserts a map of your current location: &amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
              &amp;quot;&amp;lt;img src=&#039;${url}&#039;/&amp;gt;&amp;quot;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {url: this._getMapUrl()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function( ) {&lt;br /&gt;
    CmdUtils.getImageSnapshot( this._getMapUrl(), function(imgData) {&lt;br /&gt;
      CmdUtils.setSelection( &amp;quot;&amp;lt;img src=&#039;&amp;quot; + imgData +&amp;quot;&#039;/&amp;gt;&amp;quot;);&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three new things here: &amp;lt;code&amp;gt;CmdUtils.setSelection&amp;lt;/code&amp;gt; to set HTML (yep, it can do that); the use of &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt;; and using &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt; to capture the bits for the image.&lt;br /&gt;
&lt;br /&gt;
I find getting the location&amp;amp;mdash;as imprecise as IP-based location can be&amp;amp;mdash;useful for doing sensible defaults for location-based commands, like Yelp. &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; returns an object which has the following properties: city, state, country, lat, and long.&lt;br /&gt;
&lt;br /&gt;
Why do we need to use &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt;? Because the Google Maps API requires a key that is tied to a particular URL. If we naively inject the image tag into a random web page, the image won&#039;t load because the key doesn&#039;t match that random web page&#039;s URL. Thus, we use the &amp;lt;code&amp;gt;snapshotImage()&amp;lt;/code&amp;gt; function to convert the image into a [http://en.wikipedia.org/wiki/Data:_URI_scheme data url].&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a &amp;lt;code&amp;gt;CmdUtils.snapshotWindow&amp;lt;/code&amp;gt; function, which allows you to get the image data for any tab/window. The function takes a window as the first paramater, and a callback for the second.&lt;br /&gt;
&lt;br /&gt;
= Commands with Arguments =&lt;br /&gt;
&lt;br /&gt;
== Echo ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ll be working towards making some fun and useful commands&amp;amp;mdash;commands that let you control the seething tendrils of the internet with your little pinky. But, let&#039;s start by making a simple command to echo back whatever you type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;echo&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;your shout&amp;quot;}],&lt;br /&gt;
  preview: function( pblock, arguments ) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Will echo: &amp;quot;) + arguments.object.text;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var msg = arguments.object.text + &amp;quot;... &amp;quot; + arguments.object.text + &amp;quot;......&amp;quot;;&lt;br /&gt;
    displayMessage( msg );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says that the command &amp;quot;echo&amp;quot; takes one argument which is arbitrary text. Whatever text the user enters will get wrapped in an input object and passed into both the preview and execute function.&lt;br /&gt;
&lt;br /&gt;
Try it!  Ubiq &amp;quot;echo hellooooo&amp;quot; and watch what happens.&lt;br /&gt;
&lt;br /&gt;
Ubiquity takes care of parsing the user&#039;s input, so you don&#039;t need to worry about handling prounoun substitution or any of the other natural-language-like features of the Ubiquity parser. Try selecting some text on a page, and Ubiq &amp;quot;echo this&amp;quot;. Ubiquity should now echo the selected text.  &lt;br /&gt;
&lt;br /&gt;
Note that we gave three pieces of information when defining our argument:  its role, its nountype, and its label.  The label is the easiest part: It&#039;s just whatever text you want to have appear in the Ubiquity interface as a prompt for the user.  E.g, if you ubiq &amp;quot;echo&amp;quot;, you will see the label for the argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  echo (your shout)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The roles and the nountypes require some more explanation.  We&#039;ll cover each of them in detail next.&lt;br /&gt;
&lt;br /&gt;
=== Argument Roles ===&lt;br /&gt;
&lt;br /&gt;
Your command can take multiple arguments.  Each one is identified by a &amp;quot;role&amp;quot;.  To understand roles, it helps to think of your command name as a verb, and each argument as a noun.  Remember that Ubiquity&#039;s command line is a pseudo-natural-language environment, so it attempts to be as close to natural language grammar as possible.&lt;br /&gt;
&lt;br /&gt;
For example, if you&#039;ve ever used the &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; command, you know that it takes up to two arguments: a message and a person.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  email message&lt;br /&gt;
  email to person&lt;br /&gt;
  email message to person&lt;br /&gt;
  email to person message&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In grammatical terms, the message argument is the &amp;quot;direct object&amp;quot; of the verb &amp;quot;email&amp;quot;.  The person argument is an indirect object.  We call it the &amp;quot;goal&amp;quot; of the verb.  So if we were writing the email command, we&#039;d define the arguments like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;message&amp;quot;},&lt;br /&gt;
              {role: &amp;quot;goal&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;recipient&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because we give the recipient argument the &amp;quot;goal&amp;quot; role, the Ubiquity parser knows to expect the user to type the word &amp;quot;to&amp;quot;.  When the user enters &amp;quot;email hello to Aza&amp;quot;, the parser knows that the word following &amp;quot;to&amp;quot; -- that is, &amp;quot;Aza&amp;quot; -- should be assigned to the recipient argument.&lt;br /&gt;
&lt;br /&gt;
In our simple &amp;quot;echo&amp;quot; command, we expect the user to type &amp;quot;echo hellooooo&amp;quot; or something like that.  The &amp;quot;hellooooo&amp;quot; is the direct object of the verb &amp;quot;echo&amp;quot;, so we give it the &amp;quot;object&amp;quot; role.  &lt;br /&gt;
&lt;br /&gt;
&amp;quot;Object&amp;quot; is the most common role.  If a command takes only one argument, that argument is usually an &amp;quot;object&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== What Roles Can I Use? ====&lt;br /&gt;
&lt;br /&gt;
* object   (in &amp;quot;echo helloooo&amp;quot;, hello is the object.)&lt;br /&gt;
* goal    (in &amp;quot;email this to brandon&amp;quot;, brandon is the goal.)&lt;br /&gt;
* source   (in &amp;quot;translate this from spanish&amp;quot;, spanish is the source.)&lt;br /&gt;
* location    (in &amp;quot;yelp pizza near boston&amp;quot;, boston is the location.)&lt;br /&gt;
* time    (in &amp;quot;book a flight on thursday&amp;quot;, thursday is the time.)&lt;br /&gt;
* instrument  (in &amp;quot;search monkeys with google&amp;quot;, google is the instrument.)&lt;br /&gt;
* format   (in &amp;quot;check weather in celsius&amp;quot;, celsius is the format.)&lt;br /&gt;
* modifier  (in &amp;quot;get email address for chris&amp;quot;, chris is the modifier.)&lt;br /&gt;
* alias   (in &amp;quot;twitter this as jono&amp;quot;, jono is the alias.)&lt;br /&gt;
&lt;br /&gt;
[https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles More information about these roles].&lt;br /&gt;
&lt;br /&gt;
=== The Arguments Object ===&lt;br /&gt;
&lt;br /&gt;
When your execute method is called, it is passed a single object that encapsulates the values for all arguments.&lt;br /&gt;
&lt;br /&gt;
When your preview method is called, it is passed this object, too.&lt;br /&gt;
&lt;br /&gt;
The object has one attribute corresponding to each role.  In our example above, the command accepts only an object-role argument, so the preview and execute methods get passed an argument with an &amp;quot;arguments.object&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
If we made a command, like email, that takes an object-role argument and a goal-role argument, its preview and execute methods would get passed an argument with &amp;quot;arguments.object&amp;quot; and &amp;quot;arguments.goal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
arguments.object (or arguments.goal) has several attributes of its own:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments.object.text  // a string of the input in plain text, without formatting&lt;br /&gt;
  arguments.object.html  // a string of the input in formatted html, including tags&lt;br /&gt;
  arguments.object.data  // for non-text input types, an arbitrary data object&lt;br /&gt;
  arguments.object.summary // for very long inputs, an abbreviated display string&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our example command only cares about the &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; attribute of the input, because it simply wants plain text.  Often, when the user invokes your command by typing a few short words into the input box, &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.html&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;.summary&amp;lt;/code&amp;gt; will all have exactly the same value, and &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; will be null.  Many, if not most, commands that you write will only care about the text value.  Nevertheless, the other versions of the input data are provided to you in case they differ from &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; and in case your command has a use for them.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Noun Types ==&lt;br /&gt;
&lt;br /&gt;
Noun types specify what &#039;&#039;kind&#039;&#039; of input your command can accept for each one of its arguments.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;echo&amp;quot; command, we wanted the object-role argument to accept any text whatsoever, so for its nountype we passed in the predefined &amp;lt;code&amp;gt;noun_arb_text&amp;lt;/code&amp;gt; object.  This object accepts any arbitrary text as a valid argument and passes it to the command unchanged.&lt;br /&gt;
&lt;br /&gt;
This is OK for very simple commands, like echoing back the user&#039;s input.  But for commands that take structured data, you will want to use more specific nountypes.&lt;br /&gt;
&lt;br /&gt;
For example, if a command can take a date (like the &amp;quot;check calendar&amp;quot; command), you would want to use &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; as the nountype of the argument.  &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; provides several benefits to your command:  it does all of the date parsing for you; it suggests dates that the user might want to enter (for instance, it defaults to today&#039;s date).  And, it lets the parser know that your command takes a date.  This is useful because when the user selects a date on a page and invokes Ubiquity, your command -- along with &amp;quot;check calendar&amp;quot; -- will be one of the top suggestions.&lt;br /&gt;
&lt;br /&gt;
You can write your own noun types -- we&#039;ll get into that later.  For now, let&#039;s take a look at the built-in nountypes that your command can use.  These include:&lt;br /&gt;
&lt;br /&gt;
* noun_arb_text (Arbitrary text)&lt;br /&gt;
* noun_type_language (Name of a human language, e.g. &amp;quot;English&amp;quot;, &amp;quot;Japanese&amp;quot;)&lt;br /&gt;
* noun_type_url (A URL)&lt;br /&gt;
* noun_type_contact (An email address from your address book)&lt;br /&gt;
* noun_type_date (A date, in any format, or a word like &amp;quot;tomorrow&amp;quot;)&lt;br /&gt;
* noun_type_time (A time, in any format)&lt;br /&gt;
* noun_type_percentage&lt;br /&gt;
* noun_type_address&lt;br /&gt;
* noun_type_tab&lt;br /&gt;
* noun_type_searchengine&lt;br /&gt;
* noun_type_tag&lt;br /&gt;
* noun_type_geolocation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are familiar with writing commands, you should check out the [http://hg.toolness.com/ubiquity-firefox/file/6caa9d66b3bb/ubiquity/chrome/content/nlparser/en/nountypes.js nountypes.js], which has the implementation for most of the noun-types.  You can see what noun types are already available for your commands to use, what still needs to be written, and where the existing implementations could use improvement &amp;amp;mdash; and then come [[Labs/Ubiquity#Participation|get involved]] to help us improve them.&lt;br /&gt;
&lt;br /&gt;
=== Regexps as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
If none of the nountypes above is what you&#039;re looking for, there are several ways to define your own.  The simplest is to use a regular expression.  Suppose that (for whatever odd reason) you wanted your command to accept only arguments that begin with the letter N.  The following regexp matches words that start with N:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /^[nN]/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could use it as a noun type, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: /^[nN]/,&lt;br /&gt;
               label: &amp;quot;word that starts with n&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note that you do &#039;&#039;not&#039;&#039; put quotes around the regexp.)&lt;br /&gt;
&lt;br /&gt;
A regexp nountype will reject input that doesn&#039;t match, but it doesn&#039;t know how to help the user by suggesting appropriate input.&lt;br /&gt;
&lt;br /&gt;
=== Lists as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
Suppose you&#039;re writing a command that takes a color as an argument (perhaps it outputs a hexadecimal RGB representation of that color.)  To make a nountype that accepts colors, you can simply pass in an array of strings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  names: [&amp;quot;convert color&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: [&amp;quot;red&amp;quot;, &amp;quot;orange&amp;quot;, &amp;quot;yellow&amp;quot;, &amp;quot;green&amp;quot;, &lt;br /&gt;
                          &amp;quot;blue&amp;quot;, &amp;quot;violet&amp;quot;, &amp;quot;black&amp;quot;, &amp;quot;white&amp;quot;,&lt;br /&gt;
                          &amp;quot;grey&amp;quot;, &amp;quot;brown&amp;quot;, &amp;quot;beige&amp;quot;, &amp;quot;magenta&amp;quot;,&lt;br /&gt;
                          &amp;quot;cerulean&amp;quot;, &amp;quot;puce&amp;quot;],&lt;br /&gt;
               label: &amp;quot;color to convert&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One benefit of using a list is that the parser can use it offer the user suggestions.   If the user enters &amp;quot;get-color bl&amp;quot;, for instance, Ubiquity will be able to suggest &amp;quot;black&amp;quot; and &amp;quot;blue&amp;quot; as the two valid completions based on the input.  This makes list-based nountypes very useful for any command that can accept only a finite set of values.&lt;br /&gt;
&lt;br /&gt;
=== Writing a Noun Type Object ===&lt;br /&gt;
&lt;br /&gt;
Of course, not every type of noun you&#039;d be interested in can be represented&lt;br /&gt;
as a finite list or as a regexp.  If you want to be able to accept or reject input based on some algorithmic test, you can do so by writing a custom JavaScript object that implements a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method (and, optionally, a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; method.)&lt;br /&gt;
&lt;br /&gt;
There is an example of how to do this in the section on the tab commands, below.&lt;br /&gt;
&lt;br /&gt;
== Insert Email: the Contact noun type ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s take a look at one of the built-in noun-types: &amp;lt;code&amp;gt;noun_type_contact&amp;lt;/code&amp;gt;. This lets Ubiquity know to expect a person (either by name or email address). By using the noun-type, Ubiquity will also autocomplete to known people while the user is entering the command. This is what the built-in Ubiquity command &amp;quot;email&amp;quot; uses.&lt;br /&gt;
&lt;br /&gt;
At the moment, Ubiquity figures out what people you know through reading your Gmail contacts. In this prototyped version, you&#039;ll need to use Gmail and be logged in for for Ubiquity to know who you know. Eventually, we&#039;d like to be able to interface with all major web-mail sites, as well as desktop software like Thunderbird.&lt;br /&gt;
&lt;br /&gt;
Enough rambling. It&#039;s time for a command. I constantly find that I need to fetch someone&#039;s email address to paste into a text field because I don&#039;t know it off-hand. This command solves that by letting you insert someone&#039;s email address using autocomplete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert email&amp;quot;],&lt;br /&gt;
  arguments: {modifier: noun_type_contact},&lt;br /&gt;
  preview: &amp;quot;Inserts someone&#039;s email address by name.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    CmdUtils.setSelection( arguments.modifier.text );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To try this out, Ubiq &amp;quot;insert email for &amp;quot; and then the first few letters of someone you email often.&lt;br /&gt;
&lt;br /&gt;
=== Shorter Argument Declarations ===&lt;br /&gt;
&lt;br /&gt;
Notice that we used a shortcut for declaring the arguments.  In the long form, we would have had to say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;modifier&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;contact&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but if we don&#039;t care about specifying extra parameters for the argument, we can get away with using a single object for &amp;quot;arguments&amp;quot;, with the roles as the property names, and the nountypes as the property values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or with label using &amp;lt;code&amp;gt;&amp;quot;_&amp;quot;&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;&amp;quot; &amp;quot;&amp;lt;/code&amp;gt;) as separator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier_contact: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we had several arguments, we could say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {object: noun_arb_text, modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you only have &amp;quot;object&amp;quot; and don&#039;t need to specify a label...:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  argument: noun_arb_text&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aza writes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This one command sums up what I love about Ubiquity. In 8 lines of code, I can &lt;br /&gt;
fundamentally enhance the browser&#039;s functionality. Doing the same thing using &lt;br /&gt;
a normal Firefox extension methodology takes pages and pages of code&amp;amp;mdash;and  the interface would take more thought still. Doing the same thing using a bookmarklet would require a server-side component (to get around cross-site Ajax request ban) as well as forcing the user to give up their email password.&lt;br /&gt;
&lt;br /&gt;
Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TinyURL: Network Calls and jQuery (and the URL noun type)==&lt;br /&gt;
&lt;br /&gt;
Often while writing emails, I&#039;ll discover that I&#039;ve pasted in a URL long enough to be used for unfortunate analogies. I&#039;d like to be able to quickly turn that into a [http://en.wikipedia.org/wiki/Tinyurl TinyURL]&amp;amp;mdash;but the process of making a TinyURL involves lots of fiddly steps. Ubiquity to the rescue.&lt;br /&gt;
&lt;br /&gt;
Because we include [http://en.wikipedia.org/wiki/jQuery jQuery] with Ubiquity, it is simple to perform Ajax calls as well as parse returning data. TinyUrl.com provides an easy to use RESTful API where you pass a URL and it returns its shortened form. We use that API in this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;tinyurl&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_type_url,&lt;br /&gt;
               label: &amp;quot;url to shorten&amp;quot;}],&lt;br /&gt;
  preview: &amp;quot;Replaces the selected URL with a TinyUrl.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var baseUrl = &amp;quot;http://tinyurl.com/api-create.php&amp;quot;;&lt;br /&gt;
    var params = {url: arguments.object.text};&lt;br /&gt;
    jQuery.get( baseUrl, params, function( tinyUrl ) {&lt;br /&gt;
      CmdUtils.setSelection( tinyUrl );&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is a useful nountype because it defaults to the URL of the page that you are currently on.  If that is in fact the URL that the user wants, then they don&#039;t have to type it or even select it.&lt;br /&gt;
&lt;br /&gt;
jQuery is a powerful tool. With it, you can fairly effortlessly cherry-pick the data you need from RSS feeds, XML, and all sorts of other data formats. It also makes doing in-preview animations a breeze.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Twitter: Putting It All Together =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve now covered everything we need to cover in order to write a command that allows us to [http://en.wikipedia.org/wiki/Twitter Twitter] from Ubiquity.  The code below is the actual source code of the Twitter command as it appears in Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
Many thanks to [http://theunfocused.net/moz/ubiquity/verbs/ Blair McBride] for writing this command.  The source code is a bit more intricate than anything we&#039;ve seen so far, but it&#039;s built using exactly the same basic pieces -- and demonstrates nearly all of those pieces in action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const TWITTER_STATUS_MAXLEN = 140;&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;twitter&amp;quot;, &amp;quot;tweet&amp;quot;, &amp;quot;share using twitter&amp;quot;],&lt;br /&gt;
  arguments: [&lt;br /&gt;
    {role: &amp;quot;object&amp;quot;, label: &#039;status&#039;, nountype: noun_arb_text},&lt;br /&gt;
    {role: &amp;quot;alias&amp;quot;, nountype: noun_type_twitter_user}&lt;br /&gt;
  ],&lt;br /&gt;
  icon: &amp;quot;http://twitter.com/favicon.ico&amp;quot;,&lt;br /&gt;
  description:&lt;br /&gt;
  &amp;quot;Sets your Twitter status to a message of at most 160 characters.&amp;quot;,&lt;br /&gt;
  help: (&amp;quot;You&#039;ll need a &amp;lt;a href=\&amp;quot;http://twitter.com\&amp;quot;&amp;gt;Twitter account&amp;lt;/a&amp;gt;,&amp;quot; +&lt;br /&gt;
         &amp;quot; obviously.  If you&#039;re not already logged in&amp;quot; +&lt;br /&gt;
         &amp;quot; you&#039;ll be asked to log in.&amp;quot;),&lt;br /&gt;
  preview: function(previewBlock, args) {&lt;br /&gt;
    var statusText = (args.object ? args.object.text : &#039;&#039;);&lt;br /&gt;
    var usernameText = &amp;quot;&amp;quot;;&lt;br /&gt;
    if (args.alias) {&lt;br /&gt;
      usernameText = args.alias.text;&lt;br /&gt;
    } else if (args.as) {&lt;br /&gt;
      usernameText = args.as.text;&lt;br /&gt;
    }&lt;br /&gt;
    var previewTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;div class=&#039;twitter&#039;&amp;gt;&amp;quot;+_(&amp;quot;Updates your Twitter status ${username} to:&amp;quot;)+&amp;quot;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      &amp;quot;&amp;lt;b class=&#039;status&#039;&amp;gt;${status}&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      _(&amp;quot;Characters remaining: &amp;lt;b&amp;gt;${chars}&amp;lt;/b&amp;gt;&amp;quot;) +&lt;br /&gt;
      &amp;quot;&amp;lt;p&amp;gt;&amp;lt;small&amp;gt;&amp;quot;+_(&amp;quot;tip: tweet @mozillaubiquity for help&amp;quot;)+&amp;quot;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
    var truncateTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;strong&amp;gt;&amp;quot;+_(&amp;quot;The last &amp;lt;b&amp;gt;${truncate}&amp;lt;/b&amp;gt; characters will be truncated!&amp;quot;)+&amp;quot;&amp;lt;/strong&amp;gt;&amp;quot;);&lt;br /&gt;
    var previewData = {&lt;br /&gt;
      status: &amp;lt;&amp;gt;{statusText}&amp;lt;/&amp;gt;.toXMLString(),&lt;br /&gt;
      username: usernameText &amp;amp;&amp;amp; _(&amp;quot;(For user &amp;lt;b&amp;gt;${usernameText}&amp;lt;/b&amp;gt;)&amp;quot;),&lt;br /&gt;
      chars: TWITTER_STATUS_MAXLEN - statusText.length&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var previewHTML = CmdUtils.renderTemplate(&lt;br /&gt;
                        CmdUtils.renderTemplate(previewTemplate, previewData),&lt;br /&gt;
                        {usernameText:usernameText});&lt;br /&gt;
&lt;br /&gt;
    if (previewData.chars &amp;lt; 0) {&lt;br /&gt;
      var truncateData = {&lt;br /&gt;
        truncate: 0 - previewData.chars&lt;br /&gt;
      };&lt;br /&gt;
&lt;br /&gt;
      previewHTML += CmdUtils.renderTemplate(truncateTemplate, truncateData);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    previewBlock.innerHTML = previewHTML;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    var statusText = args.object.text;&lt;br /&gt;
    if(statusText.length &amp;lt; 1) {&lt;br /&gt;
      this._show(_(&amp;quot;requires a status to be entered&amp;quot;));&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var updateUrl = &amp;quot;https://twitter.com/statuses/update.json&amp;quot;;&lt;br /&gt;
    var updateParams = {&lt;br /&gt;
      source: &amp;quot;ubiquity&amp;quot;,&lt;br /&gt;
      status: statusText&lt;br /&gt;
      //dont cut the input since sometimes, the user selects a big url,&lt;br /&gt;
      //and the total lenght is more than 140, but tinyurl takes care of that&lt;br /&gt;
    };&lt;br /&gt;
    var me = this;&lt;br /&gt;
&lt;br /&gt;
    function sendMessage() {&lt;br /&gt;
      jQuery.ajax({&lt;br /&gt;
        type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
        url: updateUrl,&lt;br /&gt;
        data: updateParams,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        error: function() {&lt;br /&gt;
          me._show(_(&amp;quot;error - status not updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        success: function() {&lt;br /&gt;
          me._show(/^d /.test(statusText)&lt;br /&gt;
                   ? _(&amp;quot;direct message sent&amp;quot;)&lt;br /&gt;
                   : _(&amp;quot;status updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        username: login.username,&lt;br /&gt;
        password: login.password&lt;br /&gt;
      });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var login;&lt;br /&gt;
    var alias = args.alias;&lt;br /&gt;
    if (alias &amp;amp;&amp;amp; alias.text &amp;amp;&amp;amp; alias.data) {&lt;br /&gt;
      login = alias.data;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    } else {&lt;br /&gt;
      login = {username: null,&lt;br /&gt;
               password: null};&lt;br /&gt;
      if (alias &amp;amp;&amp;amp; alias.text)&lt;br /&gt;
        login.username = alias.text;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  _show: function(txt){&lt;br /&gt;
    displayMessage({icon: this.icon, title: this.name, text: txt});&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Switching Tabs =&lt;br /&gt;
&lt;br /&gt;
The final command in this tutorial is for switching between tabs. The end goal is this: type a few keys to that matches the title of an open tab (in any window), hit return, and you&#039;ve switched to that tab.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: Writing your own Noun-Types ===&lt;br /&gt;
&lt;br /&gt;
A noun-type needs to only have two things: A &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; function.  It can optionally also have a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
The label is what shows up when the command prompts for input. Suggest returns a list of input objects, each one containing the name of a matching tab. We&#039;re using [http://developer.mozilla.org/en/docs/FUEL FUEL] to interact with the browser, which is where the &amp;quot;Application&amp;quot; variable comes from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_tab = {&lt;br /&gt;
  label: &amp;quot;tab name&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
  // Returns all tabs from all windows.&lt;br /&gt;
  getTabs: function nt_tab_getTabs() {&lt;br /&gt;
    return [tab&lt;br /&gt;
            for each (win in Application.windows)&lt;br /&gt;
            for each (tab in win.tabs)];&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  suggest: function nt_tab_suggest(text, html, callback, selectionIndices) {&lt;br /&gt;
    var textLC = text.toLowerCase();&lt;br /&gt;
    return [CmdUtils.makeSugg(tab.document.title, null, tab)&lt;br /&gt;
            for each (tab in this.getTabs())&lt;br /&gt;
            if (~tab.document.title.toLowerCase().indexOf(textLC))];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The suggest method of a noun type always gets passed both text and html.  If the input is coming from a part of a web page that the user has selected, these&lt;br /&gt;
values can be different: they are both strings, but the html value contains markup tags while the text value does not. The Tab noun type only cares about the plain text of the tab name, so we ignore the value of html.&lt;br /&gt;
&lt;br /&gt;
The callback argument is for use by nountypes that need to run asynchronously, i.e. because they need to do network calls to generate suggestions.  The callback is a function; instead of returning a list of suggestions right away, an asynchronous noun type can call the callback with each suggestion it generates.  More on this later; the tab noun type generates all its suggestions right away, so it just returns them instead of using the callback.&lt;br /&gt;
&lt;br /&gt;
We use the convenience function &amp;lt;code&amp;gt;CmdUtils.makeSugg()&amp;lt;/code&amp;gt; to generate an&lt;br /&gt;
input object of the type that the Ubiquity parser expects.  The full signature of this function is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSugg(text, html, data, score, selectionIndices);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It requires at least one of &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; if you want to skip &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the text or html input is very long, &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; generates a summary for us, and puts it in the &amp;lt;code&amp;gt;summary&amp;lt;/code&amp;gt; attribute of the input object.&lt;br /&gt;
&lt;br /&gt;
We could have accomplished mostly the same thing without calling &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; by returning a list of anonymous objects like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ text: tabName,&lt;br /&gt;
  html: Utils.escapeHtml(tabName),&lt;br /&gt;
  data: tab,&lt;br /&gt;
  summary: Utils.escapeHtml(tabName) };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input objects that our &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method generates are the same objects that will eventually get passed in to the &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; methods of any commands that use this noun type.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: The Command ===&lt;br /&gt;
&lt;br /&gt;
Now that we are armed with the tab noun-type, it is easy to make the tab-switching command. Again, we use FUEL to focus the selected tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;switch tab&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_tab},&lt;br /&gt;
&lt;br /&gt;
  execute: function tab_execute(args) {&lt;br /&gt;
    // must be delayed because Ubiquity restores the focus on close&lt;br /&gt;
    Utils.setTimeout(function delayedFocus() {&lt;br /&gt;
      var tab = args.object.data;&lt;br /&gt;
      tab._window._window.focus();&lt;br /&gt;
      tab.focus();&lt;br /&gt;
    }, 99);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  preview: function tab_preview(pblock, args) {&lt;br /&gt;
    var tabName = args.object.text;&lt;br /&gt;
    if (tabName) {&lt;br /&gt;
      var msg = &amp;quot;Changes to &amp;lt;strong&amp;gt;${tab}&amp;lt;/strong&amp;gt; tab.&amp;quot;;&lt;br /&gt;
      pblock.innerHTML = _(msg, {tab: tabName});&lt;br /&gt;
    }&lt;br /&gt;
    else pblock.innerHTML = _(&amp;quot;Switch to a tab by name.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Development Hints =&lt;br /&gt;
&lt;br /&gt;
You now know all you need to know to get started developing useful Ubiquity commands of your own.&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous tips that didn&#039;t fit elsewhere on this page, that may make development easier for you.&lt;br /&gt;
&lt;br /&gt;
== The Source Code of Built-In Commands ==&lt;br /&gt;
&lt;br /&gt;
Looking at the source code of built-in commands and built-in noun types can be a very useful aid to development.  If you have the source checkout of Ubiquity (see [Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial | the development tutorial] to find out how to get this), the source code can be found in the files:&lt;br /&gt;
&lt;br /&gt;
 ubiquity/standard-feeds/&lt;br /&gt;
 ubiquity/builtin-feeds/builtincmds.js&lt;br /&gt;
 ubiquity/modules/nountypes.js&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a checkout of the source code, you can view the latest version on the web here:&lt;br /&gt;
&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/standard-feeds/ standard-feeds]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/builtin-feeds/builtincmds.js builtincmds.js]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/modules/nountypes.js nountypes.js]&lt;br /&gt;
&lt;br /&gt;
== Interacting with Other Extensions ==&lt;br /&gt;
&lt;br /&gt;
http://img363.imageshack.us/img363/1906/picture7cm5.png&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t much to say here besides that it&#039;s easy. For example, here&#039;s a command (thanks to [http://foyrek.com/lyrics.html Abimanyu Raja] for writing this code) that finds the lyrics for a song. You can simply Ubiq something like &amp;quot;get lyrics for wild international&amp;quot; but the command will also interface with the FoxyTunes extension (if it is installed) and add the currently playing song to the suggestion list. Interfacing with other extensions, too, is easy because you can view the source code for every Firefox extension.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_song = {&lt;br /&gt;
  label: &amp;quot;song name&amp;quot;,&lt;br /&gt;
  suggest: function nt_song_suggest(text) {&lt;br /&gt;
    var suggestions = [CmdUtils.makeSugg(text)];&lt;br /&gt;
    var win = Utils.currentChromeWindow;&lt;br /&gt;
    if (&amp;quot;foxytunesGetCurrentTrackTitle&amp;quot; in win)&lt;br /&gt;
      suggestions.push(CmdUtils.makeSugg(win.foxytunesGetCurrentTrackTitle()));&lt;br /&gt;
    return suggestions;&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;get lyrics&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_song},&lt;br /&gt;
  description: &amp;quot;Searches for lyrics of the song.&amp;quot;,&lt;br /&gt;
  preview: function gl_preview(pblock, {object: {text}}) {&lt;br /&gt;
    if (!text) {&lt;br /&gt;
      this.previewDefault(pblock);&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Searches for the lyrics of &amp;lt;b&amp;gt;${query}&amp;lt;/b&amp;gt;.&amp;quot;,&lt;br /&gt;
                         {query: Utils.escapeHtml(text)});&lt;br /&gt;
  },&lt;br /&gt;
  execute: function gl_execute(args) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      &amp;quot;http://www.google.com/search?q=&amp;quot; +&lt;br /&gt;
      encodeURIComponent(args.object.text + _(&amp;quot; lyrics&amp;quot;)));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing Asynchronous Noun Suggestions ==&lt;br /&gt;
&lt;br /&gt;
The noun types we&#039;ve seen so far in this tutorial have all worked synchronously, returning their suggestions right away. However, Ubiquity also supports asynchronous noun suggestions. These are useful for when a noun type needs to do some potentially time-consuming work before it can make suggestions &amp;amp;mdash; most commonly when it needs to call an external service.&lt;br /&gt;
&lt;br /&gt;
Implementing asynchronous suggestions is simple. Whenever the Ubiquity parser calls a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function, it includes a callback function that may be used to send suggestions back to the parser as they become available. In the most typical case, the noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function makes an AJAX request, invoking the parser&#039;s callback function from within the callback function for the AJAX request.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example: a noun type that suggests [http://www.freebase.com/ Freebase] topics based on the text the user has typed or selected, and a barebones &amp;lt;code&amp;gt;freebase-lookup&amp;lt;/code&amp;gt; command that uses the noun type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_freebase_topic = {&lt;br /&gt;
  name: &amp;quot;Freebase topic&amp;quot;,&lt;br /&gt;
  label: &amp;quot;topic&amp;quot;,&lt;br /&gt;
  suggest: function freebase_topic_suggest(text, html, callback) {&lt;br /&gt;
    return [&lt;br /&gt;
      CmdUtils.makeSugg(text),&lt;br /&gt;
      $.ajax({&lt;br /&gt;
        url: &amp;quot;http://www.freebase.com/api/service/search&amp;quot;,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        data: {prefix: text, limit: 5},&lt;br /&gt;
        success: function suggestTopics(response) {&lt;br /&gt;
          if (response.status === &amp;quot;200 OK&amp;quot;)&lt;br /&gt;
            callback([CmdUtils.makeSugg(result.name, result.name, result)&lt;br /&gt;
                      for each (result in response.result)]);&lt;br /&gt;
        },&lt;br /&gt;
      })];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;lookup on freebase&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_freebase_topic},&lt;br /&gt;
  preview: function preview(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _((&amp;quot;Go to the Freebase topic page for &amp;quot; +&lt;br /&gt;
                          &amp;quot;{if text}${text}{else}any topic{/if}.&amp;quot;),&lt;br /&gt;
                         args.object);&lt;br /&gt;
  },&lt;br /&gt;
  execute: function goToFreebase({object: {text, data}}) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      text&lt;br /&gt;
      ? (data&lt;br /&gt;
         ? &amp;quot;http://www.freebase.com/view&amp;quot; + data.id&lt;br /&gt;
         : (&amp;quot;http://www.freebase.com/search?query=&amp;quot; +&lt;br /&gt;
            encodeURIComponent(text)))&lt;br /&gt;
      : &amp;quot;http://www.freebase.com/&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few notes:&lt;br /&gt;
&lt;br /&gt;
* A noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function typically returns an empty array when it intends to make asynchronous suggestions, but it can return one or more suggestions synchronously if it has them available.&lt;br /&gt;
* Because the work being done to generate asynchronous suggestions is generally somewhat expensive, and because a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function may be called for every keystroke the user makes, you should probably consider implementing a delay before starting the work and/or caching the work at some level. Ubiquity currently leaves this up to each noun type individually.&lt;br /&gt;
* A much more robust implementation of Freebase-derived noun types can be found [http://graynorton.com/ubiquity/freebase-nouns.html here].&lt;br /&gt;
&lt;br /&gt;
== Running on page load, Ubiquity load and startup ==&lt;br /&gt;
&lt;br /&gt;
Commands aren&#039;t the only thing you can put in a command feed.  You can also include functions you want to be run automatically at page-load time and at Firefox startup time.&lt;br /&gt;
&lt;br /&gt;
In order to run some code on page load, you simply have to prefix your function with &amp;lt;code&amp;gt;pageLoad_&amp;lt;/code&amp;gt;. For example, if you want to say &amp;quot;Hi&amp;quot; every time a page is loaded, your code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pageLoad_hi() {&lt;br /&gt;
  displayMessage(&amp;quot;hi&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you modify the function and want to see the changes, remember to first invoke Ubiquity. Although your function like above, might not be a Ubiquity command, this is necessary to refresh the cached code.&lt;br /&gt;
&lt;br /&gt;
Similarly, functions prefixed by &amp;lt;code&amp;gt;ubiquityLoad_&amp;lt;/code&amp;gt; are called whenever Ubiquity is initialized for a main window of Firefox. This is useful when you want to interact with the Ubiquity interface itself, or run some code whenever a new window is opened.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function ubiquityLoad_googleAsDefaultEntry(gUbiquity, mainWindow) {&lt;br /&gt;
  gUbiquity.textBox.value = &amp;quot;google&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if you want to run some code everytime Firefox starts up, you just have to prefix the function with &amp;lt;code&amp;gt;startup_&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The awesome thing about these functions is the ability to develop whole Firefox extensions (that require minimal UI) as Ubiquity plugins in lesser lines of code. You don&#039;t need to worry about chrome.manifest or install.rdf. Another added benefit is that you never have to restart your Firefox during development unless of course, you are running code on Firefox startup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://img388.imageshack.us/img388/3086/picture5eo9.png&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code for [http://foyrek.com/keyscape.js Keyscape] which is a Ubiquity command that makes use of &amp;lt;code&amp;gt;pageLoad&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;startup&amp;lt;/code&amp;gt; to recreate the functionality of the [https://addons.mozilla.org/en-US/firefox/addon/339 Search Keys extension] by Jesse Ruderman. In line with Ubiquity&#039;s aim to let you do things quicker using your keyboard, this command lets you go to search results on Google by just pressing a number. It&#039;ll add hints to show the number of each link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//A lot of this code is borrowed from the Search Keys extension&lt;br /&gt;
//Many thanks to Jeese Ruderman&lt;br /&gt;
&lt;br /&gt;
function startup_keyscape() {&lt;br /&gt;
  window.addEventListener(&amp;quot;keydown&amp;quot;, keyscape_down, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function pageLoad_keyscape(doc){&lt;br /&gt;
&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
  //If we are on about: or chrome://, just return&lt;br /&gt;
  if(uri.scheme != &amp;quot;http&amp;quot;)&lt;br /&gt;
    return;&lt;br /&gt;
&lt;br /&gt;
  //Check if the page we are on is google&lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	      		    &lt;br /&gt;
    for(var num=1; num&amp;lt;=10; num++){&lt;br /&gt;
&lt;br /&gt;
      var link = jQuery(doc.body).find(&#039;a.l&#039;)[num-1];&lt;br /&gt;
      &lt;br /&gt;
      if( link ){&lt;br /&gt;
&lt;br /&gt;
        var hint = doc.createElementNS(&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;, &amp;quot;span&amp;quot;);&lt;br /&gt;
        hint.style.color = &amp;quot;blue&amp;quot;;&lt;br /&gt;
        hint.style.background = &amp;quot;white&amp;quot;;&lt;br /&gt;
        hint.style.padding = &amp;quot;1px 2px 1px 2px&amp;quot;;&lt;br /&gt;
        hint.style.marginLeft = &amp;quot;.5em&amp;quot;;&lt;br /&gt;
        hint.appendChild(doc.createTextNode(num == 10 ? 0 : num));&lt;br /&gt;
        link.parentNode.insertBefore(hint, link.nextSibling);&lt;br /&gt;
      }  		&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_isGoogle(uri){&lt;br /&gt;
  return uri.host.indexOf(&amp;quot;google&amp;quot;) != -1 &lt;br /&gt;
	 &amp;amp;&amp;amp; (uri.path.substr(0,8) == &amp;quot;/search?&amp;quot; &lt;br /&gt;
         || uri.path.substr(0,8) == &amp;quot;/custom?&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_down(event){&lt;br /&gt;
&lt;br /&gt;
  var doc =  Application.activeWindow.activeTab.document;	&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
 &lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	&lt;br /&gt;
   var key = parseInt(event.keyCode || event.charCode);	&lt;br /&gt;
   var num;&lt;br /&gt;
	&lt;br /&gt;
   if(48 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 57) //number keys&lt;br /&gt;
     num = key - 48;&lt;br /&gt;
   else if(96 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 105) //numeric keypad with numlock on&lt;br /&gt;
     num = key - 96;&lt;br /&gt;
   else&lt;br /&gt;
     return;&lt;br /&gt;
&lt;br /&gt;
   //Don&#039;t do anything if we are in a textbox&lt;br /&gt;
   //or some other related elements&lt;br /&gt;
   var elt = window.document.commandDispatcher.focusedElement;&lt;br /&gt;
   &lt;br /&gt;
   if (elt) {&lt;br /&gt;
     var ln = new String(elt.localName).toLowerCase();&lt;br /&gt;
     if (ln == &amp;quot;input&amp;quot; || ln == &amp;quot;textarea&amp;quot; || ln == &amp;quot;select&amp;quot; || ln == &amp;quot;isindex&amp;quot;)&lt;br /&gt;
        return;&lt;br /&gt;
   }&lt;br /&gt;
    &lt;br /&gt;
   //Get the link url from the search results page&lt;br /&gt;
   var url_dest = jQuery(doc.body).find(&#039;a.l&#039;).eq(num-1).attr(&#039;href&#039;);&lt;br /&gt;
   &lt;br /&gt;
   if(event.altKey){&lt;br /&gt;
     //Open in new tab&lt;br /&gt;
     Application.activeWindow.open(Utils.url(url_dest));&lt;br /&gt;
   }else{&lt;br /&gt;
     //Open in same tab&lt;br /&gt;
     doc.location.href = url_dest;&lt;br /&gt;
   }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Ubiquity does indeed become ubiquitous, a lot of extensions can be re-written as Ubiquity commands. This is much nicer for the end-user, as well, because the Ubiquity command installation process is a lot easier.&lt;br /&gt;
&lt;br /&gt;
In the future, Ubiquity is also likely to have the ability to convert your Ubiquity commands into proper Firefox extensions. Look [http://labs.toolness.com/trac/ticket/3 here] to check on the progress of this functionality.&lt;br /&gt;
&lt;br /&gt;
== Persistent Storage ==&lt;br /&gt;
Some commands may want to store data that persist even after closing Firefox. &lt;br /&gt;
Meet &amp;lt;code&amp;gt;Bin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var gId = 42; // used for avoiding needless preview updates when typing&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;memo&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Lets you jot a memo for the page.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  argument: noun_arb_text,&lt;br /&gt;
  execute: function memo_execute({object: {html}}) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]() || [];&lt;br /&gt;
    list.push(html);&lt;br /&gt;
    Bin[href](list);&lt;br /&gt;
    gId = +new Date;&lt;br /&gt;
  },&lt;br /&gt;
  preview: function memo_preview(pb) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]();&lt;br /&gt;
    if (!list) {&lt;br /&gt;
      pb.innerHTML =&lt;br /&gt;
        &amp;lt;&amp;gt;No memos taken for: &amp;lt;small&amp;gt;&amp;lt;code&amp;gt;{href}&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/&amp;gt;;&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    if (pb.ownerDocument.getElementById(gId)) return;&lt;br /&gt;
    var ol = CmdUtils.previewList(pb, list, function deleteMemo(i, ev) {&lt;br /&gt;
      $(ev.target).closest(&amp;quot;li&amp;quot;).slideUp();&lt;br /&gt;
      list.splice(i, 1);&lt;br /&gt;
      Bin[href](list.length ? list : null);&lt;br /&gt;
      gId = +new Date;&lt;br /&gt;
    });&lt;br /&gt;
    ol.id = gId;&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;list memos&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Opens all memos you&#039;ve taken in a new tab.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  execute: function list_memos_execute() {&lt;br /&gt;
    var htm = +Bin + &amp;quot; page(s)&amp;lt;dl&amp;gt;&amp;quot;, {escapeHtml} = Utils;&lt;br /&gt;
    for (var [url, memos] in Bin) {&lt;br /&gt;
      htm += &amp;quot;&amp;lt;dt&amp;gt;&amp;quot; + escapeHtml(url) + &amp;quot;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;ol&amp;gt;&amp;quot;;&lt;br /&gt;
      for each (var memo in memos) htm += &amp;quot;&amp;lt;li&amp;gt;&amp;quot; + memo + &amp;quot;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
      htm += &amp;quot;&amp;lt;/ol&amp;gt;&amp;lt;/dd&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    Utils.openUrlInBrowser(&amp;quot;data:text/html,&amp;quot; + encodeURI(htm + &amp;quot;&amp;lt;/dl&amp;gt;&amp;quot;));&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details, see the bottom of [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/feedmanager.js FeedManager] documentation.&lt;br /&gt;
&lt;br /&gt;
== Firebug ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity automatically enables Chrome Errors and Warnings on startup so that errors in your code appear in the Firebug console. Just use &amp;lt;tt&amp;gt;CmdUtils.log()&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;console.log()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Where To Go From Here =&lt;br /&gt;
&lt;br /&gt;
Take a look at Ubiquity&#039;s reference documentation for the &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils]&amp;lt;/tt&amp;gt; namespaces.&lt;br /&gt;
&lt;br /&gt;
If you have any questions or comments, feel free to join us on IRC at &amp;lt;tt&amp;gt;#ubiquity&amp;lt;/tt&amp;gt; on &amp;lt;tt&amp;gt;irc.mozilla.org&amp;lt;/tt&amp;gt;, as well as the [http://groups.google.com/group/ubiquity-firefox Ubiquity Google Group].&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
To reiterate a point I made before: Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web. You are one of those agents.&lt;br /&gt;
&lt;br /&gt;
Now, go forth and create.&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=165587</id>
		<title>Labs/Ubiquity/Ubiquity 0.5 Author Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=165587"/>
		<updated>2009-09-01T13:31:17Z</updated>

		<summary type="html">&lt;p&gt;Satyr: s/state/storage/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]].&lt;br /&gt;
&lt;br /&gt;
Author: Aza Raskin, Blair McBride, Abimanyu Raja, Jono DiCarlo, Atul Varma&lt;br /&gt;
&lt;br /&gt;
= The Ubiquity version 0.5 Command Tutorial =&lt;br /&gt;
&lt;br /&gt;
The great power of Ubiquity&amp;amp;mdash;from a developer standpoint&amp;amp;mdash;is how easy it is to create commands. With only a couple of lines of Javascript, Ubiquity enables even casual web developers to drastically enhance the features of the browser. From an 8-line command to insert a contact&#039;s email address in any text field, to a 50-line Twitter integration, this tutorial walks you through the process of being generative with Ubiquity.&lt;br /&gt;
&lt;br /&gt;
The rest of this page documents the command developer API as it stands frozen in version 0.5.&lt;br /&gt;
&lt;br /&gt;
If you want the bleeding-edge command developer API (which includes any new features that may have been added to the Ubiquity source code in HG but not yet included in a release), then that&#039;s [[Labs/Ubiquity/Ubiquity_Source_Tip_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
If you want the old command developer API, as it stood in Ubiquity 0.1 (not recommended), that&#039;s [[Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
== Real Time Development ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity doesn&#039;t require you to restart Firefox as you develop. Restarting is a drastic measure, and we want none of it. Instead, Ubiquity reloads the commands every time it is summoned. When you are using the built-in editor then you don&#039;t even need to save!&lt;br /&gt;
&lt;br /&gt;
To open the Ubiquity command editor, summon Ubiquity (control/alt + space) and use the &amp;quot;open command editor&amp;quot; command. Throughout this tutorial, when we want you to run a command in Ubiquity, we&#039;ll say &#039;&#039;&#039;Ubiq&#039;&#039;&#039; it. For instance, to open the editor, just Ubiq &amp;quot;open command editor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the following examples, just type in this editor. Updates happen the next time you summon Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Choices, Choices... ==&lt;br /&gt;
&lt;br /&gt;
You may notice a drop-down menu mentioning something about a &amp;quot;feed type&amp;quot; just above the editing field in the command editor:&lt;br /&gt;
&lt;br /&gt;
http://www.toolness.com/images/20090318121423.jpg&lt;br /&gt;
&lt;br /&gt;
For now, just make sure this drop-down is set to &amp;quot;Regular&amp;quot;.  We&#039;ll tell you more about what this means later.&lt;br /&gt;
&lt;br /&gt;
== Hello World: The First Command ==&lt;br /&gt;
&lt;br /&gt;
=== Just a Message: As Simple as it Gets ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start with the standard programing trope: printing &amp;quot;Hello, World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the command editor type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try Ubiq-ing &amp;quot;say hello&amp;quot;. You&#039;ll see that &amp;quot;Hello, World!&amp;quot; is immediately displayed on the screen. If you are on Mac OSX with [http://en.wikipedia.org/wiki/Growl_(software) Growl] installed the message will appear as a Growl notification. If you are on Windows, then it will appears as a standard &amp;quot;toaster&amp;quot; notification in the bottom right-hand corner of the screen.&lt;br /&gt;
&lt;br /&gt;
http://farm3.static.flickr.com/2479/3651542339_022e4aa4c4.jpg&lt;br /&gt;
&lt;br /&gt;
http://img517.imageshack.us/img517/7726/picture2vx2.png&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 8.04 (Hardy Heron) this appears thus:&lt;br /&gt;
&lt;br /&gt;
http://img293.imageshack.us/img293/7746/ubiqubuntuhelloworldeq9.png&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have Growl installed on OSX, or aren&#039;t on a Windows XP/Vista or Ubuntu Hardy, then you won&#039;t get any sort of notification. That&#039;s something to be [http://labs.toolness.com/trac/ticket/19 worked on] in future releases of Ubiquity.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils.CreateCommand ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; is a namespace which contains all the functions you need to create commands.  Commands are created by making an object and passing it to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.  In Javascript, inline curly braces mean &amp;quot;new object&amp;quot;, so this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function () { //etc }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
means &amp;quot;Make an object with two attributes, &#039;names&#039; and &#039;execute&#039;.&amp;quot;  This object is then passed as the argument to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== names ===&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; and &#039;execute&#039; are the only two mandatory attributes for your command object.  &#039;names&#039; specifies what the command is called, and &#039;execute&#039; specifies what it does.  There are plenty of other attributes that you can specify, but they are all optional.&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; is always an array (thus the square brackets).  In the case of this command we provided only one name, &amp;quot;hello world&amp;quot;.  But we could have provided as many names as we wanted.  For instance, if we had said:&lt;br /&gt;
&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
then &amp;quot;say hello&amp;quot; would be the normal name of the command, but Ubiquity would also recognize &amp;quot;greet&amp;quot; as a synonym or alias for the command.&lt;br /&gt;
&lt;br /&gt;
=== execute ===&lt;br /&gt;
&lt;br /&gt;
&#039;execute&#039; is always a function.  When the user executes your command, this is the function that will be run.  It can do pretty much anything you want -- or at least, anything you know how to write in JavaScript.&lt;br /&gt;
&lt;br /&gt;
In the example above, we simply call &amp;lt;code&amp;gt;displayMessage()&amp;lt;/code&amp;gt;, which displays the given message in whichever way the operating system can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a number of other useful functions in the &amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; namespace. We don&#039;t yet have full documentation for these commands, but you&#039;ll get a sense of the useful ones in this tutorial. For more detailed information, take a look at [http://hg.toolness.com/ubiquity-firefox/file/9a6c9935da9f/ubiquity/chrome/content/cmdutils.js cmdutils.js].&lt;br /&gt;
&lt;br /&gt;
=== Making sure your command is localizable ===&lt;br /&gt;
&lt;br /&gt;
Ubiquity now supports multiple languages.  That means that hopefully someday someone will be translating your commands to the other languages that Ubiquity supports.  Making your command localizable is easy, and a good habit to get into!  You just have to locate all strings that appear in your &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; methods, that are intended for display to humans, and wrap them with:&lt;br /&gt;
&lt;br /&gt;
 _()&lt;br /&gt;
&lt;br /&gt;
This may look odd, but what it does is quite important: it makes your strings appear in the template files that localizers will be using.  So let&#039;s make our &amp;quot;Hello world!&amp;quot; command localizable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes it so that when a localization template is generated from your command feed, &amp;quot;Hello, World!&amp;quot; will be listed among the strings to be translated.&lt;br /&gt;
&lt;br /&gt;
Note that we don&#039;t need to wrap the names, or other strings that appear in the command metadata -- these are automatically wrapped for us.  We only need to wrap strings that appear inside the functions.&lt;br /&gt;
&lt;br /&gt;
=== Adding a Preview ===&lt;br /&gt;
&lt;br /&gt;
http://img352.imageshack.us/img352/1002/picture3ex0.png&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a preview to our new command. Previews give the user feedback about what a command does before it&#039;s executed. Previews are great for providing rich visual feedback like displaying a graphical representation of atmospheric conditions when using the weather command as shown above. Previews have the full expressive power of HTML, including animations, so there&#039;s a lot you can do with them.&lt;br /&gt;
&lt;br /&gt;
One point of design: Preview code should never have side-effects. That is, a preview should never (without user interaction) change the state of the system.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;say hello&amp;quot; command, we don&#039;t need anything fancy: just some help text that is more descriptive than the default &amp;quot;Executes the say hello command.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  preview: &amp;quot;Displays a &amp;lt;i&amp;gt;salutary&amp;lt;/i&amp;gt; greeting to the planet.&amp;quot;,&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the preview is an HTML-formatted string. The preview can also be a function. We&#039;ll get to that in the next section.&lt;br /&gt;
&lt;br /&gt;
== The Date Command: The Second Command ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the Selection ===&lt;br /&gt;
&lt;br /&gt;
I often forget what day it is. That may be because I need to go outside more often, but, like any programmer, I generally solve my problem&#039;s symptoms with technology rather then addressing the root cause. My solution is to create a command that inserts the date at the location of the cursor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(new Date().toLocaleDateString());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new function here is &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt;. This inserts the passed-in text onto the page at the location of the cursor. If the cursor is in an editable text or rich-text fields, the text gets dumped there. If the cursor isn&#039;t in an editable area, &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt; will still be able to insert the date. (Even when it isn&#039;t displayed, Firefox always keeps track of a cursor position. To see it, type F7.) Try going to a page, selecting some non-mutable text, and using the command. See, it works! This is particularly useful for commands like &amp;quot;translate&amp;quot;, where you want to replace non-editable text with its translation.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;toLocaleDateString()&amp;lt;/code&amp;gt; function is native to Javascript, so if you&#039;re not familiar with it check out the documentation for the Javascript [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date Date object].&lt;br /&gt;
&lt;br /&gt;
=== A Better Preview ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s time to add a better preview to the date command. Let&#039;s have the preview show the date, so that the user will know what to expect when they execute the command. (As a side benefit the user doesn&#039;t even need to execute the command to do a quick check of the day.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _date: function date__date() {&lt;br /&gt;
    return new Date().toLocaleDateString();&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = _(&#039;Inserts today\&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;);&lt;br /&gt;
    pblock.innerHTML = CmdUtils.renderTemplate(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(this._date());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve done three things here. The first was to factor out the code for getting the date into the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt; function. This way we don&#039;t break [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY] by repeating code across the preview and execute functions. Notice that to access the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt;, we use the &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
The second thing we&#039;ve done is to add a preview function. The first argument is the DOM element that gets displayed as the preview for your command. Modify &amp;lt;code&amp;gt;pblock&amp;lt;/code&amp;gt; and you modify the preview. In this case, we set the &amp;lt;code&amp;gt;innerHTML&amp;lt;/code&amp;gt; of the preview block to be the message we want.&lt;br /&gt;
&lt;br /&gt;
The third thing we&#039;ve done is to do some string formatting using the &amp;lt;code&amp;gt;renderTemplate()&amp;lt;/code&amp;gt; function. This takes a template string and performs the appropriate substitution given the passed-in JSON object. Templates can handle a wide range of functionality, as we are currently using TrimPath&#039;s [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavascriptTemplates]. You should read their site for more documentation. Although JavascriptTemplates has some nice properties, we are contemplating moving to [http://mjtemplate.org/ MJT] sometime soon.&lt;br /&gt;
&lt;br /&gt;
=== A shortcut for localization and rendering templates ===&lt;br /&gt;
&lt;br /&gt;
Note how in the code above, we used the localization wrapper &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; before passing the string to renderTemplate.  Because this is such a very common combination when displaying strings, we have a shortcut for it.  Calling _() with a JSON object as the second argument will automatically trigger &amp;lt;code&amp;gt;CmdUtils.renderTemplate()&amp;lt;/code&amp;gt; on the post-localization string.  So the above preview method could be rewritten more simply as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = &#039;Inserts today&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Networking calls and placeholder previews ===&lt;br /&gt;
&lt;br /&gt;
Previews display something meaningful to the user immediately. If you have a preview that requires an AJAX request&amp;amp;mdash;say, to fetch some search results&amp;amp;mdash;that call might take a while to return. In the meantime, your command should display a placeholder preview giving the user feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function(pblock) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;This will show until the AJAX request returns&amp;quot;);&lt;br /&gt;
    CmdUtils.previewGet(pblock, &amp;quot;http://example.com&amp;quot;, function (htm) {&lt;br /&gt;
      pblock.innerHTML = htm;&lt;br /&gt;
    });&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documentation and Metadata ==&lt;br /&gt;
&lt;br /&gt;
Before you share your command with the world, you should consider adding some attributions to the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you should &amp;lt;em&amp;gt;definitely&amp;lt;/em&amp;gt; add some documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Inserts today&#039;s date.&amp;quot;,&lt;br /&gt;
  help: &amp;quot;If you&#039;re in an editable text area, inserts today&#039;s date, formatted for the current locale.&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.description&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.help&amp;lt;/code&amp;gt; attributes are both automatically displayed alongside your command&#039;s name on the command-list page.  (The user can get to this page at any time by issuing the &amp;quot;list ubiquity commands&amp;quot; command.)  HTML tags can be used in both of these strings.&lt;br /&gt;
&lt;br /&gt;
Description is a one-line summary of what the command does, while Help is a longer description that can include examples, caveats, and so on. If your command is simple enough that all you have to say about it fits in one line, it&#039;s OK to use a description alone and leave out the help.&lt;br /&gt;
&lt;br /&gt;
== Sharing it with the World ==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve got our awesome new &amp;quot;date&amp;quot; command, let&#039;s share it with the world. All you have to do is put the javascript file on the web somewhere, and make an html page linking to it with &amp;quot;link rel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;&amp;lt;link rel=&amp;quot;commands&amp;quot; href=&amp;quot;http://path-to-js&amp;quot; name=&amp;quot;Title Goes Here&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anyone with Ubiquity who visits will get a message offering them the choice of subscribing to your command.&lt;br /&gt;
&lt;br /&gt;
[[Image:Subscribe.png]]&lt;br /&gt;
&lt;br /&gt;
If the user chooses to subscribe to a Regular command feed from an untrusted source, they will get a security warning message before they can install the command.  Because Regular Ubiquity command feeds can execute arbitrary javascript with chrome privileges, subscribing to a command from a website means allowing that site full access to do whatever it wants to your browser.  We want to make sure people understand the dangers before subscribing to commands, so we made the warning page pretty scary.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Feed Types ===&lt;br /&gt;
&lt;br /&gt;
Recall that back near the beginning of the tutorial, you set the &amp;quot;feed type&amp;quot; to &amp;quot;Regular&amp;quot;.  As you may have guessed, there&#039;s actually more than one way to write a command feed.  The advantage of Regular feeds is that they let you do whatever you want, so it&#039;s really easy to innovate, but the disadvantages lie in subscribing to misbehaving or malicious code.  You can alternatively write what&#039;s called a &#039;&#039;Locked-Down Feed&#039;&#039;, which is much safer and doesn&#039;t raise a warning page when a user subscribes to it&amp;amp;mdash;but the consequences are that you have less freedom of implementation as a command author.  If you&#039;re interested in learning more about Locked-Down Feeds, check out the [[Labs/Ubiquity/Locked-Down_Feed_Tutorial|Locked-Down Feed Tutorial]].&lt;br /&gt;
&lt;br /&gt;
=== Trust Networks ===&lt;br /&gt;
&lt;br /&gt;
In the future, we&#039;re going to have something set up that we call a &amp;quot;[[Labs/Ubiquity/TrustNetwork|trust network]]&amp;quot;.  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you&#039;ll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they&#039;ll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.&lt;br /&gt;
&lt;br /&gt;
By the way, the reason we call it &amp;quot;subscribing&amp;quot; to a command, rather than &amp;quot;installing&amp;quot; a command, is that if the javascript file changes -- if the site owner adds new commands, removes old commands, or updates existing commands -- all users subscribed to that URL will automatically get the updates.  This will be very convenient for both users and developers, but it will also introduce another type of security risk: just because you decided a command was safe at one point in time doesn&#039;t mean that the command will always remain safe.  For this reason, we&#039;ll need to make sure that the trust network keeps track of when commands have been modified, and notifies users of changes that may make a command unsafe.&lt;br /&gt;
&lt;br /&gt;
== Map Me! Location, Snapshots, and Inserting HTML ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;map&amp;quot; command that comes with Ubiquity is fairly powerful. It&#039;s also fairly complicated&amp;amp;mdash;well, comparatively. It&#039;s still only a couple hundred lines of code. The command, though, can get even more useful. Imagine being able to select some houses on Craigslist, or a list of restaurant names, and Ubiq &amp;quot;map these&amp;quot; to get just the map you want. The concept of &amp;quot;these&amp;quot; puts the power of mashups into the users hands. But I digress. Let&#039;s make a simple command that inserts a map of your current location.&lt;br /&gt;
&lt;br /&gt;
In this command, we use the Google [http://code.google.com/apis/maps/documentation/staticmaps/ static map API] and the Ubiquity function &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; to insert a map of your current location. Ubiquity currently uses the [http://www.maxmind.com/app/api MaxMind] API for trying to guess your location from your IP. That will probably change in the future.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll call this command &amp;lt;code&amp;gt;&amp;quot;map me&amp;quot;&amp;lt;/code&amp;gt; so that it won&#039;t be confused with the standard &amp;lt;code&amp;gt;&amp;quot;map&amp;quot;&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;map me&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _getMapUrl: function() {&lt;br /&gt;
    var loc = CmdUtils.getGeoLocation();&lt;br /&gt;
    var mapUrl = &amp;quot;http://maps.google.com/staticmap?&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var params = {&lt;br /&gt;
      center: loc.lat + &amp;quot;,&amp;quot; + loc.long,&lt;br /&gt;
      size: &amp;quot;500x400&amp;quot;,&lt;br /&gt;
      zoom: 14,&lt;br /&gt;
      key: &amp;quot;ABQIAAAAGZ11mh1LzgQ8-8LRW3wEShQeSuJunOpTb3RsLsk00-MAdzxmXhQoiCd940lo0KlfQM5PeNYEPLW-3w&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    return mapUrl + jQuery.param( params );&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function( pblock ) {&lt;br /&gt;
    var msg = &amp;quot;Inserts a map of your current location: &amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
              &amp;quot;&amp;lt;img src=&#039;${url}&#039;/&amp;gt;&amp;quot;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {url: this._getMapUrl()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function( ) {&lt;br /&gt;
    CmdUtils.getImageSnapshot( this._getMapUrl(), function(imgData) {&lt;br /&gt;
      CmdUtils.setSelection( &amp;quot;&amp;lt;img src=&#039;&amp;quot; + imgData +&amp;quot;&#039;/&amp;gt;&amp;quot;);&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three new things here: &amp;lt;code&amp;gt;CmdUtils.setSelection&amp;lt;/code&amp;gt; to set HTML (yep, it can do that); the use of &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt;; and using &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt; to capture the bits for the image.&lt;br /&gt;
&lt;br /&gt;
I find getting the location&amp;amp;mdash;as imprecise as IP-based location can be&amp;amp;mdash;useful for doing sensible defaults for location-based commands, like Yelp. &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; returns an object which has the following properties: city, state, country, lat, and long.&lt;br /&gt;
&lt;br /&gt;
Why do we need to use &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt;? Because the Google Maps API requires a key that is tied to a particular URL. If we naively inject the image tag into a random web page, the image won&#039;t load because the key doesn&#039;t match that random web page&#039;s URL. Thus, we use the &amp;lt;code&amp;gt;snapshotImage()&amp;lt;/code&amp;gt; function to convert the image into a [http://en.wikipedia.org/wiki/Data:_URI_scheme data url].&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a &amp;lt;code&amp;gt;CmdUtils.snapshotWindow&amp;lt;/code&amp;gt; function, which allows you to get the image data for any tab/window. The function takes a window as the first paramater, and a callback for the second.&lt;br /&gt;
&lt;br /&gt;
= Commands with Arguments =&lt;br /&gt;
&lt;br /&gt;
== Echo ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ll be working towards making some fun and useful commands&amp;amp;mdash;commands that let you control the seething tendrils of the internet with your little pinky. But, let&#039;s start by making a simple command to echo back whatever you type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;echo&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;your shout&amp;quot;}],&lt;br /&gt;
  preview: function( pblock, arguments ) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Will echo: &amp;quot;) + arguments.object.text;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var msg = arguments.object.text + &amp;quot;... &amp;quot; + arguments.object.text + &amp;quot;......&amp;quot;;&lt;br /&gt;
    displayMessage( msg );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says that the command &amp;quot;echo&amp;quot; takes one argument which is arbitrary text. Whatever text the user enters will get wrapped in an input object and passed into both the preview and execute function.&lt;br /&gt;
&lt;br /&gt;
Try it!  Ubiq &amp;quot;echo hellooooo&amp;quot; and watch what happens.&lt;br /&gt;
&lt;br /&gt;
Ubiquity takes care of parsing the user&#039;s input, so you don&#039;t need to worry about handling prounoun substitution or any of the other natural-language-like features of the Ubiquity parser. Try selecting some text on a page, and Ubiq &amp;quot;echo this&amp;quot;. Ubiquity should now echo the selected text.  &lt;br /&gt;
&lt;br /&gt;
Note that we gave three pieces of information when defining our argument:  its role, its nountype, and its label.  The label is the easiest part: It&#039;s just whatever text you want to have appear in the Ubiquity interface as a prompt for the user.  E.g, if you ubiq &amp;quot;echo&amp;quot;, you will see the label for the argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  echo (your shout)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The roles and the nountypes require some more explanation.  We&#039;ll cover each of them in detail next.&lt;br /&gt;
&lt;br /&gt;
=== Argument Roles ===&lt;br /&gt;
&lt;br /&gt;
Your command can take multiple arguments.  Each one is identified by a &amp;quot;role&amp;quot;.  To understand roles, it helps to think of your command name as a verb, and each argument as a noun.  Remember that Ubiquity&#039;s command line is a pseudo-natural-language environment, so it attempts to be as close to natural language grammar as possible.&lt;br /&gt;
&lt;br /&gt;
For example, if you&#039;ve ever used the &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; command, you know that it takes up to two arguments: a message and a person.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  email message&lt;br /&gt;
  email to person&lt;br /&gt;
  email message to person&lt;br /&gt;
  email to person message&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In grammatical terms, the message argument is the &amp;quot;direct object&amp;quot; of the verb &amp;quot;email&amp;quot;.  The person argument is an indirect object.  We call it the &amp;quot;goal&amp;quot; of the verb.  So if we were writing the email command, we&#039;d define the arguments like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;message&amp;quot;},&lt;br /&gt;
              {role: &amp;quot;goal&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;recipient&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because we give the recipient argument the &amp;quot;goal&amp;quot; role, the Ubiquity parser knows to expect the user to type the word &amp;quot;to&amp;quot;.  When the user enters &amp;quot;email hello to Aza&amp;quot;, the parser knows that the word following &amp;quot;to&amp;quot; -- that is, &amp;quot;Aza&amp;quot; -- should be assigned to the recipient argument.&lt;br /&gt;
&lt;br /&gt;
In our simple &amp;quot;echo&amp;quot; command, we expect the user to type &amp;quot;echo hellooooo&amp;quot; or something like that.  The &amp;quot;hellooooo&amp;quot; is the direct object of the verb &amp;quot;echo&amp;quot;, so we give it the &amp;quot;object&amp;quot; role.  &lt;br /&gt;
&lt;br /&gt;
&amp;quot;Object&amp;quot; is the most common role.  If a command takes only one argument, that argument is usually an &amp;quot;object&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== What Roles Can I Use? ====&lt;br /&gt;
&lt;br /&gt;
* object   (in &amp;quot;echo helloooo&amp;quot;, hello is the object.)&lt;br /&gt;
* goal    (in &amp;quot;email this to brandon&amp;quot;, brandon is the goal.)&lt;br /&gt;
* source   (in &amp;quot;translate this from spanish&amp;quot;, spanish is the source.)&lt;br /&gt;
* location    (in &amp;quot;yelp pizza near boston&amp;quot;, boston is the location.)&lt;br /&gt;
* time    (in &amp;quot;book a flight on thursday&amp;quot;, thursday is the time.)&lt;br /&gt;
* instrument  (in &amp;quot;search monkeys with google&amp;quot;, google is the instrument.)&lt;br /&gt;
* format   (in &amp;quot;check weather in celsius&amp;quot;, celsius is the format.)&lt;br /&gt;
* modifier  (in &amp;quot;get email address for chris&amp;quot;, chris is the modifier.)&lt;br /&gt;
* alias   (in &amp;quot;twitter this as jono&amp;quot;, jono is the alias.)&lt;br /&gt;
&lt;br /&gt;
[https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles More information about these roles].&lt;br /&gt;
&lt;br /&gt;
=== The Arguments Object ===&lt;br /&gt;
&lt;br /&gt;
When your execute method is called, it is passed a single object that encapsulates the values for all arguments.&lt;br /&gt;
&lt;br /&gt;
When your preview method is called, it is passed this object, too.&lt;br /&gt;
&lt;br /&gt;
The object has one attribute corresponding to each role.  In our example above, the command accepts only an object-role argument, so the preview and execute methods get passed an argument with an &amp;quot;arguments.object&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
If we made a command, like email, that takes an object-role argument and a goal-role argument, its preview and execute methods would get passed an argument with &amp;quot;arguments.object&amp;quot; and &amp;quot;arguments.goal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
arguments.object (or arguments.goal) has several attributes of its own:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments.object.text  // a string of the input in plain text, without formatting&lt;br /&gt;
  arguments.object.html  // a string of the input in formatted html, including tags&lt;br /&gt;
  arguments.object.data  // for non-text input types, an arbitrary data object&lt;br /&gt;
  arguments.object.summary // for very long inputs, an abbreviated display string&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our example command only cares about the &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; attribute of the input, because it simply wants plain text.  Often, when the user invokes your command by typing a few short words into the input box, &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.html&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;.summary&amp;lt;/code&amp;gt; will all have exactly the same value, and &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; will be null.  Many, if not most, commands that you write will only care about the text value.  Nevertheless, the other versions of the input data are provided to you in case they differ from &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; and in case your command has a use for them.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Noun Types ==&lt;br /&gt;
&lt;br /&gt;
Noun types specify what &#039;&#039;kind&#039;&#039; of input your command can accept for each one of its arguments.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;echo&amp;quot; command, we wanted the object-role argument to accept any text whatsoever, so for its nountype we passed in the predefined &amp;lt;code&amp;gt;noun_arb_text&amp;lt;/code&amp;gt; object.  This object accepts any arbitrary text as a valid argument and passes it to the command unchanged.&lt;br /&gt;
&lt;br /&gt;
This is OK for very simple commands, like echoing back the user&#039;s input.  But for commands that take structured data, you will want to use more specific nountypes.&lt;br /&gt;
&lt;br /&gt;
For example, if a command can take a date (like the &amp;quot;check calendar&amp;quot; command), you would want to use &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; as the nountype of the argument.  &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; provides several benefits to your command:  it does all of the date parsing for you; it suggests dates that the user might want to enter (for instance, it defaults to today&#039;s date).  And, it lets the parser know that your command takes a date.  This is useful because when the user selects a date on a page and invokes Ubiquity, your command -- along with &amp;quot;check calendar&amp;quot; -- will be one of the top suggestions.&lt;br /&gt;
&lt;br /&gt;
You can write your own noun types -- we&#039;ll get into that later.  For now, let&#039;s take a look at the built-in nountypes that your command can use.  These include:&lt;br /&gt;
&lt;br /&gt;
* noun_arb_text (Arbitrary text)&lt;br /&gt;
* noun_type_language (Name of a human language, e.g. &amp;quot;English&amp;quot;, &amp;quot;Japanese&amp;quot;)&lt;br /&gt;
* noun_type_url (A URL)&lt;br /&gt;
* noun_type_contact (An email address from your address book)&lt;br /&gt;
* noun_type_date (A date, in any format, or a word like &amp;quot;tomorrow&amp;quot;)&lt;br /&gt;
* noun_type_time (A time, in any format)&lt;br /&gt;
* noun_type_percentage&lt;br /&gt;
* noun_type_address&lt;br /&gt;
* noun_type_tab&lt;br /&gt;
* noun_type_searchengine&lt;br /&gt;
* noun_type_tag&lt;br /&gt;
* noun_type_geolocation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are familiar with writing commands, you should check out the [http://hg.toolness.com/ubiquity-firefox/file/6caa9d66b3bb/ubiquity/chrome/content/nlparser/en/nountypes.js nountypes.js], which has the implementation for most of the noun-types.  You can see what noun types are already available for your commands to use, what still needs to be written, and where the existing implementations could use improvement &amp;amp;mdash; and then come [[Labs/Ubiquity#Participation|get involved]] to help us improve them.&lt;br /&gt;
&lt;br /&gt;
=== Regexps as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
If none of the nountypes above is what you&#039;re looking for, there are several ways to define your own.  The simplest is to use a regular expression.  Suppose that (for whatever odd reason) you wanted your command to accept only arguments that begin with the letter N.  The following regexp matches words that start with N:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /^[nN]/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could use it as a noun type, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: /^[nN]/,&lt;br /&gt;
               label: &amp;quot;word that starts with n&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note that you do &#039;&#039;not&#039;&#039; put quotes around the regexp.)&lt;br /&gt;
&lt;br /&gt;
A regexp nountype will reject input that doesn&#039;t match, but it doesn&#039;t know how to help the user by suggesting appropriate input.&lt;br /&gt;
&lt;br /&gt;
=== Lists as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
Suppose you&#039;re writing a command that takes a color as an argument (perhaps it outputs a hexadecimal RGB representation of that color.)  To make a nountype that accepts colors, you can simply pass in an array of strings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  names: [&amp;quot;convert color&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: [&amp;quot;red&amp;quot;, &amp;quot;orange&amp;quot;, &amp;quot;yellow&amp;quot;, &amp;quot;green&amp;quot;, &lt;br /&gt;
                          &amp;quot;blue&amp;quot;, &amp;quot;violet&amp;quot;, &amp;quot;black&amp;quot;, &amp;quot;white&amp;quot;,&lt;br /&gt;
                          &amp;quot;grey&amp;quot;, &amp;quot;brown&amp;quot;, &amp;quot;beige&amp;quot;, &amp;quot;magenta&amp;quot;,&lt;br /&gt;
                          &amp;quot;cerulean&amp;quot;, &amp;quot;puce&amp;quot;],&lt;br /&gt;
               label: &amp;quot;color to convert&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One benefit of using a list is that the parser can use it offer the user suggestions.   If the user enters &amp;quot;get-color bl&amp;quot;, for instance, Ubiquity will be able to suggest &amp;quot;black&amp;quot; and &amp;quot;blue&amp;quot; as the two valid completions based on the input.  This makes list-based nountypes very useful for any command that can accept only a finite set of values.&lt;br /&gt;
&lt;br /&gt;
=== Writing a Noun Type Object ===&lt;br /&gt;
&lt;br /&gt;
Of course, not every type of noun you&#039;d be interested in can be represented&lt;br /&gt;
as a finite list or as a regexp.  If you want to be able to accept or reject input based on some algorithmic test, you can do so by writing a custom JavaScript object that implements a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method (and, optionally, a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; method.)&lt;br /&gt;
&lt;br /&gt;
There is an example of how to do this in the section on the tab commands, below.&lt;br /&gt;
&lt;br /&gt;
== Insert Email: the Contact noun type ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s take a look at one of the built-in noun-types: &amp;lt;code&amp;gt;noun_type_contact&amp;lt;/code&amp;gt;. This lets Ubiquity know to expect a person (either by name or email address). By using the noun-type, Ubiquity will also autocomplete to known people while the user is entering the command. This is what the built-in Ubiquity command &amp;quot;email&amp;quot; uses.&lt;br /&gt;
&lt;br /&gt;
At the moment, Ubiquity figures out what people you know through reading your Gmail contacts. In this prototyped version, you&#039;ll need to use Gmail and be logged in for for Ubiquity to know who you know. Eventually, we&#039;d like to be able to interface with all major web-mail sites, as well as desktop software like Thunderbird.&lt;br /&gt;
&lt;br /&gt;
Enough rambling. It&#039;s time for a command. I constantly find that I need to fetch someone&#039;s email address to paste into a text field because I don&#039;t know it off-hand. This command solves that by letting you insert someone&#039;s email address using autocomplete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert email&amp;quot;],&lt;br /&gt;
  arguments: {modifier: noun_type_contact},&lt;br /&gt;
  preview: &amp;quot;Inserts someone&#039;s email address by name.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    CmdUtils.setSelection( arguments.modifier.text );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To try this out, Ubiq &amp;quot;insert email for &amp;quot; and then the first few letters of someone you email often.&lt;br /&gt;
&lt;br /&gt;
=== Shorter Argument Declarations ===&lt;br /&gt;
&lt;br /&gt;
Notice that we used a shortcut for declaring the arguments.  In the long form, we would have had to say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;modifier&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;contact&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but if we don&#039;t care about specifying a label for the argument, we can get away with using a single object for &amp;quot;arguments&amp;quot;, with the roles as the property names, and the nountypes as the property values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we had several arguments, and none of them needed labels, we could say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {object: noun_arb_text, modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and so on.&lt;br /&gt;
&lt;br /&gt;
Aza writes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This one command sums up what I love about Ubiquity. In 8 lines of code, I can &lt;br /&gt;
fundamentally enhance the browser&#039;s functionality. Doing the same thing using &lt;br /&gt;
a normal Firefox extension methodology takes pages and pages of code&amp;amp;mdash;and  the interface would take more thought still. Doing the same thing using a bookmarklet would require a server-side component (to get around cross-site Ajax request ban) as well as forcing the user to give up their email password.&lt;br /&gt;
&lt;br /&gt;
Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TinyURL: Network Calls and jQuery (and the URL noun type)==&lt;br /&gt;
&lt;br /&gt;
Often while writing emails, I&#039;ll discover that I&#039;ve pasted in a URL long enough to be used for unfortunate analogies. I&#039;d like to be able to quickly turn that into a [http://en.wikipedia.org/wiki/Tinyurl TinyURL]&amp;amp;mdash;but the process of making a TinyURL involves lots of fiddly steps. Ubiquity to the rescue.&lt;br /&gt;
&lt;br /&gt;
Because we include [http://en.wikipedia.org/wiki/jQuery jQuery] with Ubiquity, it is simple to perform Ajax calls as well as parse returning data. TinyUrl.com provides an easy to use RESTful API where you pass a URL and it returns its shortened form. We use that API in this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;tinyurl&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_type_url,&lt;br /&gt;
               label: &amp;quot;url to shorten&amp;quot;}],&lt;br /&gt;
  preview: &amp;quot;Replaces the selected URL with a TinyUrl.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var baseUrl = &amp;quot;http://tinyurl.com/api-create.php&amp;quot;;&lt;br /&gt;
    var params = {url: arguments.object.text};&lt;br /&gt;
    jQuery.get( baseUrl, params, function( tinyUrl ) {&lt;br /&gt;
      CmdUtils.setSelection( tinyUrl );&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is a useful nountype because it defaults to the URL of the page that you are currently on.  If that is in fact the URL that the user wants, then they don&#039;t have to type it or even select it.&lt;br /&gt;
&lt;br /&gt;
jQuery is a powerful tool. With it, you can fairly effortlessly cherry-pick the data you need from RSS feeds, XML, and all sorts of other data formats. It also makes doing in-preview animations a breeze.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Twitter: Putting It All Together =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve now covered everything we need to cover in order to write a command that allows us to [http://en.wikipedia.org/wiki/Twitter Twitter] from Ubiquity.  The code below is the actual source code of the Twitter command as it appears in Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
Many thanks to [http://theunfocused.net/moz/ubiquity/verbs/ Blair McBride] for writing this command.  The source code is a bit more intricate than anything we&#039;ve seen so far, but it&#039;s built using exactly the same basic pieces -- and demonstrates nearly all of those pieces in action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const TWITTER_STATUS_MAXLEN = 140;&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;twitter&amp;quot;, &amp;quot;tweet&amp;quot;, &amp;quot;share using twitter&amp;quot;],&lt;br /&gt;
  arguments: [&lt;br /&gt;
    {role: &amp;quot;object&amp;quot;, label: &#039;status&#039;, nountype: noun_arb_text},&lt;br /&gt;
    {role: &amp;quot;alias&amp;quot;, nountype: noun_type_twitter_user}&lt;br /&gt;
  ],&lt;br /&gt;
  icon: &amp;quot;http://twitter.com/favicon.ico&amp;quot;,&lt;br /&gt;
  description:&lt;br /&gt;
  &amp;quot;Sets your Twitter status to a message of at most 160 characters.&amp;quot;,&lt;br /&gt;
  help: (&amp;quot;You&#039;ll need a &amp;lt;a href=\&amp;quot;http://twitter.com\&amp;quot;&amp;gt;Twitter account&amp;lt;/a&amp;gt;,&amp;quot; +&lt;br /&gt;
         &amp;quot; obviously.  If you&#039;re not already logged in&amp;quot; +&lt;br /&gt;
         &amp;quot; you&#039;ll be asked to log in.&amp;quot;),&lt;br /&gt;
  preview: function(previewBlock, args) {&lt;br /&gt;
    var statusText = (args.object ? args.object.text : &#039;&#039;);&lt;br /&gt;
    var usernameText = &amp;quot;&amp;quot;;&lt;br /&gt;
    if (args.alias) {&lt;br /&gt;
      usernameText = args.alias.text;&lt;br /&gt;
    } else if (args.as) {&lt;br /&gt;
      usernameText = args.as.text;&lt;br /&gt;
    }&lt;br /&gt;
    var previewTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;div class=&#039;twitter&#039;&amp;gt;&amp;quot;+_(&amp;quot;Updates your Twitter status ${username} to:&amp;quot;)+&amp;quot;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      &amp;quot;&amp;lt;b class=&#039;status&#039;&amp;gt;${status}&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      _(&amp;quot;Characters remaining: &amp;lt;b&amp;gt;${chars}&amp;lt;/b&amp;gt;&amp;quot;) +&lt;br /&gt;
      &amp;quot;&amp;lt;p&amp;gt;&amp;lt;small&amp;gt;&amp;quot;+_(&amp;quot;tip: tweet @mozillaubiquity for help&amp;quot;)+&amp;quot;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
    var truncateTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;strong&amp;gt;&amp;quot;+_(&amp;quot;The last &amp;lt;b&amp;gt;${truncate}&amp;lt;/b&amp;gt; characters will be truncated!&amp;quot;)+&amp;quot;&amp;lt;/strong&amp;gt;&amp;quot;);&lt;br /&gt;
    var previewData = {&lt;br /&gt;
      status: &amp;lt;&amp;gt;{statusText}&amp;lt;/&amp;gt;.toXMLString(),&lt;br /&gt;
      username: usernameText &amp;amp;&amp;amp; _(&amp;quot;(For user &amp;lt;b&amp;gt;${usernameText}&amp;lt;/b&amp;gt;)&amp;quot;),&lt;br /&gt;
      chars: TWITTER_STATUS_MAXLEN - statusText.length&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var previewHTML = CmdUtils.renderTemplate(&lt;br /&gt;
                        CmdUtils.renderTemplate(previewTemplate, previewData),&lt;br /&gt;
                        {usernameText:usernameText});&lt;br /&gt;
&lt;br /&gt;
    if (previewData.chars &amp;lt; 0) {&lt;br /&gt;
      var truncateData = {&lt;br /&gt;
        truncate: 0 - previewData.chars&lt;br /&gt;
      };&lt;br /&gt;
&lt;br /&gt;
      previewHTML += CmdUtils.renderTemplate(truncateTemplate, truncateData);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    previewBlock.innerHTML = previewHTML;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    var statusText = args.object.text;&lt;br /&gt;
    if(statusText.length &amp;lt; 1) {&lt;br /&gt;
      this._show(_(&amp;quot;requires a status to be entered&amp;quot;));&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var updateUrl = &amp;quot;https://twitter.com/statuses/update.json&amp;quot;;&lt;br /&gt;
    var updateParams = {&lt;br /&gt;
      source: &amp;quot;ubiquity&amp;quot;,&lt;br /&gt;
      status: statusText&lt;br /&gt;
      //dont cut the input since sometimes, the user selects a big url,&lt;br /&gt;
      //and the total lenght is more than 140, but tinyurl takes care of that&lt;br /&gt;
    };&lt;br /&gt;
    var me = this;&lt;br /&gt;
&lt;br /&gt;
    function sendMessage() {&lt;br /&gt;
      jQuery.ajax({&lt;br /&gt;
        type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
        url: updateUrl,&lt;br /&gt;
        data: updateParams,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        error: function() {&lt;br /&gt;
          me._show(_(&amp;quot;error - status not updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        success: function() {&lt;br /&gt;
          me._show(/^d /.test(statusText)&lt;br /&gt;
                   ? _(&amp;quot;direct message sent&amp;quot;)&lt;br /&gt;
                   : _(&amp;quot;status updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        username: login.username,&lt;br /&gt;
        password: login.password&lt;br /&gt;
      });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var login;&lt;br /&gt;
    var alias = args.alias;&lt;br /&gt;
    if (alias &amp;amp;&amp;amp; alias.text &amp;amp;&amp;amp; alias.data) {&lt;br /&gt;
      login = alias.data;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    } else {&lt;br /&gt;
      login = {username: null,&lt;br /&gt;
               password: null};&lt;br /&gt;
      if (alias &amp;amp;&amp;amp; alias.text)&lt;br /&gt;
        login.username = alias.text;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  _show: function(txt){&lt;br /&gt;
    displayMessage({icon: this.icon, title: this.name, text: txt});&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Switching Tabs =&lt;br /&gt;
&lt;br /&gt;
The final command in this tutorial is for switching between tabs. The end goal is this: type a few keys to that matches the title of an open tab (in any window), hit return, and you&#039;ve switched to that tab.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: Writing your own Noun-Types ===&lt;br /&gt;
&lt;br /&gt;
A noun-type needs to only have two things: A &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; function.  It can optionally also have a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
The label is what shows up when the command prompts for input. Suggest returns a list of input objects, each one containing the name of a matching tab. We&#039;re using [http://developer.mozilla.org/en/docs/FUEL FUEL] to interact with the browser, which is where the &amp;quot;Application&amp;quot; variable comes from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_tab = {&lt;br /&gt;
  label: &amp;quot;tab name&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
  // Returns all tabs from all windows.&lt;br /&gt;
  getTabs: function nt_tab_getTabs() {&lt;br /&gt;
    return [tab&lt;br /&gt;
            for each (win in Application.windows)&lt;br /&gt;
            for each (tab in win.tabs)];&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  suggest: function nt_tab_suggest(text, html, callback, selectionIndices) {&lt;br /&gt;
    var textLC = text.toLowerCase();&lt;br /&gt;
    return [CmdUtils.makeSugg(tab.document.title, null, tab)&lt;br /&gt;
            for each (tab in this.getTabs())&lt;br /&gt;
            if (~tab.document.title.toLowerCase().indexOf(textLC))];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The suggest method of a noun type always gets passed both text and html.  If the input is coming from a part of a web page that the user has selected, these&lt;br /&gt;
values can be different: they are both strings, but the html value contains markup tags while the text value does not. The Tab noun type only cares about the plain text of the tab name, so we ignore the value of html.&lt;br /&gt;
&lt;br /&gt;
The callback argument is for use by nountypes that need to run asynchronously, i.e. because they need to do network calls to generate suggestions.  The callback is a function; instead of returning a list of suggestions right away, an asynchronous noun type can call the callback with each suggestion it generates.  More on this later; the tab noun type generates all its suggestions right away, so it just returns them instead of using the callback.&lt;br /&gt;
&lt;br /&gt;
We use the convenience function &amp;lt;code&amp;gt;CmdUtils.makeSugg()&amp;lt;/code&amp;gt; to generate an&lt;br /&gt;
input object of the type that the Ubiquity parser expects.  The full signature of this function is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSugg(text, html, data, score, selectionIndices);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It requires at least one of &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; if you want to skip &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the text or html input is very long, &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; generates a summary for us, and puts it in the &amp;lt;code&amp;gt;summary&amp;lt;/code&amp;gt; attribute of the input object.&lt;br /&gt;
&lt;br /&gt;
We could have accomplished mostly the same thing without calling &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; by returning a list of anonymous objects like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ text: tabName,&lt;br /&gt;
  html: Utils.escapeHtml(tabName),&lt;br /&gt;
  data: tab,&lt;br /&gt;
  summary: Utils.escapeHtml(tabName) };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input objects that our &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method generates are the same objects that will eventually get passed in to the &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; methods of any commands that use this noun type.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: The Command ===&lt;br /&gt;
&lt;br /&gt;
Now that we are armed with the tab noun-type, it is easy to make the tab-switching command. Again, we use FUEL to focus the selected tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;switch tab&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_tab},&lt;br /&gt;
&lt;br /&gt;
  execute: function tab_execute(args) {&lt;br /&gt;
    // must be delayed because Ubiquity restores the focus on close&lt;br /&gt;
    Utils.setTimeout(function delayedFocus() {&lt;br /&gt;
      var tab = args.object.data;&lt;br /&gt;
      tab._window._window.focus();&lt;br /&gt;
      tab.focus();&lt;br /&gt;
    }, 99);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  preview: function tab_preview(pblock, args) {&lt;br /&gt;
    var tabName = args.object.text;&lt;br /&gt;
    if (tabName) {&lt;br /&gt;
      var msg = &amp;quot;Changes to &amp;lt;strong&amp;gt;${tab}&amp;lt;/strong&amp;gt; tab.&amp;quot;;&lt;br /&gt;
      pblock.innerHTML = _(msg, {tab: tabName});&lt;br /&gt;
    }&lt;br /&gt;
    else pblock.innerHTML = _(&amp;quot;Switch to a tab by name.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Development Hints =&lt;br /&gt;
&lt;br /&gt;
You now know all you need to know to get started developing useful Ubiquity commands of your own.&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous tips that didn&#039;t fit elsewhere on this page, that may make development easier for you.&lt;br /&gt;
&lt;br /&gt;
== The Source Code of Built-In Commands ==&lt;br /&gt;
&lt;br /&gt;
Looking at the source code of built-in commands and built-in noun types can be a very useful aid to development.  If you have the source checkout of Ubiquity (see [Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial | the development tutorial] to find out how to get this), the source code can be found in the files:&lt;br /&gt;
&lt;br /&gt;
 ubiquity/standard-feeds/&lt;br /&gt;
 ubiquity/builtin-feeds/builtincmds.js&lt;br /&gt;
 ubiquity/modules/nountypes.js&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a checkout of the source code, you can view the latest version on the web here:&lt;br /&gt;
&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/standard-feeds/ standard-feeds]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/builtin-feeds/builtincmds.js builtincmds.js]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/modules/nountypes.js nountypes.js]&lt;br /&gt;
&lt;br /&gt;
== Interacting with Other Extensions ==&lt;br /&gt;
&lt;br /&gt;
http://img363.imageshack.us/img363/1906/picture7cm5.png&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t much to say here besides that it&#039;s easy. For example, here&#039;s a command (thanks to [http://foyrek.com/lyrics.html Abimanyu Raja] for writing this code) that finds the lyrics for a song. You can simply Ubiq something like &amp;quot;get lyrics for wild international&amp;quot; but the command will also interface with the FoxyTunes extension (if it is installed) and add the currently playing song to the suggestion list. Interfacing with other extensions, too, is easy because you can view the source code for every Firefox extension.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_song = {&lt;br /&gt;
  label: &amp;quot;song name&amp;quot;,&lt;br /&gt;
  suggest: function nt_song_suggest(text) {&lt;br /&gt;
    var suggestions = [CmdUtils.makeSugg(text)];&lt;br /&gt;
    var win = Utils.currentChromeWindow;&lt;br /&gt;
    if (&amp;quot;foxytunesGetCurrentTrackTitle&amp;quot; in win)&lt;br /&gt;
      suggestions.push(CmdUtils.makeSugg(win.foxytunesGetCurrentTrackTitle()));&lt;br /&gt;
    return suggestions;&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;get lyrics&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_song},&lt;br /&gt;
  description: &amp;quot;Searches for lyrics of the song.&amp;quot;,&lt;br /&gt;
  preview: function gl_preview(pblock, {object: {text}}) {&lt;br /&gt;
    if (!text) {&lt;br /&gt;
      this.previewDefault(pblock);&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Searches for the lyrics of &amp;lt;b&amp;gt;${query}&amp;lt;/b&amp;gt;.&amp;quot;,&lt;br /&gt;
                         {query: Utils.escapeHtml(text)});&lt;br /&gt;
  },&lt;br /&gt;
  execute: function gl_execute(args) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      &amp;quot;http://www.google.com/search?q=&amp;quot; +&lt;br /&gt;
      encodeURIComponent(args.object.text + _(&amp;quot; lyrics&amp;quot;)));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing Asynchronous Noun Suggestions ==&lt;br /&gt;
&lt;br /&gt;
The noun types we&#039;ve seen so far in this tutorial have all worked synchronously, returning their suggestions right away. However, Ubiquity also supports asynchronous noun suggestions. These are useful for when a noun type needs to do some potentially time-consuming work before it can make suggestions &amp;amp;mdash; most commonly when it needs to call an external service.&lt;br /&gt;
&lt;br /&gt;
Implementing asynchronous suggestions is simple. Whenever the Ubiquity parser calls a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function, it includes a callback function that may be used to send suggestions back to the parser as they become available. In the most typical case, the noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function makes an AJAX request, invoking the parser&#039;s callback function from within the callback function for the AJAX request.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example: a noun type that suggests [http://www.freebase.com/ Freebase] topics based on the text the user has typed or selected, and a barebones &amp;lt;code&amp;gt;freebase-lookup&amp;lt;/code&amp;gt; command that uses the noun type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_freebase_topic = {&lt;br /&gt;
  name: &amp;quot;Freebase topic&amp;quot;,&lt;br /&gt;
  label: &amp;quot;topic&amp;quot;,&lt;br /&gt;
  suggest: function freebase_topic_suggest(text, html, callback) {&lt;br /&gt;
    return [&lt;br /&gt;
      CmdUtils.makeSugg(text),&lt;br /&gt;
      $.ajax({&lt;br /&gt;
        url: &amp;quot;http://www.freebase.com/api/service/search&amp;quot;,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        data: {prefix: text, limit: 5},&lt;br /&gt;
        success: function suggestTopics(response) {&lt;br /&gt;
          if (response.status === &amp;quot;200 OK&amp;quot;)&lt;br /&gt;
            callback([CmdUtils.makeSugg(result.name, result.name, result)&lt;br /&gt;
                      for each (result in response.result)]);&lt;br /&gt;
        },&lt;br /&gt;
      })];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;lookup on freebase&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_freebase_topic},&lt;br /&gt;
  preview: function preview(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _((&amp;quot;Go to the Freebase topic page for &amp;quot; +&lt;br /&gt;
                          &amp;quot;{if text}${text}{else}any topic{/if}.&amp;quot;),&lt;br /&gt;
                         args.object);&lt;br /&gt;
  },&lt;br /&gt;
  execute: function goToFreebase({object: {text, data}}) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      text&lt;br /&gt;
      ? (data&lt;br /&gt;
         ? &amp;quot;http://www.freebase.com/view&amp;quot; + data.id&lt;br /&gt;
         : (&amp;quot;http://www.freebase.com/search?query=&amp;quot; +&lt;br /&gt;
            encodeURIComponent(text)))&lt;br /&gt;
      : &amp;quot;http://www.freebase.com/&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few notes:&lt;br /&gt;
&lt;br /&gt;
* A noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function typically returns an empty array when it intends to make asynchronous suggestions, but it can return one or more suggestions synchronously if it has them available.&lt;br /&gt;
* Because the work being done to generate asynchronous suggestions is generally somewhat expensive, and because a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function may be called for every keystroke the user makes, you should probably consider implementing a delay before starting the work and/or caching the work at some level. Ubiquity currently leaves this up to each noun type individually.&lt;br /&gt;
* A much more robust implementation of Freebase-derived noun types can be found [http://graynorton.com/ubiquity/freebase-nouns.html here].&lt;br /&gt;
&lt;br /&gt;
== Running on page load, Ubiquity load and startup ==&lt;br /&gt;
&lt;br /&gt;
Commands aren&#039;t the only thing you can put in a command feed.  You can also include functions you want to be run automatically at page-load time and at Firefox startup time.&lt;br /&gt;
&lt;br /&gt;
In order to run some code on page load, you simply have to prefix your function with &amp;lt;code&amp;gt;pageLoad_&amp;lt;/code&amp;gt;. For example, if you want to say &amp;quot;Hi&amp;quot; every time a page is loaded, your code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pageLoad_hi() {&lt;br /&gt;
  displayMessage(&amp;quot;hi&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you modify the function and want to see the changes, remember to first invoke Ubiquity. Although your function like above, might not be a Ubiquity command, this is necessary to refresh the cached code.&lt;br /&gt;
&lt;br /&gt;
Similarly, functions prefixed by &amp;lt;code&amp;gt;ubiquityLoad_&amp;lt;/code&amp;gt; are called whenever Ubiquity is initialized for a main window of Firefox. This is useful when you want to interact with the Ubiquity interface itself, or run some code whenever a new window is opened.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function ubiquityLoad_googleAsDefaultEntry(gUbiquity, mainWindow) {&lt;br /&gt;
  gUbiquity.textBox.value = &amp;quot;google&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if you want to run some code everytime Firefox starts up, you just have to prefix the function with &amp;lt;code&amp;gt;startup_&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The awesome thing about these functions is the ability to develop whole Firefox extensions (that require minimal UI) as Ubiquity plugins in lesser lines of code. You don&#039;t need to worry about chrome.manifest or install.rdf. Another added benefit is that you never have to restart your Firefox during development unless of course, you are running code on Firefox startup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://img388.imageshack.us/img388/3086/picture5eo9.png&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code for [http://foyrek.com/keyscape.js Keyscape] which is a Ubiquity command that makes use of &amp;lt;code&amp;gt;pageLoad&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;startup&amp;lt;/code&amp;gt; to recreate the functionality of the [https://addons.mozilla.org/en-US/firefox/addon/339 Search Keys extension] by Jesse Ruderman. In line with Ubiquity&#039;s aim to let you do things quicker using your keyboard, this command lets you go to search results on Google by just pressing a number. It&#039;ll add hints to show the number of each link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//A lot of this code is borrowed from the Search Keys extension&lt;br /&gt;
//Many thanks to Jeese Ruderman&lt;br /&gt;
&lt;br /&gt;
function startup_keyscape() {&lt;br /&gt;
  window.addEventListener(&amp;quot;keydown&amp;quot;, keyscape_down, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function pageLoad_keyscape(doc){&lt;br /&gt;
&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
  //If we are on about: or chrome://, just return&lt;br /&gt;
  if(uri.scheme != &amp;quot;http&amp;quot;)&lt;br /&gt;
    return;&lt;br /&gt;
&lt;br /&gt;
  //Check if the page we are on is google&lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	      		    &lt;br /&gt;
    for(var num=1; num&amp;lt;=10; num++){&lt;br /&gt;
&lt;br /&gt;
      var link = jQuery(doc.body).find(&#039;a.l&#039;)[num-1];&lt;br /&gt;
      &lt;br /&gt;
      if( link ){&lt;br /&gt;
&lt;br /&gt;
        var hint = doc.createElementNS(&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;, &amp;quot;span&amp;quot;);&lt;br /&gt;
        hint.style.color = &amp;quot;blue&amp;quot;;&lt;br /&gt;
        hint.style.background = &amp;quot;white&amp;quot;;&lt;br /&gt;
        hint.style.padding = &amp;quot;1px 2px 1px 2px&amp;quot;;&lt;br /&gt;
        hint.style.marginLeft = &amp;quot;.5em&amp;quot;;&lt;br /&gt;
        hint.appendChild(doc.createTextNode(num == 10 ? 0 : num));&lt;br /&gt;
        link.parentNode.insertBefore(hint, link.nextSibling);&lt;br /&gt;
      }  		&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_isGoogle(uri){&lt;br /&gt;
  return uri.host.indexOf(&amp;quot;google&amp;quot;) != -1 &lt;br /&gt;
	 &amp;amp;&amp;amp; (uri.path.substr(0,8) == &amp;quot;/search?&amp;quot; &lt;br /&gt;
         || uri.path.substr(0,8) == &amp;quot;/custom?&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_down(event){&lt;br /&gt;
&lt;br /&gt;
  var doc =  Application.activeWindow.activeTab.document;	&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
 &lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	&lt;br /&gt;
   var key = parseInt(event.keyCode || event.charCode);	&lt;br /&gt;
   var num;&lt;br /&gt;
	&lt;br /&gt;
   if(48 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 57) //number keys&lt;br /&gt;
     num = key - 48;&lt;br /&gt;
   else if(96 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 105) //numeric keypad with numlock on&lt;br /&gt;
     num = key - 96;&lt;br /&gt;
   else&lt;br /&gt;
     return;&lt;br /&gt;
&lt;br /&gt;
   //Don&#039;t do anything if we are in a textbox&lt;br /&gt;
   //or some other related elements&lt;br /&gt;
   var elt = window.document.commandDispatcher.focusedElement;&lt;br /&gt;
   &lt;br /&gt;
   if (elt) {&lt;br /&gt;
     var ln = new String(elt.localName).toLowerCase();&lt;br /&gt;
     if (ln == &amp;quot;input&amp;quot; || ln == &amp;quot;textarea&amp;quot; || ln == &amp;quot;select&amp;quot; || ln == &amp;quot;isindex&amp;quot;)&lt;br /&gt;
        return;&lt;br /&gt;
   }&lt;br /&gt;
    &lt;br /&gt;
   //Get the link url from the search results page&lt;br /&gt;
   var url_dest = jQuery(doc.body).find(&#039;a.l&#039;).eq(num-1).attr(&#039;href&#039;);&lt;br /&gt;
   &lt;br /&gt;
   if(event.altKey){&lt;br /&gt;
     //Open in new tab&lt;br /&gt;
     Application.activeWindow.open(Utils.url(url_dest));&lt;br /&gt;
   }else{&lt;br /&gt;
     //Open in same tab&lt;br /&gt;
     doc.location.href = url_dest;&lt;br /&gt;
   }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Ubiquity does indeed become ubiquitous, a lot of extensions can be re-written as Ubiquity commands. This is much nicer for the end-user, as well, because the Ubiquity command installation process is a lot easier.&lt;br /&gt;
&lt;br /&gt;
In the future, Ubiquity is also likely to have the ability to convert your Ubiquity commands into proper Firefox extensions. Look [http://labs.toolness.com/trac/ticket/3 here] to check on the progress of this functionality.&lt;br /&gt;
&lt;br /&gt;
== Persistent Storage ==&lt;br /&gt;
Some commands may want to store data that persist even after closing Firefox. &lt;br /&gt;
Meet &amp;lt;code&amp;gt;Bin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var gId = 42; // used for avoiding needless preview updates when typing&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;memo&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Lets you jot a memo for the page.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  argument: noun_arb_text,&lt;br /&gt;
  execute: function memo_execute({object: {html}}) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]() || [];&lt;br /&gt;
    list.push(html);&lt;br /&gt;
    Bin[href](list);&lt;br /&gt;
    gId = +new Date;&lt;br /&gt;
  },&lt;br /&gt;
  preview: function memo_preview(pb) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]();&lt;br /&gt;
    if (!list) {&lt;br /&gt;
      pb.innerHTML =&lt;br /&gt;
        &amp;lt;&amp;gt;No memos taken for: &amp;lt;small&amp;gt;&amp;lt;code&amp;gt;{href}&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/&amp;gt;;&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    if (pb.ownerDocument.getElementById(gId)) return;&lt;br /&gt;
    var ol = CmdUtils.previewList(pb, list, function deleteMemo(i, ev) {&lt;br /&gt;
      $(ev.target).closest(&amp;quot;li&amp;quot;).slideUp();&lt;br /&gt;
      list.splice(i, 1);&lt;br /&gt;
      Bin[href](list.length ? list : null);&lt;br /&gt;
      gId = +new Date;&lt;br /&gt;
    });&lt;br /&gt;
    ol.id = gId;&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;list memos&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Opens all memos you&#039;ve taken in a new tab.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  execute: function list_memos_execute() {&lt;br /&gt;
    var htm = +Bin + &amp;quot; page(s)&amp;lt;dl&amp;gt;&amp;quot;, {escapeHtml} = Utils;&lt;br /&gt;
    for (var [url, memos] in Bin) {&lt;br /&gt;
      htm += &amp;quot;&amp;lt;dt&amp;gt;&amp;quot; + escapeHtml(url) + &amp;quot;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;ol&amp;gt;&amp;quot;;&lt;br /&gt;
      for each (var memo in memos) htm += &amp;quot;&amp;lt;li&amp;gt;&amp;quot; + memo + &amp;quot;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
      htm += &amp;quot;&amp;lt;/ol&amp;gt;&amp;lt;/dd&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    Utils.openUrlInBrowser(&amp;quot;data:text/html,&amp;quot; + encodeURI(htm + &amp;quot;&amp;lt;/dl&amp;gt;&amp;quot;));&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details, see the bottom of [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/feedmanager.js FeedManager] documentation.&lt;br /&gt;
&lt;br /&gt;
== Firebug ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity automatically enables Chrome Errors and Warnings on startup so that errors in your code appear in the Firebug console. Just use &amp;lt;tt&amp;gt;CmdUtils.log()&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;console.log()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Where To Go From Here =&lt;br /&gt;
&lt;br /&gt;
Take a look at Ubiquity&#039;s reference documentation for the &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils]&amp;lt;/tt&amp;gt; namespaces.&lt;br /&gt;
&lt;br /&gt;
If you have any questions or comments, feel free to join us on IRC at &amp;lt;tt&amp;gt;#ubiquity&amp;lt;/tt&amp;gt; on &amp;lt;tt&amp;gt;irc.mozilla.org&amp;lt;/tt&amp;gt;, as well as the [http://groups.google.com/group/ubiquity-firefox Ubiquity Google Group].&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
To reiterate a point I made before: Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web. You are one of those agents.&lt;br /&gt;
&lt;br /&gt;
Now, go forth and create.&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=165208</id>
		<title>Labs/Ubiquity/Ubiquity 0.5 Author Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial&amp;diff=165208"/>
		<updated>2009-08-30T03:50:02Z</updated>

		<summary type="html">&lt;p&gt;Satyr: sample code for Bin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Labs/Ubiquity]].&lt;br /&gt;
&lt;br /&gt;
Author: Aza Raskin, Blair McBride, Abimanyu Raja, Jono DiCarlo, Atul Varma&lt;br /&gt;
&lt;br /&gt;
= The Ubiquity version 0.5 Command Tutorial =&lt;br /&gt;
&lt;br /&gt;
The great power of Ubiquity&amp;amp;mdash;from a developer standpoint&amp;amp;mdash;is how easy it is to create commands. With only a couple of lines of Javascript, Ubiquity enables even casual web developers to drastically enhance the features of the browser. From an 8-line command to insert a contact&#039;s email address in any text field, to a 50-line Twitter integration, this tutorial walks you through the process of being generative with Ubiquity.&lt;br /&gt;
&lt;br /&gt;
The rest of this page documents the command developer API as it stands frozen in version 0.5.&lt;br /&gt;
&lt;br /&gt;
If you want the bleeding-edge command developer API (which includes any new features that may have been added to the Ubiquity source code in HG but not yet included in a release), then that&#039;s [[Labs/Ubiquity/Ubiquity_Source_Tip_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
If you want the old command developer API, as it stood in Ubiquity 0.1 (not recommended), that&#039;s [[Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial|here]].&lt;br /&gt;
&lt;br /&gt;
== Real Time Development ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity doesn&#039;t require you to restart Firefox as you develop. Restarting is a drastic measure, and we want none of it. Instead, Ubiquity reloads the commands every time it is summoned. When you are using the built-in editor then you don&#039;t even need to save!&lt;br /&gt;
&lt;br /&gt;
To open the Ubiquity command editor, summon Ubiquity (control/alt + space) and use the &amp;quot;open command editor&amp;quot; command. Throughout this tutorial, when we want you to run a command in Ubiquity, we&#039;ll say &#039;&#039;&#039;Ubiq&#039;&#039;&#039; it. For instance, to open the editor, just Ubiq &amp;quot;open command editor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the following examples, just type in this editor. Updates happen the next time you summon Ubiquity.&lt;br /&gt;
&lt;br /&gt;
== Choices, Choices... ==&lt;br /&gt;
&lt;br /&gt;
You may notice a drop-down menu mentioning something about a &amp;quot;feed type&amp;quot; just above the editing field in the command editor:&lt;br /&gt;
&lt;br /&gt;
http://www.toolness.com/images/20090318121423.jpg&lt;br /&gt;
&lt;br /&gt;
For now, just make sure this drop-down is set to &amp;quot;Regular&amp;quot;.  We&#039;ll tell you more about what this means later.&lt;br /&gt;
&lt;br /&gt;
== Hello World: The First Command ==&lt;br /&gt;
&lt;br /&gt;
=== Just a Message: As Simple as it Gets ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start with the standard programing trope: printing &amp;quot;Hello, World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the command editor type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(&amp;quot;Hello, World!&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try Ubiq-ing &amp;quot;say hello&amp;quot;. You&#039;ll see that &amp;quot;Hello, World!&amp;quot; is immediately displayed on the screen. If you are on Mac OSX with [http://en.wikipedia.org/wiki/Growl_(software) Growl] installed the message will appear as a Growl notification. If you are on Windows, then it will appears as a standard &amp;quot;toaster&amp;quot; notification in the bottom right-hand corner of the screen.&lt;br /&gt;
&lt;br /&gt;
http://farm3.static.flickr.com/2479/3651542339_022e4aa4c4.jpg&lt;br /&gt;
&lt;br /&gt;
http://img517.imageshack.us/img517/7726/picture2vx2.png&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 8.04 (Hardy Heron) this appears thus:&lt;br /&gt;
&lt;br /&gt;
http://img293.imageshack.us/img293/7746/ubiqubuntuhelloworldeq9.png&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have Growl installed on OSX, or aren&#039;t on a Windows XP/Vista or Ubuntu Hardy, then you won&#039;t get any sort of notification. That&#039;s something to be [http://labs.toolness.com/trac/ticket/19 worked on] in future releases of Ubiquity.&lt;br /&gt;
&lt;br /&gt;
=== CmdUtils.CreateCommand ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; is a namespace which contains all the functions you need to create commands.  Commands are created by making an object and passing it to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.  In Javascript, inline curly braces mean &amp;quot;new object&amp;quot;, so this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;],&lt;br /&gt;
  execute: function () { //etc }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
means &amp;quot;Make an object with two attributes, &#039;names&#039; and &#039;execute&#039;.&amp;quot;  This object is then passed as the argument to &amp;lt;code&amp;gt;CmdUtils.CreateCommand&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== names ===&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; and &#039;execute&#039; are the only two mandatory attributes for your command object.  &#039;names&#039; specifies what the command is called, and &#039;execute&#039; specifies what it does.  There are plenty of other attributes that you can specify, but they are all optional.&lt;br /&gt;
&lt;br /&gt;
&#039;names&#039; is always an array (thus the square brackets).  In the case of this command we provided only one name, &amp;quot;hello world&amp;quot;.  But we could have provided as many names as we wanted.  For instance, if we had said:&lt;br /&gt;
&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
then &amp;quot;say hello&amp;quot; would be the normal name of the command, but Ubiquity would also recognize &amp;quot;greet&amp;quot; as a synonym or alias for the command.&lt;br /&gt;
&lt;br /&gt;
=== execute ===&lt;br /&gt;
&lt;br /&gt;
&#039;execute&#039; is always a function.  When the user executes your command, this is the function that will be run.  It can do pretty much anything you want -- or at least, anything you know how to write in JavaScript.&lt;br /&gt;
&lt;br /&gt;
In the example above, we simply call &amp;lt;code&amp;gt;displayMessage()&amp;lt;/code&amp;gt;, which displays the given message in whichever way the operating system can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a number of other useful functions in the &amp;lt;code&amp;gt;CmdUtils&amp;lt;/code&amp;gt; namespace. We don&#039;t yet have full documentation for these commands, but you&#039;ll get a sense of the useful ones in this tutorial. For more detailed information, take a look at [http://hg.toolness.com/ubiquity-firefox/file/9a6c9935da9f/ubiquity/chrome/content/cmdutils.js cmdutils.js].&lt;br /&gt;
&lt;br /&gt;
=== Making sure your command is localizable ===&lt;br /&gt;
&lt;br /&gt;
Ubiquity now supports multiple languages.  That means that hopefully someday someone will be translating your commands to the other languages that Ubiquity supports.  Making your command localizable is easy, and a good habit to get into!  You just have to locate all strings that appear in your &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; methods, that are intended for display to humans, and wrap them with:&lt;br /&gt;
&lt;br /&gt;
 _()&lt;br /&gt;
&lt;br /&gt;
This may look odd, but what it does is quite important: it makes your strings appear in the template files that localizers will be using.  So let&#039;s make our &amp;quot;Hello world!&amp;quot; command localizable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes it so that when a localization template is generated from your command feed, &amp;quot;Hello, World!&amp;quot; will be listed among the strings to be translated.&lt;br /&gt;
&lt;br /&gt;
Note that we don&#039;t need to wrap the names, or other strings that appear in the command metadata -- these are automatically wrapped for us.  We only need to wrap strings that appear inside the functions.&lt;br /&gt;
&lt;br /&gt;
=== Adding a Preview ===&lt;br /&gt;
&lt;br /&gt;
http://img352.imageshack.us/img352/1002/picture3ex0.png&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a preview to our new command. Previews give the user feedback about what a command does before it&#039;s executed. Previews are great for providing rich visual feedback like displaying a graphical representation of atmospheric conditions when using the weather command as shown above. Previews have the full expressive power of HTML, including animations, so there&#039;s a lot you can do with them.&lt;br /&gt;
&lt;br /&gt;
One point of design: Preview code should never have side-effects. That is, a preview should never (without user interaction) change the state of the system.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;say hello&amp;quot; command, we don&#039;t need anything fancy: just some help text that is more descriptive than the default &amp;quot;Executes the say hello command.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;say hello&amp;quot;, &amp;quot;greet&amp;quot;],&lt;br /&gt;
  preview: &amp;quot;Displays a &amp;lt;i&amp;gt;salutary&amp;lt;/i&amp;gt; greeting to the planet.&amp;quot;,&lt;br /&gt;
  execute: function hello_execute() {&lt;br /&gt;
    displayMessage(_(&amp;quot;Hello, World!&amp;quot;));&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the preview is an HTML-formatted string. The preview can also be a function. We&#039;ll get to that in the next section.&lt;br /&gt;
&lt;br /&gt;
== The Date Command: The Second Command ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the Selection ===&lt;br /&gt;
&lt;br /&gt;
I often forget what day it is. That may be because I need to go outside more often, but, like any programmer, I generally solve my problem&#039;s symptoms with technology rather then addressing the root cause. My solution is to create a command that inserts the date at the location of the cursor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(new Date().toLocaleDateString());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new function here is &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt;. This inserts the passed-in text onto the page at the location of the cursor. If the cursor is in an editable text or rich-text fields, the text gets dumped there. If the cursor isn&#039;t in an editable area, &amp;lt;code&amp;gt;setSelection()&amp;lt;/code&amp;gt; will still be able to insert the date. (Even when it isn&#039;t displayed, Firefox always keeps track of a cursor position. To see it, type F7.) Try going to a page, selecting some non-mutable text, and using the command. See, it works! This is particularly useful for commands like &amp;quot;translate&amp;quot;, where you want to replace non-editable text with its translation.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;toLocaleDateString()&amp;lt;/code&amp;gt; function is native to Javascript, so if you&#039;re not familiar with it check out the documentation for the Javascript [https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date Date object].&lt;br /&gt;
&lt;br /&gt;
=== A Better Preview ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s time to add a better preview to the date command. Let&#039;s have the preview show the date, so that the user will know what to expect when they execute the command. (As a side benefit the user doesn&#039;t even need to execute the command to do a quick check of the day.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _date: function date__date() {&lt;br /&gt;
    return new Date().toLocaleDateString();&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = _(&#039;Inserts today\&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;);&lt;br /&gt;
    pblock.innerHTML = CmdUtils.renderTemplate(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function date_execute() {&lt;br /&gt;
    CmdUtils.setSelection(this._date());&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We&#039;ve done three things here. The first was to factor out the code for getting the date into the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt; function. This way we don&#039;t break [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY] by repeating code across the preview and execute functions. Notice that to access the &amp;lt;code&amp;gt;_date()&amp;lt;/code&amp;gt;, we use the &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
The second thing we&#039;ve done is to add a preview function. The first argument is the DOM element that gets displayed as the preview for your command. Modify &amp;lt;code&amp;gt;pblock&amp;lt;/code&amp;gt; and you modify the preview. In this case, we set the &amp;lt;code&amp;gt;innerHTML&amp;lt;/code&amp;gt; of the preview block to be the message we want.&lt;br /&gt;
&lt;br /&gt;
The third thing we&#039;ve done is to do some string formatting using the &amp;lt;code&amp;gt;renderTemplate()&amp;lt;/code&amp;gt; function. This takes a template string and performs the appropriate substitution given the passed-in JSON object. Templates can handle a wide range of functionality, as we are currently using TrimPath&#039;s [http://code.google.com/p/trimpath/wiki/JavaScriptTemplates JavascriptTemplates]. You should read their site for more documentation. Although JavascriptTemplates has some nice properties, we are contemplating moving to [http://mjtemplate.org/ MJT] sometime soon.&lt;br /&gt;
&lt;br /&gt;
=== A shortcut for localization and rendering templates ===&lt;br /&gt;
&lt;br /&gt;
Note how in the code above, we used the localization wrapper &amp;lt;code&amp;gt;_()&amp;lt;/code&amp;gt; before passing the string to renderTemplate.  Because this is such a very common combination when displaying strings, we have a shortcut for it.  Calling _() with a JSON object as the second argument will automatically trigger &amp;lt;code&amp;gt;CmdUtils.renderTemplate()&amp;lt;/code&amp;gt; on the post-localization string.  So the above preview method could be rewritten more simply as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function date_preview(pblock) {&lt;br /&gt;
    var msg = &#039;Inserts today&#039;s date: &amp;quot;&amp;lt;i&amp;gt;${date}&amp;lt;/i&amp;gt;&amp;quot;&#039;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {date: this._date()});&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Networking calls and placeholder previews ===&lt;br /&gt;
&lt;br /&gt;
Previews display something meaningful to the user immediately. If you have a preview that requires an AJAX request&amp;amp;mdash;say, to fetch some search results&amp;amp;mdash;that call might take a while to return. In the meantime, your command should display a placeholder preview giving the user feedback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  preview: function(pblock) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;This will show until the AJAX request returns&amp;quot;);&lt;br /&gt;
    CmdUtils.previewGet(pblock, &amp;quot;http://example.com&amp;quot;, function (htm) {&lt;br /&gt;
      pblock.innerHTML = htm;&lt;br /&gt;
    });&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documentation and Metadata ==&lt;br /&gt;
&lt;br /&gt;
Before you share your command with the world, you should consider adding some attributions to the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you should &amp;lt;em&amp;gt;definitely&amp;lt;/em&amp;gt; add some documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert date&amp;quot;],&lt;br /&gt;
  homepage: &amp;quot;http://azarask.in/&amp;quot;,&lt;br /&gt;
  author: { name: &amp;quot;Aza Raskin&amp;quot;, email: &amp;quot;aza@mozilla.com&amp;quot;},&lt;br /&gt;
  contributors: [&amp;quot;Atul Varma&amp;quot;],&lt;br /&gt;
  license: &amp;quot;MPL&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Inserts today&#039;s date.&amp;quot;,&lt;br /&gt;
  help: &amp;quot;If you&#039;re in an editable text area, inserts today&#039;s date, formatted for the current locale.&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  /* THE REST OF THE CODE HERE */&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;.description&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.help&amp;lt;/code&amp;gt; attributes are both automatically displayed alongside your command&#039;s name on the command-list page.  (The user can get to this page at any time by issuing the &amp;quot;list ubiquity commands&amp;quot; command.)  HTML tags can be used in both of these strings.&lt;br /&gt;
&lt;br /&gt;
Description is a one-line summary of what the command does, while Help is a longer description that can include examples, caveats, and so on. If your command is simple enough that all you have to say about it fits in one line, it&#039;s OK to use a description alone and leave out the help.&lt;br /&gt;
&lt;br /&gt;
== Sharing it with the World ==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve got our awesome new &amp;quot;date&amp;quot; command, let&#039;s share it with the world. All you have to do is put the javascript file on the web somewhere, and make an html page linking to it with &amp;quot;link rel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;&amp;lt;link rel=&amp;quot;commands&amp;quot; href=&amp;quot;http://path-to-js&amp;quot; name=&amp;quot;Title Goes Here&amp;quot; /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anyone with Ubiquity who visits will get a message offering them the choice of subscribing to your command.&lt;br /&gt;
&lt;br /&gt;
[[Image:Subscribe.png]]&lt;br /&gt;
&lt;br /&gt;
If the user chooses to subscribe to a Regular command feed from an untrusted source, they will get a security warning message before they can install the command.  Because Regular Ubiquity command feeds can execute arbitrary javascript with chrome privileges, subscribing to a command from a website means allowing that site full access to do whatever it wants to your browser.  We want to make sure people understand the dangers before subscribing to commands, so we made the warning page pretty scary.&lt;br /&gt;
&lt;br /&gt;
[[Image:Warning.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== Feed Types ===&lt;br /&gt;
&lt;br /&gt;
Recall that back near the beginning of the tutorial, you set the &amp;quot;feed type&amp;quot; to &amp;quot;Regular&amp;quot;.  As you may have guessed, there&#039;s actually more than one way to write a command feed.  The advantage of Regular feeds is that they let you do whatever you want, so it&#039;s really easy to innovate, but the disadvantages lie in subscribing to misbehaving or malicious code.  You can alternatively write what&#039;s called a &#039;&#039;Locked-Down Feed&#039;&#039;, which is much safer and doesn&#039;t raise a warning page when a user subscribes to it&amp;amp;mdash;but the consequences are that you have less freedom of implementation as a command author.  If you&#039;re interested in learning more about Locked-Down Feeds, check out the [[Labs/Ubiquity/Locked-Down_Feed_Tutorial|Locked-Down Feed Tutorial]].&lt;br /&gt;
&lt;br /&gt;
=== Trust Networks ===&lt;br /&gt;
&lt;br /&gt;
In the future, we&#039;re going to have something set up that we call a &amp;quot;[[Labs/Ubiquity/TrustNetwork|trust network]]&amp;quot;.  When you try out a Ubiquity command from a website, and determine that the command is safe (or unsafe), you&#039;ll be able to leave an approval (or a warning).  When your friends with Ubiquity installed visit the same site, they&#039;ll see the approval or the warning that you left.  In this way, users will be able to rely on the judgement of other people they already know and trust in order to help them make decisions about whether a command is safe to install or not.&lt;br /&gt;
&lt;br /&gt;
By the way, the reason we call it &amp;quot;subscribing&amp;quot; to a command, rather than &amp;quot;installing&amp;quot; a command, is that if the javascript file changes -- if the site owner adds new commands, removes old commands, or updates existing commands -- all users subscribed to that URL will automatically get the updates.  This will be very convenient for both users and developers, but it will also introduce another type of security risk: just because you decided a command was safe at one point in time doesn&#039;t mean that the command will always remain safe.  For this reason, we&#039;ll need to make sure that the trust network keeps track of when commands have been modified, and notifies users of changes that may make a command unsafe.&lt;br /&gt;
&lt;br /&gt;
== Map Me! Location, Snapshots, and Inserting HTML ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;map&amp;quot; command that comes with Ubiquity is fairly powerful. It&#039;s also fairly complicated&amp;amp;mdash;well, comparatively. It&#039;s still only a couple hundred lines of code. The command, though, can get even more useful. Imagine being able to select some houses on Craigslist, or a list of restaurant names, and Ubiq &amp;quot;map these&amp;quot; to get just the map you want. The concept of &amp;quot;these&amp;quot; puts the power of mashups into the users hands. But I digress. Let&#039;s make a simple command that inserts a map of your current location.&lt;br /&gt;
&lt;br /&gt;
In this command, we use the Google [http://code.google.com/apis/maps/documentation/staticmaps/ static map API] and the Ubiquity function &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; to insert a map of your current location. Ubiquity currently uses the [http://www.maxmind.com/app/api MaxMind] API for trying to guess your location from your IP. That will probably change in the future.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll call this command &amp;lt;code&amp;gt;&amp;quot;map me&amp;quot;&amp;lt;/code&amp;gt; so that it won&#039;t be confused with the standard &amp;lt;code&amp;gt;&amp;quot;map&amp;quot;&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;map me&amp;quot;],&lt;br /&gt;
  &lt;br /&gt;
  _getMapUrl: function() {&lt;br /&gt;
    var loc = CmdUtils.getGeoLocation();&lt;br /&gt;
    var mapUrl = &amp;quot;http://maps.google.com/staticmap?&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    var params = {&lt;br /&gt;
      center: loc.lat + &amp;quot;,&amp;quot; + loc.long,&lt;br /&gt;
      size: &amp;quot;500x400&amp;quot;,&lt;br /&gt;
      zoom: 14,&lt;br /&gt;
      key: &amp;quot;ABQIAAAAGZ11mh1LzgQ8-8LRW3wEShQeSuJunOpTb3RsLsk00-MAdzxmXhQoiCd940lo0KlfQM5PeNYEPLW-3w&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    return mapUrl + jQuery.param( params );&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  preview: function( pblock ) {&lt;br /&gt;
    var msg = &amp;quot;Inserts a map of your current location: &amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
              &amp;quot;&amp;lt;img src=&#039;${url}&#039;/&amp;gt;&amp;quot;;&lt;br /&gt;
    pblock.innerHTML = _(msg, {url: this._getMapUrl()});&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  execute: function( ) {&lt;br /&gt;
    CmdUtils.getImageSnapshot( this._getMapUrl(), function(imgData) {&lt;br /&gt;
      CmdUtils.setSelection( &amp;quot;&amp;lt;img src=&#039;&amp;quot; + imgData +&amp;quot;&#039;/&amp;gt;&amp;quot;);&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three new things here: &amp;lt;code&amp;gt;CmdUtils.setSelection&amp;lt;/code&amp;gt; to set HTML (yep, it can do that); the use of &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt;; and using &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt; to capture the bits for the image.&lt;br /&gt;
&lt;br /&gt;
I find getting the location&amp;amp;mdash;as imprecise as IP-based location can be&amp;amp;mdash;useful for doing sensible defaults for location-based commands, like Yelp. &amp;lt;code&amp;gt;CmdUtils.getGeoLocation()&amp;lt;/code&amp;gt; returns an object which has the following properties: city, state, country, lat, and long.&lt;br /&gt;
&lt;br /&gt;
Why do we need to use &amp;lt;code&amp;gt;CmdUtils.snapshotImage()&amp;lt;/code&amp;gt;? Because the Google Maps API requires a key that is tied to a particular URL. If we naively inject the image tag into a random web page, the image won&#039;t load because the key doesn&#039;t match that random web page&#039;s URL. Thus, we use the &amp;lt;code&amp;gt;snapshotImage()&amp;lt;/code&amp;gt; function to convert the image into a [http://en.wikipedia.org/wiki/Data:_URI_scheme data url].&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a &amp;lt;code&amp;gt;CmdUtils.snapshotWindow&amp;lt;/code&amp;gt; function, which allows you to get the image data for any tab/window. The function takes a window as the first paramater, and a callback for the second.&lt;br /&gt;
&lt;br /&gt;
= Commands with Arguments =&lt;br /&gt;
&lt;br /&gt;
== Echo ==&lt;br /&gt;
&lt;br /&gt;
We&#039;ll be working towards making some fun and useful commands&amp;amp;mdash;commands that let you control the seething tendrils of the internet with your little pinky. But, let&#039;s start by making a simple command to echo back whatever you type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;echo&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;your shout&amp;quot;}],&lt;br /&gt;
  preview: function( pblock, arguments ) {&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Will echo: &amp;quot;) + arguments.object.text;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var msg = arguments.object.text + &amp;quot;... &amp;quot; + arguments.object.text + &amp;quot;......&amp;quot;;&lt;br /&gt;
    displayMessage( msg );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says that the command &amp;quot;echo&amp;quot; takes one argument which is arbitrary text. Whatever text the user enters will get wrapped in an input object and passed into both the preview and execute function.&lt;br /&gt;
&lt;br /&gt;
Try it!  Ubiq &amp;quot;echo hellooooo&amp;quot; and watch what happens.&lt;br /&gt;
&lt;br /&gt;
Ubiquity takes care of parsing the user&#039;s input, so you don&#039;t need to worry about handling prounoun substitution or any of the other natural-language-like features of the Ubiquity parser. Try selecting some text on a page, and Ubiq &amp;quot;echo this&amp;quot;. Ubiquity should now echo the selected text.  &lt;br /&gt;
&lt;br /&gt;
Note that we gave three pieces of information when defining our argument:  its role, its nountype, and its label.  The label is the easiest part: It&#039;s just whatever text you want to have appear in the Ubiquity interface as a prompt for the user.  E.g, if you ubiq &amp;quot;echo&amp;quot;, you will see the label for the argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  echo (your shout)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The roles and the nountypes require some more explanation.  We&#039;ll cover each of them in detail next.&lt;br /&gt;
&lt;br /&gt;
=== Argument Roles ===&lt;br /&gt;
&lt;br /&gt;
Your command can take multiple arguments.  Each one is identified by a &amp;quot;role&amp;quot;.  To understand roles, it helps to think of your command name as a verb, and each argument as a noun.  Remember that Ubiquity&#039;s command line is a pseudo-natural-language environment, so it attempts to be as close to natural language grammar as possible.&lt;br /&gt;
&lt;br /&gt;
For example, if you&#039;ve ever used the &amp;lt;code&amp;gt;email&amp;lt;/code&amp;gt; command, you know that it takes up to two arguments: a message and a person.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  email message&lt;br /&gt;
  email to person&lt;br /&gt;
  email message to person&lt;br /&gt;
  email to person message&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In grammatical terms, the message argument is the &amp;quot;direct object&amp;quot; of the verb &amp;quot;email&amp;quot;.  The person argument is an indirect object.  We call it the &amp;quot;goal&amp;quot; of the verb.  So if we were writing the email command, we&#039;d define the arguments like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_arb_text,&lt;br /&gt;
               label: &amp;quot;message&amp;quot;},&lt;br /&gt;
              {role: &amp;quot;goal&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;recipient&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because we give the recipient argument the &amp;quot;goal&amp;quot; role, the Ubiquity parser knows to expect the user to type the word &amp;quot;to&amp;quot;.  When the user enters &amp;quot;email hello to Aza&amp;quot;, the parser knows that the word following &amp;quot;to&amp;quot; -- that is, &amp;quot;Aza&amp;quot; -- should be assigned to the recipient argument.&lt;br /&gt;
&lt;br /&gt;
In our simple &amp;quot;echo&amp;quot; command, we expect the user to type &amp;quot;echo hellooooo&amp;quot; or something like that.  The &amp;quot;hellooooo&amp;quot; is the direct object of the verb &amp;quot;echo&amp;quot;, so we give it the &amp;quot;object&amp;quot; role.  &lt;br /&gt;
&lt;br /&gt;
&amp;quot;Object&amp;quot; is the most common role.  If a command takes only one argument, that argument is usually an &amp;quot;object&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== What Roles Can I Use? ====&lt;br /&gt;
&lt;br /&gt;
* object   (in &amp;quot;echo helloooo&amp;quot;, hello is the object.)&lt;br /&gt;
* goal    (in &amp;quot;email this to brandon&amp;quot;, brandon is the goal.)&lt;br /&gt;
* source   (in &amp;quot;translate this from spanish&amp;quot;, spanish is the source.)&lt;br /&gt;
* location    (in &amp;quot;yelp pizza near boston&amp;quot;, boston is the location.)&lt;br /&gt;
* time    (in &amp;quot;book a flight on thursday&amp;quot;, thursday is the time.)&lt;br /&gt;
* instrument  (in &amp;quot;search monkeys with google&amp;quot;, google is the instrument.)&lt;br /&gt;
* format   (in &amp;quot;check weather in celsius&amp;quot;, celsius is the format.)&lt;br /&gt;
* modifier  (in &amp;quot;get email address for chris&amp;quot;, chris is the modifier.)&lt;br /&gt;
* alias   (in &amp;quot;twitter this as jono&amp;quot;, jono is the alias.)&lt;br /&gt;
&lt;br /&gt;
[https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles More information about these roles].&lt;br /&gt;
&lt;br /&gt;
=== The Arguments Object ===&lt;br /&gt;
&lt;br /&gt;
When your execute method is called, it is passed a single object that encapsulates the values for all arguments.&lt;br /&gt;
&lt;br /&gt;
When your preview method is called, it is passed this object, too.&lt;br /&gt;
&lt;br /&gt;
The object has one attribute corresponding to each role.  In our example above, the command accepts only an object-role argument, so the preview and execute methods get passed an argument with an &amp;quot;arguments.object&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
If we made a command, like email, that takes an object-role argument and a goal-role argument, its preview and execute methods would get passed an argument with &amp;quot;arguments.object&amp;quot; and &amp;quot;arguments.goal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
arguments.object (or arguments.goal) has several attributes of its own:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments.object.text  // a string of the input in plain text, without formatting&lt;br /&gt;
  arguments.object.html  // a string of the input in formatted html, including tags&lt;br /&gt;
  arguments.object.data  // for non-text input types, an arbitrary data object&lt;br /&gt;
  arguments.object.summary // for very long inputs, an abbreviated display string&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our example command only cares about the &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; attribute of the input, because it simply wants plain text.  Often, when the user invokes your command by typing a few short words into the input box, &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;.html&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;.summary&amp;lt;/code&amp;gt; will all have exactly the same value, and &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; will be null.  Many, if not most, commands that you write will only care about the text value.  Nevertheless, the other versions of the input data are provided to you in case they differ from &amp;lt;code&amp;gt;.text&amp;lt;/code&amp;gt; and in case your command has a use for them.&lt;br /&gt;
&lt;br /&gt;
== Introduction to Noun Types ==&lt;br /&gt;
&lt;br /&gt;
Noun types specify what &#039;&#039;kind&#039;&#039; of input your command can accept for each one of its arguments.&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;echo&amp;quot; command, we wanted the object-role argument to accept any text whatsoever, so for its nountype we passed in the predefined &amp;lt;code&amp;gt;noun_arb_text&amp;lt;/code&amp;gt; object.  This object accepts any arbitrary text as a valid argument and passes it to the command unchanged.&lt;br /&gt;
&lt;br /&gt;
This is OK for very simple commands, like echoing back the user&#039;s input.  But for commands that take structured data, you will want to use more specific nountypes.&lt;br /&gt;
&lt;br /&gt;
For example, if a command can take a date (like the &amp;quot;check calendar&amp;quot; command), you would want to use &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; as the nountype of the argument.  &amp;lt;code&amp;gt;noun_type_date&amp;lt;/code&amp;gt; provides several benefits to your command:  it does all of the date parsing for you; it suggests dates that the user might want to enter (for instance, it defaults to today&#039;s date).  And, it lets the parser know that your command takes a date.  This is useful because when the user selects a date on a page and invokes Ubiquity, your command -- along with &amp;quot;check calendar&amp;quot; -- will be one of the top suggestions.&lt;br /&gt;
&lt;br /&gt;
You can write your own noun types -- we&#039;ll get into that later.  For now, let&#039;s take a look at the built-in nountypes that your command can use.  These include:&lt;br /&gt;
&lt;br /&gt;
* noun_arb_text (Arbitrary text)&lt;br /&gt;
* noun_type_language (Name of a human language, e.g. &amp;quot;English&amp;quot;, &amp;quot;Japanese&amp;quot;)&lt;br /&gt;
* noun_type_url (A URL)&lt;br /&gt;
* noun_type_contact (An email address from your address book)&lt;br /&gt;
* noun_type_date (A date, in any format, or a word like &amp;quot;tomorrow&amp;quot;)&lt;br /&gt;
* noun_type_time (A time, in any format)&lt;br /&gt;
* noun_type_percentage&lt;br /&gt;
* noun_type_address&lt;br /&gt;
* noun_type_tab&lt;br /&gt;
* noun_type_searchengine&lt;br /&gt;
* noun_type_tag&lt;br /&gt;
* noun_type_geolocation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are familiar with writing commands, you should check out the [http://hg.toolness.com/ubiquity-firefox/file/6caa9d66b3bb/ubiquity/chrome/content/nlparser/en/nountypes.js nountypes.js], which has the implementation for most of the noun-types.  You can see what noun types are already available for your commands to use, what still needs to be written, and where the existing implementations could use improvement &amp;amp;mdash; and then come [[Labs/Ubiquity#Participation|get involved]] to help us improve them.&lt;br /&gt;
&lt;br /&gt;
=== Regexps as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
If none of the nountypes above is what you&#039;re looking for, there are several ways to define your own.  The simplest is to use a regular expression.  Suppose that (for whatever odd reason) you wanted your command to accept only arguments that begin with the letter N.  The following regexp matches words that start with N:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /^[nN]/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could use it as a noun type, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: /^[nN]/,&lt;br /&gt;
               label: &amp;quot;word that starts with n&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note that you do &#039;&#039;not&#039;&#039; put quotes around the regexp.)&lt;br /&gt;
&lt;br /&gt;
A regexp nountype will reject input that doesn&#039;t match, but it doesn&#039;t know how to help the user by suggesting appropriate input.&lt;br /&gt;
&lt;br /&gt;
=== Lists as Noun Types ===&lt;br /&gt;
&lt;br /&gt;
Suppose you&#039;re writing a command that takes a color as an argument (perhaps it outputs a hexadecimal RGB representation of that color.)  To make a nountype that accepts colors, you can simply pass in an array of strings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  names: [&amp;quot;convert color&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: [&amp;quot;red&amp;quot;, &amp;quot;orange&amp;quot;, &amp;quot;yellow&amp;quot;, &amp;quot;green&amp;quot;, &lt;br /&gt;
                          &amp;quot;blue&amp;quot;, &amp;quot;violet&amp;quot;, &amp;quot;black&amp;quot;, &amp;quot;white&amp;quot;,&lt;br /&gt;
                          &amp;quot;grey&amp;quot;, &amp;quot;brown&amp;quot;, &amp;quot;beige&amp;quot;, &amp;quot;magenta&amp;quot;,&lt;br /&gt;
                          &amp;quot;cerulean&amp;quot;, &amp;quot;puce&amp;quot;],&lt;br /&gt;
               label: &amp;quot;color to convert&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One benefit of using a list is that the parser can use it offer the user suggestions.   If the user enters &amp;quot;get-color bl&amp;quot;, for instance, Ubiquity will be able to suggest &amp;quot;black&amp;quot; and &amp;quot;blue&amp;quot; as the two valid completions based on the input.  This makes list-based nountypes very useful for any command that can accept only a finite set of values.&lt;br /&gt;
&lt;br /&gt;
=== Writing a Noun Type Object ===&lt;br /&gt;
&lt;br /&gt;
Of course, not every type of noun you&#039;d be interested in can be represented&lt;br /&gt;
as a finite list or as a regexp.  If you want to be able to accept or reject input based on some algorithmic test, you can do so by writing a custom JavaScript object that implements a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method (and, optionally, a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; method.)&lt;br /&gt;
&lt;br /&gt;
There is an example of how to do this in the section on the tab commands, below.&lt;br /&gt;
&lt;br /&gt;
== Insert Email: the Contact noun type ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s take a look at one of the built-in noun-types: &amp;lt;code&amp;gt;noun_type_contact&amp;lt;/code&amp;gt;. This lets Ubiquity know to expect a person (either by name or email address). By using the noun-type, Ubiquity will also autocomplete to known people while the user is entering the command. This is what the built-in Ubiquity command &amp;quot;email&amp;quot; uses.&lt;br /&gt;
&lt;br /&gt;
At the moment, Ubiquity figures out what people you know through reading your Gmail contacts. In this prototyped version, you&#039;ll need to use Gmail and be logged in for for Ubiquity to know who you know. Eventually, we&#039;d like to be able to interface with all major web-mail sites, as well as desktop software like Thunderbird.&lt;br /&gt;
&lt;br /&gt;
Enough rambling. It&#039;s time for a command. I constantly find that I need to fetch someone&#039;s email address to paste into a text field because I don&#039;t know it off-hand. This command solves that by letting you insert someone&#039;s email address using autocomplete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;insert email&amp;quot;],&lt;br /&gt;
  arguments: {modifier: noun_type_contact},&lt;br /&gt;
  preview: &amp;quot;Inserts someone&#039;s email address by name.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    CmdUtils.setSelection( arguments.modifier.text );&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To try this out, Ubiq &amp;quot;insert email for &amp;quot; and then the first few letters of someone you email often.&lt;br /&gt;
&lt;br /&gt;
=== Shorter Argument Declarations ===&lt;br /&gt;
&lt;br /&gt;
Notice that we used a shortcut for declaring the arguments.  In the long form, we would have had to say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: [{role: &amp;quot;modifier&amp;quot;,&lt;br /&gt;
               nountype: noun_type_contact,&lt;br /&gt;
               label: &amp;quot;contact&amp;quot;}]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
but if we don&#039;t care about specifying a label for the argument, we can get away with using a single object for &amp;quot;arguments&amp;quot;, with the roles as the property names, and the nountypes as the property values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we had several arguments, and none of them needed labels, we could say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  arguments: {object: noun_arb_text, modifier: noun_type_contact}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and so on.&lt;br /&gt;
&lt;br /&gt;
Aza writes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This one command sums up what I love about Ubiquity. In 8 lines of code, I can &lt;br /&gt;
fundamentally enhance the browser&#039;s functionality. Doing the same thing using &lt;br /&gt;
a normal Firefox extension methodology takes pages and pages of code&amp;amp;mdash;and  the interface would take more thought still. Doing the same thing using a bookmarklet would require a server-side component (to get around cross-site Ajax request ban) as well as forcing the user to give up their email password.&lt;br /&gt;
&lt;br /&gt;
Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TinyURL: Network Calls and jQuery (and the URL noun type)==&lt;br /&gt;
&lt;br /&gt;
Often while writing emails, I&#039;ll discover that I&#039;ve pasted in a URL long enough to be used for unfortunate analogies. I&#039;d like to be able to quickly turn that into a [http://en.wikipedia.org/wiki/Tinyurl TinyURL]&amp;amp;mdash;but the process of making a TinyURL involves lots of fiddly steps. Ubiquity to the rescue.&lt;br /&gt;
&lt;br /&gt;
Because we include [http://en.wikipedia.org/wiki/jQuery jQuery] with Ubiquity, it is simple to perform Ajax calls as well as parse returning data. TinyUrl.com provides an easy to use RESTful API where you pass a URL and it returns its shortened form. We use that API in this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;tinyurl&amp;quot;],&lt;br /&gt;
  arguments: [{role: &amp;quot;object&amp;quot;,&lt;br /&gt;
               nountype: noun_type_url,&lt;br /&gt;
               label: &amp;quot;url to shorten&amp;quot;}],&lt;br /&gt;
  preview: &amp;quot;Replaces the selected URL with a TinyUrl.&amp;quot;,&lt;br /&gt;
  execute: function( arguments ) {&lt;br /&gt;
    var baseUrl = &amp;quot;http://tinyurl.com/api-create.php&amp;quot;;&lt;br /&gt;
    var params = {url: arguments.object.text};&lt;br /&gt;
    jQuery.get( baseUrl, params, function( tinyUrl ) {&lt;br /&gt;
      CmdUtils.setSelection( tinyUrl );&lt;br /&gt;
    })&lt;br /&gt;
  }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;noun_type_url&amp;lt;/code&amp;gt; is a useful nountype because it defaults to the URL of the page that you are currently on.  If that is in fact the URL that the user wants, then they don&#039;t have to type it or even select it.&lt;br /&gt;
&lt;br /&gt;
jQuery is a powerful tool. With it, you can fairly effortlessly cherry-pick the data you need from RSS feeds, XML, and all sorts of other data formats. It also makes doing in-preview animations a breeze.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Twitter: Putting It All Together =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve now covered everything we need to cover in order to write a command that allows us to [http://en.wikipedia.org/wiki/Twitter Twitter] from Ubiquity.  The code below is the actual source code of the Twitter command as it appears in Ubiquity 0.5.&lt;br /&gt;
&lt;br /&gt;
Many thanks to [http://theunfocused.net/moz/ubiquity/verbs/ Blair McBride] for writing this command.  The source code is a bit more intricate than anything we&#039;ve seen so far, but it&#039;s built using exactly the same basic pieces -- and demonstrates nearly all of those pieces in action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const TWITTER_STATUS_MAXLEN = 140;&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;twitter&amp;quot;, &amp;quot;tweet&amp;quot;, &amp;quot;share using twitter&amp;quot;],&lt;br /&gt;
  arguments: [&lt;br /&gt;
    {role: &amp;quot;object&amp;quot;, label: &#039;status&#039;, nountype: noun_arb_text},&lt;br /&gt;
    {role: &amp;quot;alias&amp;quot;, nountype: noun_type_twitter_user}&lt;br /&gt;
  ],&lt;br /&gt;
  icon: &amp;quot;http://twitter.com/favicon.ico&amp;quot;,&lt;br /&gt;
  description:&lt;br /&gt;
  &amp;quot;Sets your Twitter status to a message of at most 160 characters.&amp;quot;,&lt;br /&gt;
  help: (&amp;quot;You&#039;ll need a &amp;lt;a href=\&amp;quot;http://twitter.com\&amp;quot;&amp;gt;Twitter account&amp;lt;/a&amp;gt;,&amp;quot; +&lt;br /&gt;
         &amp;quot; obviously.  If you&#039;re not already logged in&amp;quot; +&lt;br /&gt;
         &amp;quot; you&#039;ll be asked to log in.&amp;quot;),&lt;br /&gt;
  preview: function(previewBlock, args) {&lt;br /&gt;
    var statusText = (args.object ? args.object.text : &#039;&#039;);&lt;br /&gt;
    var usernameText = &amp;quot;&amp;quot;;&lt;br /&gt;
    if (args.alias) {&lt;br /&gt;
      usernameText = args.alias.text;&lt;br /&gt;
    } else if (args.as) {&lt;br /&gt;
      usernameText = args.as.text;&lt;br /&gt;
    }&lt;br /&gt;
    var previewTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;div class=&#039;twitter&#039;&amp;gt;&amp;quot;+_(&amp;quot;Updates your Twitter status ${username} to:&amp;quot;)+&amp;quot;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      &amp;quot;&amp;lt;b class=&#039;status&#039;&amp;gt;${status}&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;quot; +&lt;br /&gt;
      _(&amp;quot;Characters remaining: &amp;lt;b&amp;gt;${chars}&amp;lt;/b&amp;gt;&amp;quot;) +&lt;br /&gt;
      &amp;quot;&amp;lt;p&amp;gt;&amp;lt;small&amp;gt;&amp;quot;+_(&amp;quot;tip: tweet @mozillaubiquity for help&amp;quot;)+&amp;quot;&amp;lt;/small&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;);&lt;br /&gt;
    var truncateTemplate = (&lt;br /&gt;
      &amp;quot;&amp;lt;strong&amp;gt;&amp;quot;+_(&amp;quot;The last &amp;lt;b&amp;gt;${truncate}&amp;lt;/b&amp;gt; characters will be truncated!&amp;quot;)+&amp;quot;&amp;lt;/strong&amp;gt;&amp;quot;);&lt;br /&gt;
    var previewData = {&lt;br /&gt;
      status: &amp;lt;&amp;gt;{statusText}&amp;lt;/&amp;gt;.toXMLString(),&lt;br /&gt;
      username: usernameText &amp;amp;&amp;amp; _(&amp;quot;(For user &amp;lt;b&amp;gt;${usernameText}&amp;lt;/b&amp;gt;)&amp;quot;),&lt;br /&gt;
      chars: TWITTER_STATUS_MAXLEN - statusText.length&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var previewHTML = CmdUtils.renderTemplate(&lt;br /&gt;
                        CmdUtils.renderTemplate(previewTemplate, previewData),&lt;br /&gt;
                        {usernameText:usernameText});&lt;br /&gt;
&lt;br /&gt;
    if (previewData.chars &amp;lt; 0) {&lt;br /&gt;
      var truncateData = {&lt;br /&gt;
        truncate: 0 - previewData.chars&lt;br /&gt;
      };&lt;br /&gt;
&lt;br /&gt;
      previewHTML += CmdUtils.renderTemplate(truncateTemplate, truncateData);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    previewBlock.innerHTML = previewHTML;&lt;br /&gt;
  },&lt;br /&gt;
  execute: function(args) {&lt;br /&gt;
    var statusText = args.object.text;&lt;br /&gt;
    if(statusText.length &amp;lt; 1) {&lt;br /&gt;
      this._show(_(&amp;quot;requires a status to be entered&amp;quot;));&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var updateUrl = &amp;quot;https://twitter.com/statuses/update.json&amp;quot;;&lt;br /&gt;
    var updateParams = {&lt;br /&gt;
      source: &amp;quot;ubiquity&amp;quot;,&lt;br /&gt;
      status: statusText&lt;br /&gt;
      //dont cut the input since sometimes, the user selects a big url,&lt;br /&gt;
      //and the total lenght is more than 140, but tinyurl takes care of that&lt;br /&gt;
    };&lt;br /&gt;
    var me = this;&lt;br /&gt;
&lt;br /&gt;
    function sendMessage() {&lt;br /&gt;
      jQuery.ajax({&lt;br /&gt;
        type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
        url: updateUrl,&lt;br /&gt;
        data: updateParams,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        error: function() {&lt;br /&gt;
          me._show(_(&amp;quot;error - status not updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        success: function() {&lt;br /&gt;
          me._show(/^d /.test(statusText)&lt;br /&gt;
                   ? _(&amp;quot;direct message sent&amp;quot;)&lt;br /&gt;
                   : _(&amp;quot;status updated&amp;quot;));&lt;br /&gt;
        },&lt;br /&gt;
        username: login.username,&lt;br /&gt;
        password: login.password&lt;br /&gt;
      });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var login;&lt;br /&gt;
    var alias = args.alias;&lt;br /&gt;
    if (alias &amp;amp;&amp;amp; alias.text &amp;amp;&amp;amp; alias.data) {&lt;br /&gt;
      login = alias.data;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    } else {&lt;br /&gt;
      login = {username: null,&lt;br /&gt;
               password: null};&lt;br /&gt;
      if (alias &amp;amp;&amp;amp; alias.text)&lt;br /&gt;
        login.username = alias.text;&lt;br /&gt;
      sendMessage();&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  _show: function(txt){&lt;br /&gt;
    displayMessage({icon: this.icon, title: this.name, text: txt});&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Switching Tabs =&lt;br /&gt;
&lt;br /&gt;
The final command in this tutorial is for switching between tabs. The end goal is this: type a few keys to that matches the title of an open tab (in any window), hit return, and you&#039;ve switched to that tab.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: Writing your own Noun-Types ===&lt;br /&gt;
&lt;br /&gt;
A noun-type needs to only have two things: A &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; function.  It can optionally also have a &amp;lt;code&amp;gt;default()&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
The label is what shows up when the command prompts for input. Suggest returns a list of input objects, each one containing the name of a matching tab. We&#039;re using [http://developer.mozilla.org/en/docs/FUEL FUEL] to interact with the browser, which is where the &amp;quot;Application&amp;quot; variable comes from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_tab = {&lt;br /&gt;
  label: &amp;quot;tab name&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
  // Returns all tabs from all windows.&lt;br /&gt;
  getTabs: function nt_tab_getTabs() {&lt;br /&gt;
    return [tab&lt;br /&gt;
            for each (win in Application.windows)&lt;br /&gt;
            for each (tab in win.tabs)];&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  suggest: function nt_tab_suggest(text, html, callback, selectionIndices) {&lt;br /&gt;
    var textLC = text.toLowerCase();&lt;br /&gt;
    return [CmdUtils.makeSugg(tab.document.title, null, tab)&lt;br /&gt;
            for each (tab in this.getTabs())&lt;br /&gt;
            if (~tab.document.title.toLowerCase().indexOf(textLC))];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The suggest method of a noun type always gets passed both text and html.  If the input is coming from a part of a web page that the user has selected, these&lt;br /&gt;
values can be different: they are both strings, but the html value contains markup tags while the text value does not. The Tab noun type only cares about the plain text of the tab name, so we ignore the value of html.&lt;br /&gt;
&lt;br /&gt;
The callback argument is for use by nountypes that need to run asynchronously, i.e. because they need to do network calls to generate suggestions.  The callback is a function; instead of returning a list of suggestions right away, an asynchronous noun type can call the callback with each suggestion it generates.  More on this later; the tab noun type generates all its suggestions right away, so it just returns them instead of using the callback.&lt;br /&gt;
&lt;br /&gt;
We use the convenience function &amp;lt;code&amp;gt;CmdUtils.makeSugg()&amp;lt;/code&amp;gt; to generate an&lt;br /&gt;
input object of the type that the Ubiquity parser expects.  The full signature of this function is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.makeSugg(text, html, data, score, selectionIndices);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It requires at least one of &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; if you want to skip &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;html&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the text or html input is very long, &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; generates a summary for us, and puts it in the &amp;lt;code&amp;gt;summary&amp;lt;/code&amp;gt; attribute of the input object.&lt;br /&gt;
&lt;br /&gt;
We could have accomplished mostly the same thing without calling &amp;lt;code&amp;gt;makeSugg()&amp;lt;/code&amp;gt; by returning a list of anonymous objects like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ text: tabName,&lt;br /&gt;
  html: Utils.escapeHtml(tabName),&lt;br /&gt;
  data: tab,&lt;br /&gt;
  summary: Utils.escapeHtml(tabName) };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input objects that our &amp;lt;code&amp;gt;suggest()&amp;lt;/code&amp;gt; method generates are the same objects that will eventually get passed in to the &amp;lt;code&amp;gt;execute()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;preview()&amp;lt;/code&amp;gt; methods of any commands that use this noun type.&lt;br /&gt;
&lt;br /&gt;
=== Switching Tabs: The Command ===&lt;br /&gt;
&lt;br /&gt;
Now that we are armed with the tab noun-type, it is easy to make the tab-switching command. Again, we use FUEL to focus the selected tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;switch tab&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_tab},&lt;br /&gt;
&lt;br /&gt;
  execute: function tab_execute(args) {&lt;br /&gt;
    // must be delayed because Ubiquity restores the focus on close&lt;br /&gt;
    Utils.setTimeout(function delayedFocus() {&lt;br /&gt;
      var tab = args.object.data;&lt;br /&gt;
      tab._window._window.focus();&lt;br /&gt;
      tab.focus();&lt;br /&gt;
    }, 99);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  preview: function tab_preview(pblock, args) {&lt;br /&gt;
    var tabName = args.object.text;&lt;br /&gt;
    if (tabName) {&lt;br /&gt;
      var msg = &amp;quot;Changes to &amp;lt;strong&amp;gt;${tab}&amp;lt;/strong&amp;gt; tab.&amp;quot;;&lt;br /&gt;
      pblock.innerHTML = _(msg, {tab: tabName});&lt;br /&gt;
    }&lt;br /&gt;
    else pblock.innerHTML = _(&amp;quot;Switch to a tab by name.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Development Hints =&lt;br /&gt;
&lt;br /&gt;
You now know all you need to know to get started developing useful Ubiquity commands of your own.&lt;br /&gt;
&lt;br /&gt;
Here are some miscellaneous tips that didn&#039;t fit elsewhere on this page, that may make development easier for you.&lt;br /&gt;
&lt;br /&gt;
== The Source Code of Built-In Commands ==&lt;br /&gt;
&lt;br /&gt;
Looking at the source code of built-in commands and built-in noun types can be a very useful aid to development.  If you have the source checkout of Ubiquity (see [Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial | the development tutorial] to find out how to get this), the source code can be found in the files:&lt;br /&gt;
&lt;br /&gt;
 ubiquity/standard-feeds/&lt;br /&gt;
 ubiquity/builtin-feeds/builtincmds.js&lt;br /&gt;
 ubiquity/modules/nountypes.js&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a checkout of the source code, you can view the latest version on the web here:&lt;br /&gt;
&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/standard-feeds/ standard-feeds]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/builtin-feeds/builtincmds.js builtincmds.js]&lt;br /&gt;
 [http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/modules/nountypes.js nountypes.js]&lt;br /&gt;
&lt;br /&gt;
== Interacting with Other Extensions ==&lt;br /&gt;
&lt;br /&gt;
http://img363.imageshack.us/img363/1906/picture7cm5.png&lt;br /&gt;
&lt;br /&gt;
There isn&#039;t much to say here besides that it&#039;s easy. For example, here&#039;s a command (thanks to [http://foyrek.com/lyrics.html Abimanyu Raja] for writing this code) that finds the lyrics for a song. You can simply Ubiq something like &amp;quot;get lyrics for wild international&amp;quot; but the command will also interface with the FoxyTunes extension (if it is installed) and add the currently playing song to the suggestion list. Interfacing with other extensions, too, is easy because you can view the source code for every Firefox extension.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_song = {&lt;br /&gt;
  label: &amp;quot;song name&amp;quot;,&lt;br /&gt;
  suggest: function nt_song_suggest(text) {&lt;br /&gt;
    var suggestions = [CmdUtils.makeSugg(text)];&lt;br /&gt;
    var win = Utils.currentChromeWindow;&lt;br /&gt;
    if (&amp;quot;foxytunesGetCurrentTrackTitle&amp;quot; in win)&lt;br /&gt;
      suggestions.push(CmdUtils.makeSugg(win.foxytunesGetCurrentTrackTitle()));&lt;br /&gt;
    return suggestions;&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;get lyrics&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_song},&lt;br /&gt;
  description: &amp;quot;Searches for lyrics of the song.&amp;quot;,&lt;br /&gt;
  preview: function gl_preview(pblock, {object: {text}}) {&lt;br /&gt;
    if (!text) {&lt;br /&gt;
      this.previewDefault(pblock);&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    pblock.innerHTML = _(&amp;quot;Searches for the lyrics of &amp;lt;b&amp;gt;${query}&amp;lt;/b&amp;gt;.&amp;quot;,&lt;br /&gt;
                         {query: Utils.escapeHtml(text)});&lt;br /&gt;
  },&lt;br /&gt;
  execute: function gl_execute(args) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      &amp;quot;http://www.google.com/search?q=&amp;quot; +&lt;br /&gt;
      encodeURIComponent(args.object.text + _(&amp;quot; lyrics&amp;quot;)));&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing Asynchronous Noun Suggestions ==&lt;br /&gt;
&lt;br /&gt;
The noun types we&#039;ve seen so far in this tutorial have all worked synchronously, returning their suggestions right away. However, Ubiquity also supports asynchronous noun suggestions. These are useful for when a noun type needs to do some potentially time-consuming work before it can make suggestions &amp;amp;mdash; most commonly when it needs to call an external service.&lt;br /&gt;
&lt;br /&gt;
Implementing asynchronous suggestions is simple. Whenever the Ubiquity parser calls a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function, it includes a callback function that may be used to send suggestions back to the parser as they become available. In the most typical case, the noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function makes an AJAX request, invoking the parser&#039;s callback function from within the callback function for the AJAX request.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simple example: a noun type that suggests [http://www.freebase.com/ Freebase] topics based on the text the user has typed or selected, and a barebones &amp;lt;code&amp;gt;freebase-lookup&amp;lt;/code&amp;gt; command that uses the noun type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var noun_type_freebase_topic = {&lt;br /&gt;
  name: &amp;quot;Freebase topic&amp;quot;,&lt;br /&gt;
  label: &amp;quot;topic&amp;quot;,&lt;br /&gt;
  suggest: function freebase_topic_suggest(text, html, callback) {&lt;br /&gt;
    return [&lt;br /&gt;
      CmdUtils.makeSugg(text),&lt;br /&gt;
      $.ajax({&lt;br /&gt;
        url: &amp;quot;http://www.freebase.com/api/service/search&amp;quot;,&lt;br /&gt;
        dataType: &amp;quot;json&amp;quot;,&lt;br /&gt;
        data: {prefix: text, limit: 5},&lt;br /&gt;
        success: function suggestTopics(response) {&lt;br /&gt;
          if (response.status === &amp;quot;200 OK&amp;quot;)&lt;br /&gt;
            callback([CmdUtils.makeSugg(result.name, result.name, result)&lt;br /&gt;
                      for each (result in response.result)]);&lt;br /&gt;
        },&lt;br /&gt;
      })];&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  names: [&amp;quot;lookup on freebase&amp;quot;],&lt;br /&gt;
  arguments: {object: noun_type_freebase_topic},&lt;br /&gt;
  preview: function preview(pblock, args) {&lt;br /&gt;
    pblock.innerHTML = _((&amp;quot;Go to the Freebase topic page for &amp;quot; +&lt;br /&gt;
                          &amp;quot;{if text}${text}{else}any topic{/if}.&amp;quot;),&lt;br /&gt;
                         args.object);&lt;br /&gt;
  },&lt;br /&gt;
  execute: function goToFreebase({object: {text, data}}) {&lt;br /&gt;
    Utils.openUrlInBrowser(&lt;br /&gt;
      text&lt;br /&gt;
      ? (data&lt;br /&gt;
         ? &amp;quot;http://www.freebase.com/view&amp;quot; + data.id&lt;br /&gt;
         : (&amp;quot;http://www.freebase.com/search?query=&amp;quot; +&lt;br /&gt;
            encodeURIComponent(text)))&lt;br /&gt;
      : &amp;quot;http://www.freebase.com/&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A few notes:&lt;br /&gt;
&lt;br /&gt;
* A noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function typically returns an empty array when it intends to make asynchronous suggestions, but it can return one or more suggestions synchronously if it has them available.&lt;br /&gt;
* Because the work being done to generate asynchronous suggestions is generally somewhat expensive, and because a noun type&#039;s &amp;lt;code&amp;gt;suggest&amp;lt;/code&amp;gt; function may be called for every keystroke the user makes, you should probably consider implementing a delay before starting the work and/or caching the work at some level. Ubiquity currently leaves this up to each noun type individually.&lt;br /&gt;
* A much more robust implementation of Freebase-derived noun types can be found [http://graynorton.com/ubiquity/freebase-nouns.html here].&lt;br /&gt;
&lt;br /&gt;
== Running on page load, Ubiquity load and startup ==&lt;br /&gt;
&lt;br /&gt;
Commands aren&#039;t the only thing you can put in a command feed.  You can also include functions you want to be run automatically at page-load time and at Firefox startup time.&lt;br /&gt;
&lt;br /&gt;
In order to run some code on page load, you simply have to prefix your function with &amp;lt;code&amp;gt;pageLoad_&amp;lt;/code&amp;gt;. For example, if you want to say &amp;quot;Hi&amp;quot; every time a page is loaded, your code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function pageLoad_hi() {&lt;br /&gt;
  displayMessage(&amp;quot;hi&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you modify the function and want to see the changes, remember to first invoke Ubiquity. Although your function like above, might not be a Ubiquity command, this is necessary to refresh the cached code.&lt;br /&gt;
&lt;br /&gt;
Similarly, functions prefixed by &amp;lt;code&amp;gt;ubiquityLoad_&amp;lt;/code&amp;gt; are called whenever Ubiquity is initialized for a main window of Firefox. This is useful when you want to interact with the Ubiquity interface itself, or run some code whenever a new window is opened.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function ubiquityLoad_googleAsDefaultEntry(gUbiquity, mainWindow) {&lt;br /&gt;
  gUbiquity.textBox.value = &amp;quot;google&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if you want to run some code everytime Firefox starts up, you just have to prefix the function with &amp;lt;code&amp;gt;startup_&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The awesome thing about these functions is the ability to develop whole Firefox extensions (that require minimal UI) as Ubiquity plugins in lesser lines of code. You don&#039;t need to worry about chrome.manifest or install.rdf. Another added benefit is that you never have to restart your Firefox during development unless of course, you are running code on Firefox startup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://img388.imageshack.us/img388/3086/picture5eo9.png&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the code for [http://foyrek.com/keyscape.js Keyscape] which is a Ubiquity command that makes use of &amp;lt;code&amp;gt;pageLoad&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;startup&amp;lt;/code&amp;gt; to recreate the functionality of the [https://addons.mozilla.org/en-US/firefox/addon/339 Search Keys extension] by Jesse Ruderman. In line with Ubiquity&#039;s aim to let you do things quicker using your keyboard, this command lets you go to search results on Google by just pressing a number. It&#039;ll add hints to show the number of each link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//A lot of this code is borrowed from the Search Keys extension&lt;br /&gt;
//Many thanks to Jeese Ruderman&lt;br /&gt;
&lt;br /&gt;
function startup_keyscape() {&lt;br /&gt;
  window.addEventListener(&amp;quot;keydown&amp;quot;, keyscape_down, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function pageLoad_keyscape(doc){&lt;br /&gt;
&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
  //If we are on about: or chrome://, just return&lt;br /&gt;
  if(uri.scheme != &amp;quot;http&amp;quot;)&lt;br /&gt;
    return;&lt;br /&gt;
&lt;br /&gt;
  //Check if the page we are on is google&lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	      		    &lt;br /&gt;
    for(var num=1; num&amp;lt;=10; num++){&lt;br /&gt;
&lt;br /&gt;
      var link = jQuery(doc.body).find(&#039;a.l&#039;)[num-1];&lt;br /&gt;
      &lt;br /&gt;
      if( link ){&lt;br /&gt;
&lt;br /&gt;
        var hint = doc.createElementNS(&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;, &amp;quot;span&amp;quot;);&lt;br /&gt;
        hint.style.color = &amp;quot;blue&amp;quot;;&lt;br /&gt;
        hint.style.background = &amp;quot;white&amp;quot;;&lt;br /&gt;
        hint.style.padding = &amp;quot;1px 2px 1px 2px&amp;quot;;&lt;br /&gt;
        hint.style.marginLeft = &amp;quot;.5em&amp;quot;;&lt;br /&gt;
        hint.appendChild(doc.createTextNode(num == 10 ? 0 : num));&lt;br /&gt;
        link.parentNode.insertBefore(hint, link.nextSibling);&lt;br /&gt;
      }  		&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_isGoogle(uri){&lt;br /&gt;
  return uri.host.indexOf(&amp;quot;google&amp;quot;) != -1 &lt;br /&gt;
	 &amp;amp;&amp;amp; (uri.path.substr(0,8) == &amp;quot;/search?&amp;quot; &lt;br /&gt;
         || uri.path.substr(0,8) == &amp;quot;/custom?&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function keyscape_down(event){&lt;br /&gt;
&lt;br /&gt;
  var doc =  Application.activeWindow.activeTab.document;	&lt;br /&gt;
  var uri = Utils.url(doc.documentURI);&lt;br /&gt;
 &lt;br /&gt;
  if( keyscape_isGoogle(uri) ){&lt;br /&gt;
	&lt;br /&gt;
   var key = parseInt(event.keyCode || event.charCode);	&lt;br /&gt;
   var num;&lt;br /&gt;
	&lt;br /&gt;
   if(48 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 57) //number keys&lt;br /&gt;
     num = key - 48;&lt;br /&gt;
   else if(96 &amp;lt;= key &amp;amp;&amp;amp; key &amp;lt;= 105) //numeric keypad with numlock on&lt;br /&gt;
     num = key - 96;&lt;br /&gt;
   else&lt;br /&gt;
     return;&lt;br /&gt;
&lt;br /&gt;
   //Don&#039;t do anything if we are in a textbox&lt;br /&gt;
   //or some other related elements&lt;br /&gt;
   var elt = window.document.commandDispatcher.focusedElement;&lt;br /&gt;
   &lt;br /&gt;
   if (elt) {&lt;br /&gt;
     var ln = new String(elt.localName).toLowerCase();&lt;br /&gt;
     if (ln == &amp;quot;input&amp;quot; || ln == &amp;quot;textarea&amp;quot; || ln == &amp;quot;select&amp;quot; || ln == &amp;quot;isindex&amp;quot;)&lt;br /&gt;
        return;&lt;br /&gt;
   }&lt;br /&gt;
    &lt;br /&gt;
   //Get the link url from the search results page&lt;br /&gt;
   var url_dest = jQuery(doc.body).find(&#039;a.l&#039;).eq(num-1).attr(&#039;href&#039;);&lt;br /&gt;
   &lt;br /&gt;
   if(event.altKey){&lt;br /&gt;
     //Open in new tab&lt;br /&gt;
     Application.activeWindow.open(Utils.url(url_dest));&lt;br /&gt;
   }else{&lt;br /&gt;
     //Open in same tab&lt;br /&gt;
     doc.location.href = url_dest;&lt;br /&gt;
   }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Ubiquity does indeed become ubiquitous, a lot of extensions can be re-written as Ubiquity commands. This is much nicer for the end-user, as well, because the Ubiquity command installation process is a lot easier.&lt;br /&gt;
&lt;br /&gt;
In the future, Ubiquity is also likely to have the ability to convert your Ubiquity commands into proper Firefox extensions. Look [http://labs.toolness.com/trac/ticket/3 here] to check on the progress of this functionality.&lt;br /&gt;
&lt;br /&gt;
== Using Bin ==&lt;br /&gt;
Some commands may want to store data that persist even after closing Firefox. &lt;br /&gt;
Meet &amp;lt;code&amp;gt;Bin&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var gId = 42; // used for avoiding needless preview updates when typing&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;memo&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Lets you jot a memo for the page.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  argument: noun_arb_text,&lt;br /&gt;
  execute: function memo_execute({object: {html}}) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]() || [];&lt;br /&gt;
    list.push(html);&lt;br /&gt;
    Bin[href](list);&lt;br /&gt;
    gId = +new Date;&lt;br /&gt;
  },&lt;br /&gt;
  preview: function memo_preview(pb) {&lt;br /&gt;
    var {href} = CmdUtils.getDocument().location;&lt;br /&gt;
    var list = Bin[href]();&lt;br /&gt;
    if (!list) {&lt;br /&gt;
      pb.innerHTML =&lt;br /&gt;
        &amp;lt;&amp;gt;No memos taken for: &amp;lt;small&amp;gt;&amp;lt;code&amp;gt;{href}&amp;lt;/code&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/&amp;gt;;&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    if (pb.ownerDocument.getElementById(gId)) return;&lt;br /&gt;
    var ol = CmdUtils.previewList(pb, list, function deleteMemo(i, ev) {&lt;br /&gt;
      $(ev.target).closest(&amp;quot;li&amp;quot;).slideUp();&lt;br /&gt;
      list.splice(i, 1);&lt;br /&gt;
      Bin[href](list.length ? list : null);&lt;br /&gt;
      gId = +new Date;&lt;br /&gt;
    });&lt;br /&gt;
    ol.id = gId;&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
CmdUtils.CreateCommand({&lt;br /&gt;
  name: &amp;quot;list memos&amp;quot;,&lt;br /&gt;
  description: &amp;quot;Opens all memos you&#039;ve taken in a new tab.&amp;quot;,&lt;br /&gt;
  author: &amp;quot;satyr&amp;quot;,&lt;br /&gt;
  execute: function list_memos_execute() {&lt;br /&gt;
    var htm = +Bin + &amp;quot; page(s)&amp;lt;dl&amp;gt;&amp;quot;, {escapeHtml} = Utils;&lt;br /&gt;
    for (var [url, memos] in Bin) {&lt;br /&gt;
      htm += &amp;quot;&amp;lt;dt&amp;gt;&amp;quot; + escapeHtml(url) + &amp;quot;&amp;lt;/dt&amp;gt;&amp;lt;dd&amp;gt;&amp;lt;ol&amp;gt;&amp;quot;;&lt;br /&gt;
      for each (var memo in memos) htm += &amp;quot;&amp;lt;li&amp;gt;&amp;quot; + memo + &amp;quot;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
      htm += &amp;quot;&amp;lt;/ol&amp;gt;&amp;lt;/dd&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    Utils.openUrlInBrowser(&amp;quot;data:text/html,&amp;quot; + encodeURI(htm + &amp;quot;&amp;lt;/dl&amp;gt;&amp;quot;));&lt;br /&gt;
  },&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details, see the bottom of [https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/feedmanager.js FeedManager] documentation.&lt;br /&gt;
&lt;br /&gt;
== Firebug ==&lt;br /&gt;
&lt;br /&gt;
Ubiquity automatically enables Chrome Errors and Warnings on startup so that errors in your code appear in the Firebug console. Just use &amp;lt;tt&amp;gt;CmdUtils.log()&amp;lt;/tt&amp;gt; rather than &amp;lt;tt&amp;gt;console.log()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Where To Go From Here =&lt;br /&gt;
&lt;br /&gt;
Take a look at Ubiquity&#039;s reference documentation for the &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/utils.js Utils]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/index.html#modules/cmdutils.js CmdUtils]&amp;lt;/tt&amp;gt; namespaces.&lt;br /&gt;
&lt;br /&gt;
If you have any questions or comments, feel free to join us on IRC at &amp;lt;tt&amp;gt;#ubiquity&amp;lt;/tt&amp;gt; on &amp;lt;tt&amp;gt;irc.mozilla.org&amp;lt;/tt&amp;gt;, as well as the [http://groups.google.com/group/ubiquity-firefox Ubiquity Google Group].&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
To reiterate a point I made before: Ubiquity increases the surface area of innovation for the browser many-fold, by making anyone who can write simple Javascript into an agent for bettering the browser and the open Web. You are one of those agents.&lt;br /&gt;
&lt;br /&gt;
Now, go forth and create.&lt;/div&gt;</summary>
		<author><name>Satyr</name></author>
	</entry>
</feed>