Aug 19 2005

SE Hilite Javascript 1.2

Thanks to Alex for reporting the issue, I have updated my Search Engine Highlight Javascript to 1.2. Here are the changes:

  • Fix up the bug when search keyword containing partial match of ‘span class="hilite"‘.
  • Having an extra boolean flag Hilite.exact, whether the parser should perform exact match. Default to true, i.e. searching for “search” will not match “searching”.
  • Minor performance optimisation.

Download the latest version of Search Engine Highlight Javascript.

4 Comments

  1. Ken GC on 20 Aug 2005 at 12:32 am #

    Nice work! I came across your script just the other day, and was puzzled by the partial match problem.

    Although, now I am seeing a literal “$&” (dollar ampersand) in the display of Safari 1.3. How is that meant to work? Thanks!

  2. scotty on 20 Aug 2005 at 6:57 pm #

    I have not had a chance to test it on Safari 1.3 as I am still on Panther. However, it looks like the regular expression in Safari does not support ‘$&’ to substitude with group 0 in match.

  3. Alex on 23 Aug 2005 at 7:56 am #

    I realy like this script since it still allows me two write HTML. I hope its oke for me to cut out most the comments. This saves me 40% on the file size. (My users don’t need to download that.) I did leave the credits in. I kept the comments for my self in a se_…txt file.

  4. scotty on 23 Aug 2005 at 9:52 am #

    No problem. Do whatever you want.

    You can also trim it to fit into the your main HTML page, or together with other Javascript you have got on the site, so that it would involve less HTTP transactions to your server.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>