Track what you search for and which search results you follow.
Google recently added yet another beta service: My Search History (http://www.google.com/searchhistory/). In a nutshell, you log into your Google account, and My Search History remembers which keywords you search for and which search results you end up following. A nice idea, but it has some limitations that disappointed me when I tried it. My Search History isn't immediately available on the Google home page. Also, clicking a previous search simply reexecutes the search, instead of actually taking me to the result I followed last time. How is that useful? I remember what I searched for; what I want to know is what I found!
This hack lets me do what I had hoped the "My Search History" tool would do.
This user script runs on all Google pages. The code itself breaks down into three distinct parts:
SavedSearches function and associated prototype methods are used to create a persistent array—i.e., an
Array class that saves its data to the Firefox preferences database.
injectRecentSearches functions handle the basic operations of the script. Whenever you execute a Google search, the script adds your keywords to its persistent array, and then alters the search results page to include a list of your recent searches.
trackClick function is where the real magic happens. On search result pages, we register ...