Edit Talk

Search bookmarklets

From Appropedia

This began as a post on the Appropedia Foundation blog.

Highlight text on a web page, click a button on your bookmarks toolbar, and perform a search for that term on Appropedia. Sound handy? Here's how you make the button (I'm using Firefox, but I think it will work similarly on other browsers):

  1. Copy the following code to your clipboard (i.e. highlight and press Ctrl-C):
  2. Right click on an empty space on your bookmark toolbar. (If there is no empty space, rightclick the ">>" symbol at the right end of the toolbar.)
  3. Choose "New Bookmark" and enter a name such as "Appropedia". (I use "Ap" so it uses less space.)
  4. Paste the code from clipboard (Ctrl-V) into the "Location" field.
  5. Click the "Add" button. This will create the button - if you wish, you can drag and drop to a different place on the toolbar.

How do we link these?[edit | edit source]

I'd rather just give a links to drag and drop, but creating javascript links in Wordpress or in MediaWiki is beyond me. If you know how, please help us out, so we could add this to the front page of the wiki, and put them in blog posts.

You can do the same thing with other wikis, e.g. this is the code for the French language Ekopedia:


And this is for Wikipedia:


Making your own bookmarklet[edit | edit source]

Or do you want another wiki or website? Easy - the following method has worked for any MediaWiki site I've tried. (It should work for most other sites as well, though you may have to adjust it a little.) Let's take [Greenlivingpedia:|Greenlivingpedia] as an example. Just go to the site and search for something that you isn't a page title in the wiki, such as qwerty. Then look at the url:


Just delete the search term (qwerty), and anything after it, giving you:


Now, in the original code for Appropedia, at the beginning of the post, replace the appropedia.org search url in the code ("https://www.appropedia.org/Special:Search?search=") which is inside single quote marks, with the new site's search url. Leave the single quote marks there, so you replace 'https://www.appropedia.org/Special:Search?search=' with 'http://www.greenlivingpedia.org/Special:Search?search=' - then just replace the "prompt" term in the code with something appropriate (e.g. just change Appropedia to Greenlivingpedia, so 'Appropedia%20keywords:' becomes 'Greenlivingpedia%20keywords:' ).

So, putting the changes in italics, you now have:


Hat tip: Geek to Live: Ten Must-Have Bookmarklets, by Gina Trapani, Oct 5 2005. This gave the code for the Wikipedia lookup bookmarklet.

Sites without a suitable search function[edit | edit source]

NOTE: These instructions are not working, and I'm not sure why. Nothing happens when clicking the bookmarklet, regardless of whether there is a "+" on the end of the search url in the code. ' --Chriswaterguy 21:53, 4 March 2009 (UTC)

You can also use a search engine - either because you can't get the site search to work, or you prefer it for whatever reason. Just replace the search url with this.


...where siteurl is the address of the website you want to search. Remember that if you don't add a prefix (e.g. appropedia.org) then it will include all subdomains. If you use a prefix (e.g. www.appropedia.org) then it won't search other subdomains (e.g. blogs.appropedia.org).

So, for aidg.org, for example, the search url would be:


and the bookmarklet would look something like: