Mark Pilgrim wrote a book on hacking web sites with Greasemonkey. I'm trying to write a Greasemonkey script to solve my Gmail focus problem but I haven't figured it out yet.