Customizing Firefox Search.

Tom Hughes tom at compton.nu
Thu Feb 14 15:04:07 UTC 2013


On 14/02/13 12:03, Daniel J Walsh wrote:

> Any know of a way to build a customized search into firefox.  Basically I want
> to setup a search pull down which is hard coded to a particular site.
>
> For example, add a menu item called
> MyBlog
>
> And what ever I put into the search window ends up going to google as
>
> $SEARCHTEXT site:danwalsh.livejournal.com

Well the place to start is www.opensearch.org but basically you need a 
small XML document describing the search, for example:

   http://www.openstreetmap.org/assets/osm.xml

Then you need to publish an HTML with a link tag that points at the 
document like this:

   <link href="/assets/osm-.xml"
         rel="search" title="OpenStreetMap Search"
         type="application/opensearchdescription+xml" />

Then when you visit that page the search menu will have the option to 
add that search to the menu.

Which is all more complicated than you were probably hoping for ;-)

Tom

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/


More information about the devel mailing list