Does this work for you? It does seems to work for me. Not very thoroughly
tested... I may be re-inventing the wheel here but I haven't seen this
before on Wikipedia either.
Just create any old bookmark in your links & then copy and paste this text
into the Location / URL box (should be all one line).
Firefox:
javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('Enter word to
find in
Wikipedia:',''))}if(Qr)location.href='http://www.google.com…
+Feeling+Lucky&q=site:wikipedia.org+'+escape(Qr)
IE:
javascript:Qr=document.selection.createRange().text;if(!Qr){void(Qr=prompt('
Enter word to find in
Wikipedia:',''))}if(Qr)location.href='http://www.google.com…
+Feeling+Lucky&q=site:wikipedia.org+'+escape(Qr)
I just stole the m-w one and hooked up the google I'm Feeling Lucky, so it
may not work every time. I'm not sure there's a good way to guarantee that
it would work correctly every time, since we are currently relying on Google
for searching. If you remove the "btnI=I\'m+Feeling+Lucky" part of the URL
then you could go to the google results for that search. Not one-click, but
it would give you the chance to pick a good result.
I tried a few examples, and there are problems, for instance, searching on
"Ottawa Lynx" returns the "Ottawa" page and not the "Ottawa
Lynx" page as I
wanted. It seemed to work as anticipated for a few other searches I tried
though.
Regards and hope you find this useful! (Actually, I think I am going to find
it very useful too!)
Cheers,
Mark Jeays (User:Dze27)
-----Original Message-----
From: wikitech-l-bounces(a)Wikipedia.org
[mailto:wikitech-l-bounces@Wikipedia.org]On Behalf Of Marc Williams
Sent: May 31, 2004 6:41 PM
To: wikitech-l(a)wikipedia.org
Subject: [Wikitech-l] wikipedia lookup button
Please pardon me if this has been suggested before or if it
already exists.
I am in love with Wikipedia. What I, as a fairly new Wikipedia user,
would find terribly helpful would be a Wikipedia Lookup Button for my
browser similar to what Merriam Webster has:
http://www.m-w.com/button/
1) I'm reading something on the web that I would like to know more about
2) I highlight the phrase or word that I want to look up in Wikipedia
3) I press the Wikipedia browser button
4) Boom! I'm taken right to the correct Wikipedia page
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)Wikipedia.org
http://mail.wikipedia.org/mailman/listinfo/wikitech-l