Conveniently searching Wikipedia

1. Bookmarklets

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.
Wikipedia search
Alternatively, you can right-click on this link and select Add bookmark.

Note: Tested on Netscape 4.7/Windows, Netscape 4.76/Linux, Mozilla 0.9.6/Windows, Mozilla 1.6b/Linux, Firefox 1.5/Windows.

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.
Wikipedia search
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..."
Wikipedia search
Note: Tested on Opera 6.0.

2. Custom keywords for the Location bar

I actually don't use the bookmarklets anymore. Instead, I use location box keywords to have Google search Wikipedia for me.

Mozilla, Firefox and relatives

  1. In Firefox, create a new bookmark (Bookmarks/Manage Bookmarks/New Bookmark)
  2. Enter 'Wikipedia search' as Name (without the quotes).
  3. Enter 'http://www.google.com/search?q=site:wikipedia.org+%s' as Location.
  4. Enter 'w' as Keyword.
  5. Click OK.
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:
  1. Right-click into the address bar and choose 'Edit search engines'
  2. Click on 'Add'
  3. Enter 'Wikipedia search' as Name (without the quotes).
  4. Enter 'w' as Keyword.
  5. Enter 'http://www.google.com/search?q=site:wikipedia.org+%s' as URL.
  6. Click OK.

Internet Explorer

To enable a similar quick search from the Windows and Internet Explorer Address bars, do the following
  1. Open Notepad and insert all of the text below:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\w]
    @="http://www.wikipedia.org/w/wiki.phtml?search=%s"
    " "="+"
    "#"="%23"
    "&"="%26"
    "?"="%3F"
    "+"="%2B"
    "="="%3D"
    
  2. Choose File | Save as and save the file as "wikipedia.reg" (either use quote marks around the file name or choose All Files from the Save as type drop-down in Notepad's Save dialog).
  3. Double-click on the "wikipedia.reg" file to add the key to your Windows Registry.
This will allow you to for example type "w french revolution" (without the quotes) into the Windows and Internet Explorer Address bars to immediately search Wikipedia for the given search terms.

Note: There are other URLs you can specify instead of the default (@) one given above. For instance, the line

@="http://de.wikipedia.org/w/wiki.phtml?search=%s"
will search the German Wikipedia and
@="http://www.google.com/search?q=site:wikipedia.org+%s"
will use Google to search all language Wikipedias.

Note:Tested on Internet Explorer 6.0 and 8.0.

3. Search bar

If you'd like the search bar (upper right) of Firefox to support Wikipedia searches, go here and click on 'Wikipedia'. For Internet Explorer's search bar Wikipedia support, go here.

4. Select text and right-click

Firefox

Conquery is a nice Firefox add-on, which allows you to select some text, right-click, and choose from a list of search engines, Wikipedia being one of them.

Internet Explorer 8

In Internet Explorer 8 and later, you can use web accelerators to achieve the same effect. You want to install the Define-with-Wikipedia accelerator.

Chrome

In Chrome, a functionality similar to Conquery and web accelerators is available with the extension Cleeki. It comes with a Wikipedia search preconfigured.

5. Select text to get a pop-up

The Firefox addon WikiLook is a very convenient way to quickly look up words in Wiktionary or Wikipedia. You select some text, and a popup with the Wiktionary/Wikipedia definition appears right away.

Credits, Comments and Copyrights

The idea for the bookmarklets came from the bookmarklets of the LEO German-English dictionary. My versions are in the public domain.

The Internet Explorer keywords approach was found here and is therefore covered under the GFDL.

Please let me know if something doesn't work right of if you have a Wikipedia bookmarklet for a different browser.


Last Change: 25-Dec-2010
Axel Boldt <axelboldt@yahoo.com>