Wikipedia Search (Firefox) Bookmarklet

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.

Source (math-www.uni-paderborn.de)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3As%3Ddocument.getSelection%28%29%3Bfor%28i%3D0%3Bi%3Cframes.length%3Bi++%29%7Bif%28s%29break%3Bs%3Dframes%5Bi%5D.document.getSelection%28%29%3B%7Dif%28%21s%29void%28s%3Dprompt%28%27Enter%2520search%2520terms%2520for%2520Wikipedia%27%2C%27%27%29%29%3Bwikiw%3Dopen%28%27http%3A//en.wikipedia.org/%27+%28s%3F%27w/wiki.phtml%3Fsearch%3D%27+escape%28s%29%3A%27%27%29%29%3Bwikiw.focus%28%29%3B


Rate it:


Tags:

Comments

Comments so far. Add yours.

TheLinx

Works great, no problems at all.


Kcmartz

Works great in Google Chrome as well!

Thanks!