Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Open Wikipedia Topic from Script Menu' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Open Wikipedia Topic from Script Menu
Authored by: vaughnsc on Fri, Jun 1 2007 at 9:58AM PDT
Yet another skinless cat with a nice touch:

I prefer the 'javascript in the bookmark bar' methodology and adapted the following Javascript lifted (in all fairness) from the Spanish Dictionary at rae.es - it has a twist: it can display a query dialog as expected, but will skip it if you've already highlighted (selected) a term in the frontmost browser window (useful when dealing with long phrases or convoluted, unfamiliar spelling):

javascript:Qr=window.getSelection();if(!Qr||Qr==''){void(Qr=prompt('Search%20Wikipedia%20for:',''))}if(Qr)location.href='http://en.wikipedia.org/wiki/'+escape(Qr)


Naturally, if you wish to direct the query to a non-English version of Wikipedia, it is a simple matter of tweaking the URL. You may also want to consider the previous comment of using WP's 'search' url instead of the less-forgiving 'article' URL.

[ Reply to This | # ]