|
|
 | | From: | Gaikokujin Kyofusho | | Subject: | Wikipedia bookmarklet for Opera 7.54? | | Date: | 11 Jan 2005 19:44:50 -0800 |
|
|
 | Hi, I am trying to find a wikipedia bookmarklet for Opera that would allow me to lookup something highlighted on a page. I could have sworn that the one i had worked until i had to reinstall opera (why would that make a difference? all the other bookmarklets continued to work). Any help would be thoroughly appreciated, perhaps someone out there has written such a bookmarklet or knows where to find one? Thank you,
-Gaiko
|
|
 | | From: | wolfgang zeidler | | Subject: | Re: Wikipedia bookmarklet for Opera 7.54? | | Date: | Fri, 14 Jan 2005 00:56:47 +0100 |
|
|
 | Gaikokujin Kyofusho schrieb: > Hi, I am trying to find a wikipedia bookmarklet for Opera that would > allow me to lookup something highlighted on a page. I could have sworn > that the one i had worked until i had to reinstall opera (why would > that make a difference? all the other bookmarklets continued to work). > Any help would be thoroughly appreciated, perhaps someone out there has > written such a bookmarklet or knows where to find one? > Thank you, > > -Gaiko >
I don't know whether this bookmarklet fits in opera, you may try it: -----------
javascript: var s=window.getSelection().toString(); for(var i=0;!s&&ivar w=window.open('http://en.wikipedia.org/'+ (s?escape(s.replace(/ /g,'_')):''), 'wiki','width=950,height=600,scrollbars=yes,resizable=yes'); w.focus();
----------- Best regards, wz p.s.(1): I assume you know you'll have to remove the linefeeds. p.s.(2): Maybe you'll have to replace window.getSelection() with the ( deprecated ) method document.getSelection().
|
|
 | | From: | Steven V. Gunhouse | | Subject: | Re: Wikipedia bookmarklet for Opera 7.54? | | Date: | Fri, 14 Jan 2005 13:17:46 GMT |
|
|
 | On Fri, 14 Jan 2005 00:56:47 +0100, wolfgang zeidler wrote:
> Gaikokujin Kyofusho schrieb: >> Hi, I am trying to find a wikipedia bookmarklet for Opera that would >> allow me to lookup something highlighted on a page. I could have sworn >> that the one i had worked until i had to reinstall opera (why would >> that make a difference? all the other bookmarklets continued to work). >> Any help would be thoroughly appreciated, perhaps someone out there has >> written such a bookmarklet or knows where to find one? >> Thank you, >> -Gaiko >> > > I don't know whether this bookmarklet fits in opera, you may try it: > ----------- > > javascript: > var s=window.getSelection().toString(); > for(var > i=0;!s&&i> var w=window.open('http://en.wikipedia.org/'+ > (s?escape(s.replace(/ /g,'_')):''), > 'wiki','width=950,height=600,scrollbars=yes,resizable=yes'); > w.focus(); > > ----------- > Best regards, wz > p.s.(1): I assume you know you'll have to remove the linefeeds. > p.s.(2): Maybe you'll have to replace window.getSelection() > with the ( deprecated ) method document.getSelection().
"Fits" is not a serious issue in Opera. When actually used as a bookmarklet (in Bookmarks rather than as a button) the legal length is quite long.
If you were to drag it to a button, then (besides length) you also have to insure that you don't use any double quotes. In some of the early versions of 7 it would also have trouble with "|", "&" or ">", but I believe they've fixed that issue.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
|
|
 | | From: | Lee Harvey | | Subject: | Re: Wikipedia bookmarklet for Opera 7.54? | | Date: | Wed, 12 Jan 2005 01:38:02 -0500 |
|
|
 | Gaikokujin Kyofusho wrote: > Hi, I am trying to find a wikipedia bookmarklet for Opera that would > allow me to lookup something highlighted on a page. I could have > sworn that the one i had worked until i had to reinstall opera (why > would that make a difference? all the other bookmarklets continued to > work). Any help would be thoroughly appreciated, perhaps someone out > there has written such a bookmarklet or knows where to find one? > Thank you,
Here's a few I found while googling:
http://www.lafferty.ca/stuff/misc/wpbk.html http://math-www.uni-paderborn.de/~axel/bookmarklet.html http://subsimple.com/bookmarklets/collection_search.asp#WikipediaLookup http://en.wikipedia.org/wiki/Wikipedia:Searching#Advanced:_Wikipedia_search_field_for_Opera_browser >
I suspect that at least one of the above will give you a head-start in recreating the one you had.
GL & HTH
|
|
 | | From: | Steven V. Gunhouse | | Subject: | Re: Wikipedia bookmarklet for Opera 7.54? | | Date: | Wed, 12 Jan 2005 06:45:51 GMT |
|
|
 | On Wed, 12 Jan 2005 01:38:02 -0500, Lee Harvey wrote:
> Gaikokujin Kyofusho wrote: >> Hi, I am trying to find a wikipedia bookmarklet for Opera that would >> allow me to lookup something highlighted on a page. I could have >> sworn that the one i had worked until i had to reinstall opera (why >> would that make a difference? all the other bookmarklets continued to >> work). Any help would be thoroughly appreciated, perhaps someone out >> there has written such a bookmarklet or knows where to find one? >> Thank you, > > Here's a few I found while googling: > > http://www.lafferty.ca/stuff/misc/wpbk.html > http://math-www.uni-paderborn.de/~axel/bookmarklet.html > http://subsimple.com/bookmarklets/collection_search.asp#WikipediaLookup > > http://en.wikipedia.org/wiki/Wikipedia:Searching#Advanced:_Wikipedia_search_field_for_Opera_browser > > > > I suspect that at least one of the above will give you a head-start in > recreating the one you had. > > GL & HTH > >
Of course, with any of these the question is whether you'd like the bookmarklet to open in the same page. If it opens in a new page, then you may need to allow popups.
It should be possible to define a button or context menu item (or to edit search.ini) to do the same thing, and avoid the "allow popups" issue in the process.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
|
|
|