The Ultimate Highlight JS

This advanced User Javascript allows you to highlight multiple keywords on any webpage.

USH - Ultimate Search Highlighter (Opera 8, 9) (by Stoen)

Download: Ultimate Search Highlighter (USH)
Read instructions from the first post.

USB - Ultimate Search Bookmarklet (Opera 8 only)

Newest version just above.
OLD Archived previous version

Categories

CategoryOpera

Backlinks:
Comments [Hide comments/form]

Is there a way of making these buttons work if you have "reuse existing page" unchecked?

SpW (2005-03-08 14:00:26)

There's a way to make it work without "reuse existing page". Put the bookmarklet on your personal toolbar and instead of clicking it, DRAG it to the webpage you're viewing, that should do the trick.

LuChio (2005-03-09 16:11:25)

To anonymous poster: Could you send me your modification at luch3 over at hotmail.com (in an attachment) to make it work in UserJS? I would integrate it in this page.

LuChio (2005-04-19 15:00:33)

@ LuChio

I emailed you the small modifications i made to UHB.

Something to note is that the technique of using

Button, "Highlight"="Search, "javascript:getHighlightKeywords('%s');", , "Highlight"

can be utilised to run not only this script, but any script without having to enable 'reuse existing page'.

The search is always run within the current window regardless of the status of the above setting.

However, there are some limitations to this:
1) the javascript address must utilise %s in some way. This can be done by using a simple

var tempSearchVar='%s';

somewhere in the address.
2) the %s string cannot be empty, otherwise the search will not be run. This means that not only must there be an input field on the same toolbar as the button that call the search, but that the input field cannot be empty.
This is not that big a problem, since for example the address bar and the zoom dropdown can be used as dummy entries. This can also come in handy if you need to read the values of the page zoom (can make an image zoom function to zoom images independently of page zoom) or address (many uses) for your script.

210.50.133.26 (2005-04-20 08:16:21)

I am unable to use this utility to search and highlight numbers. The error results in 5 parrallel lines being drawn to infinity to the top right of the page. Thanks for your help

159.91.138.133 (2005-04-25 09:42:28)

Quote:


What to pray for in future releases

These are features I might implement in the next releases. Don't get your expectations too high, might is the keyword here. In order of priority:

Bug with searching numbers.


It'll probably/hopefully be fixed in UHB 1.6/2.0, which is expected to be released "very soon".

HermeN (2005-04-25 10:21:31)

Hm, Fit to Width does not seem to work properlly here, bummer.

Must I use a button? I thought that with UJS, it'll automatically apply the colouring to my search results, that it just 'works' in the background w/out me needing to 'activate' it...

YtseJam (2005-04-27 15:41:03)

It doesn't work here. I followed your instructions precisely, also. :-\

68.112.177.237 (2005-04-27 20:55:46)

Installed the UserJS version. Good stuff.

However as far as i can see, the problem with the search field being empty has not being resolved and is something that is inherent to the search command, correct me if i am wrong.

A work around is to change the button to:

Button, "Highlight"="Search, "javascript:HighlightKeywords?('%s');", , "Highlight" | Go to page, "javascript:Highlight();""

However this breaks the ability for it to be used without reuse existing page

Also by using UserJS you lose the ability to use the highlight on https: pages

210.50.179.117 (2005-04-28 03:46:53)

