Saturday, 12. November 2005, 18:31:04
Ultimate Highlight JS version 2.5
Ultimate Highlight JS. WARNING: Might be funky with 9.0 TP1.Main features:
-Automatically highlight keywords from Google results (if page is selected from Google results).
-Highlights multiple keywords in different colors at any time.
-Shows detailed search results in a floating div.
-Remembers search queries with cookies.
-Works in frames.
-Customizable with variables.
Installation:
1- Download the script uhb2.5.js in your UserJS directory.
2- Drag the following link to any toolbar (except personal bar): button
3- (Optional) Assign action Go to page, "javascript:UltimateHighlightKeywords('%t')" to a keyboard or mouse shortcut.
The button must be located to the right of an Opera search field if you want to use input from that field. You can also input your text in the address field.
What's new in 2.5?
-Bigger buttons.
-Font issue fixed
-Output now says "not found" instead of 0.
-Cookie name is obfuscated.
-Global vars and functions are obfuscated.
-URL recognition is better.
-Highlight() and HighlightKeywords(k) functions renamed to UltimateHighlight() and UltimateHighlightKeywords(k) to make it unlikely they would interfer with webpages.
IMPORTANT NOTE: If you used an older version of UHB before, YOUR OLD TOOLBAR BUTTON WON'T WORK. Use the new one. button
Go to [url]http://nontroppo.org/wiki/UHB for version details.
Check the old forum post for tips and tricks.
Edit:
uhb2.5.js
Monday, 14. November 2005, 04:40:37
Would you be able to add an option to strip Google's stop words when auto highlighting from a Google search? This is so that it will be more inline with what Google does when it highlights cached pages and doesnt cause colour mismatches between your script and Google's highlighting.
Something like this?
function StripGoogleStopWords(text) {
text=" "+text+" ";
return text.replace(/ (I|a|about|an|are|as|at|be|by|com|for|from|how|in|is|it|of|on|or|that|the|this|to|was|what|when|where|who|will|with|and|the|www) /gi," ");
}
Called after the text=decodeURI(text) statements on line 304 and 311 of the script?
Cheers for the update
Monday, 14. November 2005, 23:32:06
However, I don't prohib you or anyone to change it the way they like it better.
Much of the changes from 2.5 were made to make my script "acceptable" for userjs.org, not much more.
Thursday, 17. November 2005, 22:54:30
FYI, it seems that 8.50 and 9.0tp1 are handling UHB in different ways.
You might have a look into a issue I experienced and described here:
http://my.opera.com/community/forums/findpost.pl?id=1227013
Friday, 18. November 2005, 20:18:44
Sorry for the inconvenience.
Saturday, 24. June 2006, 17:42:46
see the screenshots:
original: [img]http://img470.imageshack.us/img470/6755/uhboriginal9ke.png
Highlighted: [img]http://img470.imageshack.us/img470/4715/uhbhighlighted9cw.png
After Highlights switched off: [img]http://img470.imageshack.us/img470/885/uhbhighlightsswitchedoff0vu.png
As you can see some of the text gets scrambled...
Forums » Opera Community » General Opera topics » User JavaScript
