Posts Tagged ‘firefox’

How to add direct Wikipedia/Last.fm/etc search to the Firefox search bar

Friday, June 20th, 2008

I visit Wikipedia and Last.fm several times daily, but recently grew tired of doing manual searches by editing the URL:s in my browser history. Adding the sites to the Firefox search bar was easy (especially with the great Mycroft service), but the downside was the extra step added by the search result page.

Since I usually know exactly what I’m looking for, I wanted to be able to go directly to a certain page when entering a search term, instead of searching for the term.

This is how you modify Firefox to behave that way:

  • Add the search engines to Firefox through Mycroft or the official Add-on repository.
  • Close Firefox.
  • On XP, enter the directory
    C:\Documents and Settings\YOURUSERNAME\Application Data\Mozilla\Firefox\Profiles\YOURPROFILE\searchplugins
  • Open the xml files in a text editor.
  • For Wikipedia, you need to change the following line
    <os:Url type="text/html" method="GET" template="http://en.wikipedia.org/wiki/{searchTerms}&sourceid=mozilla-search">

    into this:

    <os:Url type="text/html" method="GET" template="http://en.wikipedia.org/wiki/{searchTerms}">
  • I.e., change the URL so that it points straight at the article instead of the search function.