Hi... I followed the instructions precisely, but it doesn't work. When I just installed it, it's fine, but after a Opera restart, only the google-term highlighting function is working. Clicking on the UHB symbol doesn't do anything, on any kind of page.
But for some reason, other bookmarklets also don't work after I restart Opera, it's weird (for example the increment/decrement on http://www.squarefree.com/bookmarklets/misc.html ). Any Tips?
Thanks, bye

212.202.206.136 (2005-05-05 03:14:02)

Really wondeful!
Two little things I miss:
1. If you search for '"words together"' it tries to highlight '"words' and 'together"' instead of 'words together'
2. If you serch for 'words-together' it tries to highlight only exactly that instead of 'words together' and 'wordstogether' and 'words-together' (these three are the results which google finds when you search for 'words-together')

I'm really a noob to JS, so I'm not able to change the code to do that.

GuN (2005-05-12 03:23:14)

Thank you for your comments. However, keep in mind that this "software" is provided as-is, with no support. I try to address specific issues, and 2 weeks ago, I have modified the instructions to reflect problems some people had. All I can say is that the installation procedure is now proven to work, and if you have a problem, please verify that you have done all the steps correctly. All suggestions or improvements to these instructions or to the code are welcome.

@GuN: "words together" is something I wish for too. I also hope for future versions to support this kind of search, but I can't provide a timeline because "multiple words search" requires major changes through out the code and I have a time-straint schedule right now.

I would also like suggestions about CSS formatting of the search results that appear in the top corner. I want something not too flashy, but nicer than the current blue text/plain white background, and something that would still fit with many color schemes. What kind of stylesheet would you like?

24.122.45.69 (2005-05-15 11:48:16)

I wasn't logged in, but the last comment is mine.

LuChio (2005-05-15 11:50:43)

Strange, it's not blue on white for me. It uses the text style of the currently viewd page, which sometime results in unreadable text, for example on pages which use dark background with bright text

GuN (2005-05-15 12:02:12)

you're right, i said blue because it's the default link color for many pages. And, as you said, this sometimes makes text unreadable because of the white bg. That's the main reason why I want to have a new style that doesn't use defaults.

LuChio (2005-05-17 18:08:38)

Would be nice to have the capabilities to move as well backward from one occurrence to another one (currently from what I experienced only forward move is possible...)
This could be implemented simply, for example clicking on the total occurrence (ie. first figure in "9 / 8") would move forward, while cliking on the second figure would move backward. Of course, any other trick would be acceptable ;-)

Anyway, thanks for this "killer" script, I wonder how I could live without it till I discovered version 1.5, which was terribly improved since then. So thanks a bunch.

Jean-Marc

82.216.170.73 (2005-06-08 13:11:41)

Merci bien Jean-Marc, content de voir que tu apprécies! (Nice to see that you like my work!)

I'll add your suggestion to my list of stuff I should to do. (That list never shrinks!)

LuChio (2005-06-09 09:55:21)

i'd love the ability that the search-result would stay on page when navigating to another page and updating itself to the news content of the page...

this change would be really usefull

regards

62.47.154.179 (2005-06-24 09:17:29)

A bug!?

Search on google for:

philips kala 300 manual

Follow the 4th link "Sean McGrath?, CTO, Propylon" (seanmcgrath.blogspot.com/2004_03_14_seanmcgrath_archive.html) and observe...

Bye the way, great script...

Regards

193.198.136.107 (2005-09-08 12:22:27)

Hi - I'm trying to find the uhb.js.txt file, but it seems nowhere to be found. I've looked on the Opera forums:

http://my.opera.com/community/forums/topic.dml?id=89211&t=1126616219&page=2#comment949574

But when I look through all the posts, there's no where to download it! Anyone have an idea where I can get it? If so, please e-mail me and let me know.

Rgs,

Aurangzeb
ama-misc at mltp dot com

205.172.241.12 (2005-09-13 05:58:28)

This IS great! Now, finally, it is time for me to switch to Opera. Thanks very much! This tool is one of the most useful inventions in websearching history.

Regards
steig

80.135.129.206 (2005-10-07 20:29:23)

Hello :-)

Decided to post this here too since I don't know if your e-mail will work and I need to get this resolved soon and hoping others will see this too and know what to do.

I'm having trouble with the Opera browser add on as seen here.

http://nontroppo.org/wiki/UltimateHighlightBookmarklet

