Making It Your Web

Locate Keywords In Search Engine Results With Greasemonkey

  • Posted 19th Aug 2009 @ 09:31:33
  • Last update 24th May 2013 @ 18:01:35
  • By Alex Hall

So, I decided (with the help of Lee Johnson) to create a new Greasemonkey script that looked for keywords in search result for the major search engines (Google, Yahoo! and Bing) rather than highlighting a listing based on a domain which my other script does.

For this one to work you will need to install the script (for a quick install, clickhere) and edit line 24 and below putting whichever keywords you wish to find in the array and the colour you wish that keyword to be highlighted by, for example:

var keywords = [
	['website', '#F00'],
	['development', '#CCC'],
	['devseo', '#5090D0']

Keywords, or phrases as I should be calling them, can be any number of string lengths with any number of words, though I'd suggest using keyphrases that you expect to find as you won't see anything if the keyphrase couldn't be found (I can add this functionality in if required).

I have also included the option to change the colour of the background highlight for the keyphrase so it stands out best for you. At the moment the keyphrase only has a background colour but my first update will be to put the keyphrase in a <strong> tag to give it some prominence.

As usual if you find any bugs or require further features of the script let me know and I'll get to work on them. Until then, enjoy the script. The source can be found here.

Okay, so I may have already added an update. It will now attach a colour to each keyword based on the colour assigned in the original array, which is now multi-dimensional (I have updated the example above to reflect this). I have also added some semantics for personal tatse and each keyphrase is now wrapped in a <strong> tag for emphasis.

Comments (be the first)

Add A Comment

Please note: all comments are moderated before they are published on this page.

Cancel Reply