Hacking Gmail

(Grace) #1

Chapter 6 — Gmail and Greasemonkey 115


Jim Lawton’s userscript creates a button that, when mails are selected, allows them


to be marked as read, en masse. Very useful in itself, it also provides the core code for
acting on a large number of mails in one go: handy for your own scripts, perhaps.


Multiple Signatures


Documentation:http://userscripts.org/scripts/show/1592


Userscript:http://userscripts.org/scripts/source/1592.user.js


This is a very smart script indeed. Using the ability to change the reply-to:
address within Gmail, it allows the user to change both their e-mail signature,


their reply-to:address, and — brilliantly — Gmail’s color scheme at the same
time. This allows you to use Gmail for multiple mail accounts without getting


them mixed up in the heat and fury of a working day. Very clever.


Hide Invites


Documentation:http://userscripts.org/scripts/show/673


Userscript:http://userscripts.org/scripts/source/673.user.js


A very simple use of Greasemonkey. This userscript simply hides the box that


holds the facility to send Gmail invitations to your friends. As you have already
looked at the way Gmail is constructed, you can modify this userscript yourself to


stop the display of any section of the interface.


Random Signatures


Documentation:http://userscripts.org/scripts/show/1704


Userscript:http://userscripts.org/scripts/source/1704.user.js


Robson Braga Araujo’s userscript adds a random tagline to the bottom of your


Gmail signature and also creates an option in the Settings menu to edit the
taglines and control how the userscript operates.


And Now


In this chapter, you saw that Gmail’s interface and workings are even more cus-
tomizable than you might have first thought. By using Greasemonkey, you can


seriously improve the Gmail experience. And by looking at the way the scripts
work, you can learn how to write your own.

Free download pdf