Deep Search: Extending Google search into the web page

My most recent project has been a Firefox extension called "Deep Search". The idea is to extend Google search one level "deeper", into the returned web pages themselves. This is by no means a new idea. Google already does this for cached pages -- if you view a cached page the search terms will be highlighted. Google can't do this for the real web pages, of course, but the Deep Search Firefox extension can.

Deep Search also attaches decorations ("marks") to the scroll bar to show at a glance where in the web page the search terms were found. One of the limitations of the current Deep Search extension is that the marks appear next to the scroll bar rather than directly on it. This is not ideal but it's acceptable for a proof-of-concept. You can click on a particular mark to immediately scroll to that search term match.

I've attached a screenshot below. I've circled the changes made by Deep Search in red. The search term is highlighted and the "mark" is right next to the scrollbar thumb in the lower right corner. The gray line at the top of the mark shows the precise position of the search term relative to the scrollbar. The red area below it is, not coincidentally, roughly the same size as the thumb. It shows where the thumb needs to be positioned so that the search term corresponding to this mark appears at the top of the window.