GMail random signatures
There are a few scripts around to do random signature cycling in GMail, but they all are limited from my perspective; they let you specify the signatures in the GMail interface, for example, but save those signatures on your local computer. Since I share stuff between home and work, I’ve got an updated script. Gmail: Random Signature Remote goes and fetches a fortune file from a URL and chooses signatures from that. You’ll need to edit the script once you’ve installed it and change the url entry in changeSignature (this isn’t an easy user process, because I just hacked this script together for me) to point at a fortune file. Fortune files have each signature separated by a % on a blank line.
It would be nice if the script stored the URL in a cookie. The first time you ran it, it would look for the cookie and ask the user if none was found.
79 minutes later
Roberto: then I’d have to fill it in on all my machines. I see the theory, though; that wouldn’t be too onerous :)
7 hours later
User script configurability is easy, especially when you use GM_setValue; cookies are less convenient.
function configure()
{
var u=GM_getValue(’url’);
u=prompt( ‘Fortune URL?’, u||” );
GM_setValue(’url’,u);
return u;
}
GM_registerMenuCommand(’Set fortune URL’, configure);
function get_fortune_url()
{
return GM_getValue(’url’) || configure();
}
15 hours later
Yes, if I want it to be configurable, which I don’t; I have one fortune URL, which is in my copy of the script. Having to configure it on all the machines I use is daft. Nonetheless, anyone who uses this script should definitely feel free to add Johan’s customisation to it if you’d like fortune URL configurability.
16 hours later
Fucking hell, that’s weird. When I had a play with greasemonkey after lugradio live last year the one and only thing I did with it was this same thing.
4 days later
I’m not suggesting that it’s a way of adding value to the script for yourself, only to your readership, who’d get a tool ready to just install and use right away without chasing down an editor and doing the roundabout manouver involved in installing user scripts from your local file system.
Replacing the ” bit above with your own preference would give you a default choice to just okay on first use with every new computer, though that would of course also not be an improvement on your script when used by yourself.
Just a compromise to improve sharability, reader worth, diggability or what have you — a useful cheap technique for flirting with readers.
2 weeks later