Those Words Were Where Now?

Few things are more irksome than clicking through on the number one or two ranked result of a keyword search only to find yourself adrift in twenty screens of text, poking hopelessly about for even one of the searched terms promised by the indexer.

Let Searchlite v 0.1.1 blaze the trail to your results.

Searchlite's DHTML components add coded keyword highlighting to instances of searched terms occurring in a page accessed via a commercial search engine or local site search utility.

Unlike many existing search utilities, Searchlite DHTML components apply transformations directly to the page as hosted on the originating site.

Users never need to hit a back button, never need to open a new window, and except for highlighting, all page content, including links and images display and function just as they otherwise would when viewed on the host site.

In additon, unlike most browsers' built-in search utilities, Searchlite doesn't force users to re-type their search terms and can help locate multiple terms in a single pass.

Searchlite components are available in 3 convenient formats: (1) Greasemonkey 0.3.3 User Script (SSE); (2) MSIE/Netscape Bookmarklets; and (3) Stand-alone .JS Site Extensions

Read on to see which Searchlite Tool(s) might be right for you.

Searchlite 0.1.1 User Script

The Searchlite Greasemonkey 0.3.3 User Script is a context specific extension that adds Searchlite DHTML functionality to page contents whenever the Searchlite SSE determines the file has been accessed from within search engine results. Searchlite SSE is compatible with most major commercial search engines (Google, Yahoo, MSN, AOL et al.), and can be configured by advanced users to work with the results of virtually any search utility.

The Searchlite 0.1.1 User Script requires Firefox 1.0 and the Greasemonkey 0.3.3 extenstion.

Searchlite 0.1.1 Bookmarklet

Searchlite IE/Netscape Bookmarklets add Searchlite DHTML functionality to your bookmarks menu or favorites bar. Unlike Searchlite GM, Searchlite Bookmarklets can be run only when you want or need them and, in addition to Firefox, are compatible with most modern IE/Gecko browsers.

Searchlite Bookmarklets require MSIE 5+ (Mac, Windows), NN 6+, or any version of Firefox, Mozilla, Camino or Safari.

Searchlite 0.1.1 Site Extension

The Searchlite 0.1.1 Site Extension allows developers to add dynamic keyword highlighting functionality to pages on their own site in order to assist their visitors in locating information originally flagged by a remote or local search engine. Library components are plug-and-play (and can typically be added to an existing global.js file in a matter of seconds).

The Searchlite Site Extension is compatible with a variety of popular search engine utilities and can be custom configured to add Searchlite DHTML functionality to pages accessed on your site via the results of Google domain specific searches (including those originating in custom Google search box on your site or homepage).

Bugs-A-Poppin

  1. JavaScript Conflicts: Searchlite v 0.1.1 Bookmarklets and User Scripts may interfere with local JavaScripts that include one or more of the searched terms in their source code. Although Searchlite will function normally, its DHTML components may partially overwrite, and thereby disable, local scripts.
  2. MSIE (Macintosh) Showstopper: Searchlite v 0.1.1 MSIE Bookmarklets expose what appears to be, in part, a memory leak and, in part a bug in the Mac MSIE 5 document.location object. As a result, following several executions of the Searchlite v 0.1.1 bookmarklet, MSIE 5 (Macintosh) may exhibit panic and abruptly quit.


Technical Details

Searchlite is powered by brute force DHTML and JavaScript regular expressions.

Searchlite recovers the searched term(s) and other original parameters from among the key/value pairs embeded in query string portion of the document.referrer property.

qparams=unescape(document.referrer).replace(/\+/g,' ').replace(/^.+\?/,'').split('&');

If searchwords are successfully recovered, Searchlite applies a series of regular expressions to:

  1. Capture and temporarilly replace all html markup;

    xtags=bstring.match(/<[^>]+>/g);
    bstring=bstring.replace(/<[^>]+>/g,'{TAG}');

  2. Replace all plain text instances of the searched term(s) with coded markup;

    xexp="<span>"+swords[i]+"<\/span>";
    exp=eval("/"+swords[i]+"/ig");
    bstring=bstring.replace(exp,xexp);

  3. Restore the original html markup; and

    for(h=0;h<xtags.length;h++) {
       bstring=bstring.replace("{TAG}",xtags[h]);
       }

  4. Render the transformed page.

    document.body.innerHTML=bstring;

The Searchlite Greasemonkey User Script Port provides the richest feature set.

However, in addition to Firefox, the core JavaScript (ECMAScript) components are compatible with Internet Explorer (MSIE) as well as a variety of Gecko based browsers (including NN6+, Mozilla, Camino and Apple's Safari)

A Searchlite 0.1.1 Bookmarklet Port is available for these browsers, but -- owing to space constraints -- omits several features including, at the moment, the use distinct highlight colors for each of the searched terms.

 

 

 

 

© 1998-2005 SophiaKnows.Com