Conveniently searching Wikipedia

A bookmarklet is a piece of Javascript code which can be used as an
ordinary bookmark in a web browser. The bookmarklets below send the
currently highlighted text to the search engine of the English Wikipedia and then display the results in a new browser window. If no
text is highlighted when the bookmarklet is
activated, a popup dialog appears and allows the user to enter search
terms. If they don't enter any search terms, they will be sent to the
Wikipedia main page.
Javascript needs to be enabled in your browser for this to work. Pick
your browser below, and follow the instructions.

Netscape and Mozilla

If your Bookmarks Toolbar (a place to store commonly used bookmarks
right under the location box) is
not shown, choose View->Toolbars->Bookmarks Toolbar.
Then drag and drop the following link to your Personal Toolbar.

Internet Explorer

If the Links section (a place to store commonly used bookmarks) is not
shown right below your location bar, go to View -> Toolbars -> Links.
Then right-click on the following link, choose Add to Favorites, and
create it in the Links folder. It will show up at the top.

When you start the bookmarklet for the first time, you may get a
security warning. Allow the script to run if you trust me.

Note: Tested on IE 5.5, IE 6.0.

Opera

Opera doesn't seem to support the getSelection() method, so this
bookmarklet can only be used to type (or paste) in the Wikipedia
search terms.
Right-click on it, then select "Add link to bookmarks..."

Now, to search Wikipedia for "French revolution", go to the location bar
(Ctrl-L) and enter 'w French revolution', again without the quotes,
then hit Enter. This
particular example will use Google to search all Wikipedias, not just the English
one. I have
similar keywords for all the other searches I perform regularly. For
instance, if you want a keyword that searches the German Wikipedia
only, you can enter
'http://de.wikipedia.org/wiki/Spezial:Search?search=%s' as Location
and 'wg' as keyword.

Chrome
To add a similar quick search keyword to Chrome:

Right-click into the address bar and choose 'Edit search engines'

Click on 'Add'

Enter 'Wikipedia search' as Name (without the quotes).

Enter 'w' as Keyword.

Enter
'http://www.google.com/search?q=site:wikipedia.org+%s'
as URL.

Click OK.

Internet Explorer

To enable a similar quick search from the Windows and Internet Explorer Address bars, do the following