My GreaseMonkey Script: craigslist spam buttons
Last weekend I wrote my first GreaseMonkey script. If you are unfamiliar with GreaseMonkey, its a FireFox extension that lets you run specific JavaScripts on specifc webpages. This is incredibly cool, you can basically bend websites to whatever you want. Everything from changing the look and feel to adding new functionality. GreaseMonkey puts you back in control of your browsing experience. A neat example is the GM script that, when you are browsing Amazon, will put a link to the book at your local library and indicate if its available there.
The GreaseMonkey script I wrote works with Craigslist.org. Craigslist is a popular free classifieds site. Craigslist’s posts are not moderated, so anyone can post an ad. That includes spammers. Craigslist spam is mostly controlled by craigslist users themselves. See an ad thats spam? Click the spam button. If enough people mark it as such, it automatically gets taken down. I really like CL, so I do my part by flagging any spam I see. To do this you must click on the item title from the list, then click the spam button on the detailed listing. But I can often identify spam just from the title. Posts like “FREE 4gb ipod nano!!” and “Take Your New Pair of Uggs!” are obvious spam.
So my script adds the flag-as-spam buttons to the listing page, so you don’t have to click onto the detail page of each item to flag it.
You can get my script from userscripts.org, an archive of GreaseMonkey scripts. Here is what it looks like:
Before:

After:

And the great news that I discovered while writing this is that a lot of GreaseMonkey scripts run in Opera, my favorite web browser. So I made sure to write this one in a way that worked in Opera. To use this in Opera, go to the Tools menu, then Preferences -> Advanced -> Content -> JavaScript options, and choose a directory for the “User Javascript files” field. Then drop my script in that directory. Thats it!
March 5th, 2007 at 2:42 pm
Awesome job man!… now If someone would create a widget for Opera I would be so happy
March 5th, 2007 at 2:46 pm
Greg, the script does work in Opera. Or were you referring to something else? Like a full fledged GreaseMonkey plugin for Opera?
March 5th, 2007 at 2:55 pm
It works in Opera - Now I’m Happy
Great idea man!
Thank You!
June 19th, 2007 at 6:15 pm
I’m stuck at directory. I clicked on Javascript options and a window opened. Where it says user javascript files I chose C:programs\Opera I then went to the Opera folder and pasted the 7399 file in the opera folder. I tried different folders too but none seemed to work.
June 20th, 2007 at 10:03 am
Manny, I think the filename may have to be in a special format. It sounds like you are leaving the file named ‘7399′. Try naming it something like ‘craigslist-spam-btns.user.js’. I think the key is the name must end with .js, or perhaps .user.js.
November 8th, 2007 at 10:09 pm
FYI, I’ve updated the script. See this post:
http://www.stillnetstudios.com/2007/11/08/greasemonkey-craigslist-spam/
December 8th, 2007 at 11:38 am
Thanks for the update Ryan. I am on CL often, and this is very handy
Clicking “Install Script” only open a page where the code is displayed. I had to right click and select “Save Target As”
No big deal, but others may not know.
March 28th, 2008 at 12:28 pm
I have d-loaded the script and installed firefox AND Greesemonkey, but after including the script into greesmonkey, it just doesn’t seem to work.
The name space when adding a script is the web page that the script is to be run against, right?
Well, it won’t run at all. What am I doing wrong?
Thanks!
May 26th, 2008 at 9:24 am
Dude, this script rock!!! I post it all of the CL Feedback forums and people always thank me for it.
However, in today’s CL spam madness the script needs to be further automated.
We truly need the ‘SpamBomb’ button to mark all of the posts on a page as spam. Right now, so many categories are entirely spam it’s just not even funny. The w4m postings in the SF Bay Area are completely filled up with spam to the point where it is tiresome to spend hours clicking spam next to each posting. I’m not kidding, HOURS. There are over 1300 w4m ads with pics and I think maybe there used to be max 150.
June 30th, 2008 at 6:29 pm
Thats gr8. But craigslist is blocking some posting by detecting the IP address