Wikipedia bookmarklet for Opera 7.54?

  • Thread starter Gaikokujin Kyofusho
  • Start date
G

Gaikokujin Kyofusho

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
 
W

wolfgang zeidler

Gaikokujin said:
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<frames.length;i++)s=frames.getSelection().toString();
var w=window.open('http://en.wikipedia.org/'+
(s?escape(s.replace(/ /g,'_')):''),
'wiki','width=950,height=600,scrollbars=yes,resizable=yes');
w.focus();
 
S

Steven V. Gunhouse

Gaikokujin said:
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<frames.length;i++)s=frames.getSelection().toString();
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top