In February I wrote about people who follow you on Twitter for no good reason. Since then I’ve probably received a few dozen more requests from entirely random people/bots/MakeMoneyFasts, and while it doesn’t really mean anything, I find it irksome. Others do too – searching tweetscan for block always produces lots of annoyed people.
Blocking someone, though, is a huge pain. You get the mail message which links to the person, then you have to go to Twitter, go to your follower list, page through it to find that person, and then block. Satisfying, but tiresome.
So today I whipped up a Greasemonkey script to help. (You can stop reading and just download it now if you want.) If you’re a Gmail or Google Apps Mail user, and you receive a mail announcing yet another spammer, you can block them in just two clicks: the first goes to a block page, then you confirm. (There’s no way I’ve found to do it in one click yet.)
Here’s what your mail will look like – note the Block!:
Easy to do and satisfying.
You can find the script at this link at userscripts.org. Let me know if you have any problems with it.
Some random development notes:
- The Gmail Greasemonkey API is a nice touch, esp. because I don’t think you can find the body of a message with XPath otherwise (maybe XPath craps out at a certain # of levels, and the body of the message is 20+ levels deep). However, once you use the API, all document.* functions (including XPath ones) seem to be unavailable: maybe unsafeWindow blocks them, or maybe I just had bad luck.
- The Dive Into Greasemonkey tutorial might be out of date, but it was still insanely valuable (even if it’s obsessed with timers for some reason).