Labs/Ubiquity/Writing A Search Command: Difference between revisions

From MozillaWiki
< Labs‎ | Ubiquity
Jump to navigation Jump to search
(Documentation on writing a search command)
 
Line 15: Line 15:


=== preview ===
=== preview ===
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]]


To provide a consistent search experience, makeSearchCommand 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.


=== charset ===
=== charset ===

Revision as of 01:51, 21 October 2009

Documentation of CmdUtils.makeSearchCommand

name

The name of the search command, ie: "Google"

url

The url of the search provider, with the string "{QUERY}" (without the quotes representing the search word, ie: "http://www.google.com/search?q={QUERY}". If the provider uses POST instead of GET, see #postData.

icon

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.

description

A description of your search command. If not provided, one will be generated from a localized template and the name of your search command.

preview

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

To provide a consistent search experience, makeSearchCommand 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.

charset

postData

parser

container

title

preview

thumbnail

maxResults

href

baseurl

type

Examples