Customising GMail with GreaseMonkeyBy Stuart Langridge and Tony Steidler-Dennison
One of the most powerful, though, is Mihai Parparita’s “Add Persistent Searches to GMail”. The script gives GMail the “saved searches” or “virtual folders” feature from desktop mail clients such as Thunderbird, Evolution, or Mail.app. It works by adding a new HTML block to the page which contains your “saved searches”: these searches themselves are saved in a cookie and the cookie is loaded by the script. The script uses Ajax techniques to fetch the number of messages in each saved search in order that they can be dislayed in the HTML block, and updates those figures every two minutes. I can imagine this being rolled into GMail at some point in the future, but until then GreaseMonkey provides the ideal way to prototype such functionality (as the “Edit styles” bookmarklet or the Edit CSS part of the web developer toolbar do for CSS) and to distribute it out to early adopters.