Highlight and Search

By JeremyT Last update Jul 15, 2007 — Installed 333 times.


Script Summary: Search a page and highlight selected words with specific colors

How to use


You can either define rules in the script itself or do a dynamic search through the GreaseMonkey menu.

Usage:

highlightSearchTerms( searchTerms, foreColor, backColor, treatAsPhrase);

only required variable is searchTerms. foreColor defines the color of the highlighted text, backColor defines the background of the highlighted text. treatAsPhrase should be set to true if there are multiple words.

Using the menu: this is pretty simple, you type in your search phrase, and then type in the colors in this format: foreColor|backColor. the pipe is required to work properly, otherwise it will highlight with default colors.