This userscript replaces any occurance of %UNREAD%
in your Gmail signature with the number of unread emails in your Inbox. It was made in response to this mission on Coffee and Power.
Right now this only works in Firefox with the Greasemonkey extension. Although Google Chrome supports user scripts, it does not support some of the features required for this script to function, namely unsafeWindow. There are some workarounds which I might explore when I have more time.
-
Enable the "Unread message icon" in Gmail Labs -- the script will NOT work without this turned on.
-
Download The Latest Userscript in Firefox. Greasemonkey will prompt you for installation. Reload Gmail. Then add
%UNREAD%
to your Gmail signature and it should be replaced by the number of unread messages when you compose a new message, or a reply.