The problem is that on the site seen here (don't let the URL fool you, it goes to the clean section)

http://fchan.hentaiplanet.net/c/

the highlight script seems to not want to pick up on single number dates. For example, if I enter this into the box that appears when I click the highlight button on my start bar

"oct 30" "oct 31" "images omitted"

Then every oct 30, oct 31 and images omitted gets highlighted. But then yesterday when I entered

"oct 31" "nov 1" "images omitted"

Only oct 31 and images omitted was highlighted, even though nov 1 was on the page. I got the similar results today when I entered this

"nov 1" "nov 2" "images omitted"

Noticing that ctrl+f picked up on the nov 1 in the little window that appears when I use the highlighter, I tried highlighting nov 1 on the page with the mouse cursor, copied it and pasted it into the box that appears when I click the highlight button on my start bar and added quotations. I still got no results. In trying to get it to work myself, I found that entering just nov worked and entering just 1 worked, but entering " 1" did not work. On my final try, I entered "oct 31" and "nov 1", the highlighter got every oct 31 on the page, but none of the nov 1's.

I did reload the page before each try. What might be wrong that the script won't work with nov 1, nov 2, etc. and what can I do to fix it? My e-mail is Rufinoform@aol.com

--
Take care!  Hope to hear from you soon!  Wuff!

Cloudchaser Benjamin Shaconage, a chocolate, peanut butter, pizza & anthrovixen lovin' Rainbow Wolf (non-gay/bi)

69.241.50.249 (2005-11-02 16:13:16)

I just found that in another section of that same site, one that uses 11/01 for example instead of nov 1, the highlighter works fine. Just before making this post, I went to a part of the site where the highlighter's not working properly, posted nov1 nov/1 nov/01, then used the highlighter, entering "nov1" "nov/1" "nov/01" and the highlighter found those. I started to think that there's something about spaces that the highlighter has decided it doesn't like, but "images omitted" also works fine.

69.241.50.249 (2005-11-02 18:04:33)

Great tool.

Is there anyway to hook this up to Opera's CTRL+F find?

24.85.82.39 (2005-11-05 20:55:41)

can anybody make search engine (now google only) customizable for example like this:

var engines=[
  {
      name:"google",
      template:/^*.google.com.&$/ig, 
      extractSeacrhString:/q=(.*)/
  }  
];

MaxBelugin (2005-11-17 08:09:00)

Sooooo useful. Works on almost all pages, but here's one that doesn't work (provided to help you test):

http://www.ahec.edu/phone/index.htm

Matt

68.102.30.119 (2005-12-15 19:49:30)

Luchio,

Thanks for this great tool I'm using for a while. Hwoever, I think I found an issue with the Google results highlight: indeed if one use "site:domain.com" in her/his Google query (ie. to narrow the search to a specific site), the results will _not_ be highlighted!

See by yourself, with this first non-narrowed query, results highlight is OK:
http://www.google.com/search?complete=1&hl=en&lr=&q=ultimate+highlight+luchio+&btnG=Search
now with the same query narrowed to nontroppo.org, results are no longer highlighted:
http://www.google.com/search?complete=1&hl=en&lr=&q=ultimate+highlight+luchio+site%3Anontroppo.org&btnG=Search

Any clue to fix this? (I tried to have a look, but I'm far from a JS expert, and finally gave up ;-)

Thanks in advance

Jean-Marc

194.3.183.35 (2006-02-15 09:19:40)

Problem is in the regexp.
Try changing the location regexp to

location.hostname.match(/(^|\.)google\.(([^\.]+|[^\.]{2,3}\.[^\.]{2}))$/)

and the referrer regexp to

document.referrer.match(/(^|\.)google\.(([^\.]+|[^\.]{2,3}\.[^\.]{2})/.*)$/)

This should also fix problems with localised google searches

202.7.166.171 (2006-02-15 14:46:50)

Thanks for the tips, but.. well tried them, but don't work. Even worse: with these changes even the first sample query (of my previous post) ends up with no highlights.
BTW, could you shed some light on the presence of the nontroppo URL in the referrer regexp? Sounds weird to me.

I also noticed your suggestions are very close of what is done in the UHB version available on userjs.org, which is not exactly the same as the one on this page, and has the following misbehaviors: no Google results highlight (in all cases), and no support for quoted strings.

Jean-Marc

194.3.183.35 (2006-02-22 01:02:50)

Not sure what you mean by the nontroppo url. Which referrer regexp are you referring to?

I hadnt seen the script at userjs.org. You should probably use that version as it is newer and has a number of fixes in it.

I really dont know why it wouldnt work, are you sure you have referrer logging enabled? What is the url of the google search you are using? Are they just the searches in your previous comment? Not the actual link which has been modified by the wiki but just the text of the link? If so then they work fine here

202.7.166.171 (2006-02-25 01:46:53)

>Not sure what you mean by the nontroppo url. Which referrer regexp are you referring to?

hmm... well either I turn mad ;-), or it is this wiki, but I'm pretty sure there was a reference to a nontroppo URL in your above suggestion for the referrer... But anyway, it is no longer here, so I retried with currently present suggestions, and it works, thanks for your help.

194.3.183.35 (2006-03-01 01:58:24)

It would be nice if I could choose words to ignore, such as 'or', and search modifiers like site: filetype: inurl: etc..
I know little about Javascript, any wizards out there have ideas/feedback? Am I the only one that this bothers?
OR could be ignored too if there was a case-sensitive search option, or an option to not highlight parts of words. (so the or in for, offshore, etc, wouldn't get highlighted and clutter the page..)
Thanks for your help/thoughts/etc! -<a href="@http://atothet.com/">@</a>

137.150.102.118 (2006-05-01 23:46:15)

same problem with messed up text here.
seems having something to do with font types or size or spacing or something. but i dunno.

btw: you can get rid of it by reloading the page. when you come from a google search you have to click in the adressbar and hit enter to reload the page as the search is started by referrer otherwise.

nevertheless this plugin is great!

87.162.208.141 (2006-06-25 01:33:13)

very best job

125.76.226.12 (2008-07-14 07:07:42)

far.txt;3;3

193.235.140.231 (2008-08-03 03:27:37)

far.txt;3;3

218.189.70.117 (2008-08-03 20:24:52)

far.txt;3;3

164.116.224.10 (2008-08-04 01:31:03)

Cool site,

222.29.46.195 (2008-08-04 09:59:34)

comment3,

62.149.67.49 (2008-08-26 16:40:53)

comment1,

69.63.64.85 (2008-10-06 11:18:04)

comment2,

124.64.195.135 (2008-11-19 19:45:16)

comment4,

212.56.209.66 (2008-11-20 02:21:53)

comment6,

168.172.251.253 (2008-11-20 04:44:23)

comment1,

72.174.152.144 (2008-11-20 11:22:39)

comment5,

211.161.197.182 (2008-11-20 13:24:04)

comment6,

221.218.214.119 (2008-11-20 16:57:14)

comment3,

72.20.6.94 (2008-11-20 18:47:44)

comment2,

201.223.169.161 (2008-11-20 20:44:04)

Privet, <a href=" lesbiansvozs.vidilife.com ">kissing lesbians</a>, 8-O,

66.98.144.78 (2008-12-15 04:20:08)

ePzy7o Soft, [url=" lesbianrcji.vidilife.com "]real amateur old with young lesbians[/url], 471, [url=" lesbianpovo.vidilife.com "]lesbian games[/url], %-(((, [url=" lesbian_aqgd.vidilife.com "]hardcore lesbians[/url], 426620,

210.23.249.34 (2008-12-15 05:51:02)

My site is great,

75.180.26.184 (2008-12-26 10:47:55)

My site is great,

85.186.35.217 (2008-12-26 10:48:19)

Sorry for my post,

70.45.170.46 (2008-12-26 15:17:02)

Hello, thx for all,

91.121.28.113 (2008-12-26 19:35:45)

Hi. Good site.

196.25.52.36 (2008-12-31 18:57:20)

Hello, thx for all,

91.121.159.202 (2009-01-03 07:31:46)

Privet,

200.84.35.221 (2009-01-03 08:05:04)

Hi, good site,

217.219.86.148 (2009-01-03 11:41:10)

Privet,

125.65.113.53 (2009-01-03 15:21:21)

My site is great,

217.167.7.6 (2009-01-04 22:34:23)

My site is great,

88.81.227.30 (2009-01-05 00:41:16)

Hello, thx for all,

121.246.84.197 (2009-01-05 05:00:24)

Hi, good site, [url=" wxmqgsur.vidilife.com "]diskeeper 2009 crack[/url], fkhzfa, [url=" gxxxasaue.vidilife.com "]crack webcammax 5.0.4.8[/url], >:OO, [url=" pzlnerwg.vidilife.com "]teracopy pro keygen[/url], >:-DD,

200.192.77.251 (2009-01-20 03:19:43)

out.txt;3;3

64.22.118.170 (2009-02-03 09:48:19)

out.txt;3;3

58.85.96.49 (2009-02-03 11:38:42)

out.txt;3;3

89.169.132.25 (2009-02-03 13:26:36)

out.txt;3;3

122.88.81.110 (2009-02-03 15:17:31)

out.txt;3;3

220.245.166.45 (2009-02-03 18:59:02)

out.txt;3;3

130.63.177.192 (2009-02-03 22:55:23)

out.txt;3;3

220.72.71.220 (2009-02-04 00:55:20)

out.txt;3;3

61.64.56.42 (2009-02-04 03:03:48)

7AyHDC onfyprgv xmyvrwhs tvyfkxvt

89.248.172.50 (2009-07-27 20:05:03)

wsqjrbgv urrzigyu hreuwprr

95.169.190.71 (2009-07-31 17:11:48)

syunfrcl dysagdfq zmsfoffd

95.169.190.71 (2009-07-31 18:32:50)

rzhcdzyn ceezbcjp obptkjad

95.169.190.71 (2009-07-31 19:53:44)

uorcoejc ukcckvaz kssyvxpp

95.169.190.71 (2009-07-31 21:13:58)

lswfvxte xbdfnrbb paqiwwaq

95.169.190.71 (2009-07-31 22:34:15)

jhjdwekg xogddmui hbzkcsmb

89.248.172.50 (2009-08-09 06:42:33)

puvtfwbg spxdcubh rlncrpyc

89.248.172.50 (2009-08-09 08:08:33)

nnmdlpog ahpmqacx gofzyglo

89.248.172.50 (2009-08-09 09:33:36)

olzrqiyx dgrosqum dszpczdw

89.248.172.50 (2009-08-09 10:56:49)

itznsdan scyajnbp hlrqavni

89.248.172.50 (2009-08-09 12:20:11)

dyloxelx stfwsohq ocyzybaa

94.102.49.213 (2009-08-14 00:49:49)

tfyjrtok fhoehkwu orztdisp

94.102.49.213 (2009-08-14 02:14:06)

privbbhi nqmhcpzx cturjhef

94.102.49.213 (2009-08-14 03:37:54)

pbbkzjxw jpxdtbma segzdnbi

94.102.49.213 (2009-08-14 05:02:17)

vwtmupeg hgiffqze etpnwccy

94.102.49.213 (2009-08-14 06:29:02)

uxoypxyf fchedvvh kesuzuwk

94.102.49.213 (2009-08-14 07:56:45)

dliwsxmb jbuplwsb wlamlepc

94.102.49.213 (2009-08-14 09:24:57)

kozorglt grflpncf dokcqnfu

94.102.49.213 (2009-08-14 10:50:29)

dzbplclq wimcmbxz godffzos

94.102.49.213 (2009-08-14 12:13:22)

hxxqfmej zlruxkjh sckxzqwv

94.102.49.213 (2009-08-14 13:36:27)

leidkovd ohzjtcan hrenccjw

91.121.84.111 (2009-08-17 21:44:21)

xppnpcag ntomlmid azvrxoew

91.121.84.111 (2009-08-17 23:23:26)

wwdyoabq msayrtvk xwsyychz

91.121.84.111 (2009-08-18 01:04:25)

qoyzjwdg yzclmciz auzqrtml

91.121.84.111 (2009-08-18 02:47:06)

etumhyzj gjiloqet xkcyzdul

91.121.84.111 (2009-08-18 21:01:38)

kfiajlsk mglwpppw qjfgxsrr

91.121.84.111 (2009-08-19 01:48:33)

anxlqarf lijikbcl pzlvqtwk

91.121.84.111 (2009-08-20 17:11:26)

avofgxte fnaoflvp urfqxwhg

91.121.84.111 (2009-08-20 23:11:06)

skxlwqsv inaojlgo fgsovspt

91.121.84.111 (2009-08-21 05:06:10)

oghrjrdv bpjrwsgb npruccyz

91.121.84.111 (2009-08-21 11:05:20)

jjnsmuvw osatmkue hdgvlbei

91.121.84.111 (2009-08-21 15:30:59)

dlwzkzdn cgqhbqhn nxlxgksh

91.121.84.111 (2009-08-21 21:28:51)

faykzdaa jpreymgs apopqmoj

91.121.84.111 (2009-08-22 11:49:20)

juzvsjwy qeegdfqy omxwdces

91.121.84.111 (2009-08-22 13:36:37)

jrvgimgn lkzryojq luqwdmcz

91.121.84.111 (2009-08-28 13:28:30)

coecitij nzrrhsud gioxmaym

91.121.84.111 (2009-08-28 15:06:13)

htgwxowv eeuqvodw obhrbuzv

91.121.84.111 (2009-08-28 16:44:39)

gtfmttaa ywqwfidd cuqmgjwc

91.121.84.111 (2009-08-28 18:26:42)

zphgispt jobkjpzm nxbzwajf

91.121.84.111 (2009-08-28 20:05:56)

tbqbrglk ynfhrsum uolrrxkp

91.121.84.111 (2009-08-28 21:45:40)

feetvduk ztgnjrvk rpdabatm

91.121.84.111 (2009-08-28 23:22:45)

dgrslzqm nerhbaur mvjgxdqf

91.121.84.111 (2009-08-29 00:59:43)

bjkskgvy vwbfrfiu cwioimhh

91.121.84.111 (2009-08-29 02:38:27)

uivbywhu pxcsfkec alrhsxdt

91.121.84.111 (2009-08-29 04:17:01)

Very nice site!

125.67.9.36 (2009-10-03 01:55:36)

Kudos to you! I hadn't tohhugt of that!

217.173.232.58 (2011-07-28 07:31:09)

3jDjfK Yeah !... life is like riding a bicycle. You will not fall unless you stop pedaling!!....

193.105.210.170 (2012-02-12 04:13:20)

1.txt;10;15

89.252.58.228 (2012-09-07 10:18:19)

1.txt;5;10

89.252.58.228 (2012-09-07 15:01:58)

comment5,

89.252.58.228 (2012-09-08 08:11:16)

comment2,

89.252.58.228 (2012-09-08 09:04:43)

comment3,

89.252.58.228 (2012-09-08 09:57:26)

comment2,

89.252.58.228 (2012-09-08 10:50:20)

comment1,

89.252.58.228 (2012-09-08 11:43:58)

comment6,

89.252.58.228 (2012-09-08 12:37:18)

comment6,

89.252.58.228 (2012-09-08 13:30:08)

comment2,

89.252.58.228 (2012-09-08 14:24:27)

comment3,

89.252.58.228 (2012-09-08 16:09:58)

comment3,

89.252.58.228 (2012-09-10 23:32:13)

comment1,

89.252.58.228 (2012-09-11 00:26:21)

comment6,

89.252.58.228 (2012-09-11 01:19:51)

comment1,

89.252.58.228 (2012-09-11 02:13:31)

comment6,

89.252.58.228 (2012-09-11 03:07:12)

comment3,

89.252.58.228 (2012-09-11 04:00:41)

comment6,

89.252.58.228 (2012-09-11 04:56:31)

comment6,

89.252.58.228 (2012-09-11 05:53:42)

comment5,

89.252.58.228 (2012-09-11 06:50:40)

comment4,

89.252.58.228 (2012-09-11 07:44:04)

Aq5P8P? Major thankies for the blog post. Awesome.

192.162.19.11 (2012-10-19 07:27:49)

aDhvLi Very neat post. Really Great.

193.105.210.170 (2012-11-04 12:31:26)

t4JYBy Thanks again for the post.Really looking forward to read more. Great.

193.105.210.170 (2012-11-04 15:22:53)

This is extremely helpufl post. I think just like us it would have saved hours of time for everyone else. Keep up the creativity and professionalism with which you are writing. I have subscribed to your RSS post too. Regards, website design services This is very timely post. I think just like me it would have saved hours of time for everyone else. Keep up the creativity and workmanship with which you are posting. We have connected to your RSS post too. Regards, web design

31.170.112.22 (2012-12-09 21:18:58)

fuOL2L Im thankful for the post.Much thanks again. Really Cool.

91.201.64.7 (2013-01-31 09:28:39)

You have a wonderful site here that was a quality read for me. Good info! Thanks!

46.4.232.161 (2013-05-01 12:47:24)

This web site is really a walk-through for all of the info you wanted about this and didn’t know who to ask. Glimpse here, and you’ll definitely discover it.

64.251.26.166 (2013-05-02 21:40:43)

4WtmxD Enjoyed every bit of your blog.Thanks Again. Really Cool.

46.161.41.7 (2013-05-14 05:57:58)

Add a comment to this page (use wiki formatting if needed, no HTML/BBCode please). Only registered users can submit links, your comment will be deleted otherwise: