No highlighting in searchhi

A chap mailed me to say: is it possible to have your searchhi JavaScript library, which automatically highlights things that the user searched for if they came to your page from Google or similar, not highlight some bits of the page like the navigation section?

Good idea, I thought. So the library has now been updated to allow you to do precisely that: stop highlighting bits if they’ve got a class of nosearchhi. Thanks to Helmut Lorenz for the idea!

3 Responses to “No highlighting in searchhi”

  1. Well, while this on the surface seems like a good idea, I’d really prefer a solution where you would define it in the javascript. “nosearchhi” isn’t really a good description of any element, and then it’s only a tad better than inline js, in my opinion.

    Maybe I should consider editing the script to a more unobtrusive use.

    Anyway, searchhi is still a great and very useful script.

    holst
  2. blimey. I was wishing for something like this only yesterday. I owe you a bevvy.

    bruce
  3. holst: true enough. I could make the class be “infrastructure” (which clearly wouldn’t want to be highlighted, as opposed to “content” which would), but it bespeaks a certain amount of hubris. Making it happen from JS would require people to add a load of code to the top of their pages, which would be deeply infuriating to non-coders.

    sil

Leave a Reply

OpenID is a decentralised authentication system. If you use LiveJournal or Vox you already have an OpenID; just use the URL of your homepage there. See also how to get yourself an OpenID.