Sunday, 20. May 2007, 04:27:20
Highlight text
Hi,Does anyone know if there is a highlight text bookmarklet or userjs available.
Basically what I want is when I select some text on a page I want to
be able to make the text highlighted either by a right click menu entry
or by a button on the toolbar
cheers
blinky
Sunday, 20. May 2007, 13:38:51 (edited)
Well thanks very much for your reply and button. I find it works quite well.
I wondering if it would be possible to make it highlight the text as in the pic below.
highlight text.jpg
cheers mate
blinky
Monday, 21. May 2007, 12:09:52
How would I get this hi-lite to work in v8.5? I've fiddled about, but everything looks as though it's designed for v9+.
Like blinkybill I'll take either a button or context menu. I would really like to get this one, as it appears to duplicate an IE powertoy -- although that wraps the selected text with a <FONT></FONT> colour, which allows saving the page with the highlighting.
Gordon.
Monday, 21. May 2007, 13:10:55
Hi mate...yes its same as the Bayden IEToys which is what
I used for the above pic.
Actually the IEToys in IE7 is very similar to Opera's Hotclick
popup menu.
cheers
blinky
Tuesday, 22. May 2007, 12:25:19
<function () { var u=document.createElement('U');u.style='text-decoration:none;background-color:#FFFF12';getSelection().getRangeAt(0).surroundContents(u);getSelection().removeAllRanges()}();>
which gives the error:
Unknown thread
Syntax error C:\Program Files\Opera\userjs\Highlight.user.js: line 1 of User JS script :
function () { var u=document.createElement('U');u.style='tex
-----------^
when I start Opera.
blinkybill -- Yah, I found IE Powertoys and Dev-Tools when we had IE5.01. It opened a world of better browsing, I can tell you. I might use Opera for preference, but Micro$oft does indeed have some good stuff amongst all the rubbish!
Gordon.
Tuesday, 22. May 2007, 12:57:22
Off Topic:
Yes I have found them very good programs and even copied
some of their functions into a IE7 skin for Opera I have made.
For me having dial-up, Opera is the only way to go as IE7
is still somewhat slower on a lot of pages I browse.
You should try the latest Opera weekly builds as I generally
find them very stable and usable.
By the way mate where are you in Oz?....Brisbane here
cheers
blinky
Wednesday, 23. May 2007, 04:23:43
Button to Highlight the selected text: button
When you press the button, script will highlught the text and save that in Cookie and when you return to the page, script will read the cookie and highlight the text again !
Wednesday, 23. May 2007, 14:58:35
@Ayush - OK, I installed the "HighlightText.js", & finally figured out how to install the button
Highlight text - User JavaScript - Opera Community
http://my.opera.com/community/forums/topic.dml?id=190121
Javascript URL thread: "javascript[:]opera.HighlightText()" [I need to disable a smiley by inserting the []]
Error:
name: ReferenceError
message: Statement on line 35: Reference to undefined variable: getSelection
Backtrace:
Line 35 of User JS script
var sel = getSelection().getRangeAt(0);
Line 1 of unknown script
opera.HighlightText();
Just a quick reminder -- you don't need it I'm sure
Gordon.
Sunday, 13. July 2008, 08:04:11
Just the ticket works a treat, Question: Is there any better way or eadyer way of managing the cookies that the javascrip creates.
Tuesday, 25. November 2008, 10:26:35
Well, we finally upgraded everything: you-beaut 2.4GHz D845GE chipset in an OEM box, genuine paid-for W2K SP4, aaaannnndd... Opera 9.51
So, then I downloaded your "HighlightText.js" and your button to make it go -- and it does!!!!
However...
...
var U=document.createElement("U");
U.style="background-color:#ffff12";
sel.surroundContents(U);
...
but I don't think this really is responsible for the underscore.
I'd like to get rid of the underscore because it adds an emphasis probably not intended by the page author, and can inadvertently mask hyperlinks -- depending on how the author CSS'ed them.
Gordon.
Forums » Opera Community » General Opera topics » User JavaScript
