Blog


Bulk Vote for Reddit, Digg, and Hacker News


Update: Ok, so this is more of an issue than I originally surmised - apparently it violates the Terms of Service on a couple sites, especially Digg. I've removed Digg support and may have to take the script down at some point. Sorry everyone!

Last weekend I decided to play around with the new Ubiquity extension for Firefox, building a command.

The command is called 'vote' and it gives you the ability to bulk vote on links and comments on Digg, Reddit, and Hacker News.

I've created a short screencast that shows it in use:


Ubiquity Vote Command

Here are the commands available on the sites that it supports:

Digg

  • vote up - Works on stories and comments that haven't been voted on.
  • vote down - Works on comments that haven't been voted down.
  • vote fave - Works on stories that you've already voted up.
  • vote bury - Works on all stories.

Reddit

  • vote up - Works on stories and comments that aren't already voted up.
  • vote down - Works on stories and comments that aren't already voted down.
  • vote none - Resets the vote of stories and comments that have already been voted on.
  • vote hide - Hides stories from view.

Hacker News

  • vote up - Works on stories and comments that aren't already voted up.

Each of the commands have a number of filtering aspects that can be used:

  • vote up WORD - Performs the vote on all stories or comments that match WORD (comments will also match the name of the comment author). For example: vote up google
  • vote up REGEXP - Performs the vote on all stories or comments that match the REGEXP regular expression. For example: vote up hadron|youtube
  • vote up WORD not OTHER - Performs the vote on all stories or comments that match WORD and does not match the word OTHER. For example: vote up google not chrome

Ubiquity is a lot of fun to develop for. There's a real-time command editor (run the command 'command-editor' to bring it up) which makes development quite fast. It also includes native jQuery support (which is a huge plus for me).

In a lot of ways I see Ubiquity as being a solid replacement for Greasemonkey and bookmarklets. It's far simpler and will make their execution much more flexible. I'll be curious to see what people end up doing with it, in the upcoming months.

Tags: digg, reddit, ubiquity, ycombinator

Hacking Digg With Firebug and jQuery

This is an adaptation of a presentation that I gave while at Mashup Camp Boston. We're going to take an introductory look at the Firebug Firefox Extension and the jQuery JavaScript Library - combining the two to build a reusable bookmarklet that can manipulate Digg Posts and Comments.

Click video to begin (14:39 Minutes long, 59MB):


Download: Right-click this link and select Save As... in order to download a copy of your own. (59MB)

Bookmarklets:
In the presentation, I refer to a bookmarklet that you can use to introduce jQuery into a web page. Drag these bookmarklets to your Bookmark toolbar to use them.

  1. » jQuerify « - Introduce jQuery into any web page.
  2. » Fix Digg « - The final bookmarklet that we made to remove all buried comments from a Digg post.

Related Links:

If you enjoyed this screencast, don't forget to Digg it up!

Update: If you wish to use Greasemonkey instead of a bookmarklet, then by all means, please do so. You can use the ability to quickly analyze and inspect a page that Firebug and jQuery affords you, using the results to build a Greasemonkey script, instead of a simple bookmarklet. I only really intended this to be a quick introduction to the subject, so please feel free to explore it more!

More Tips: Here are some more jQuery selectors that you can use on a Digg Post:

  • $("li.c-bury > div").remove(); - Remove all buried comments, but none of the direct replies.
  • $("div.c-body").show(); - Show all comments, even ones that've been buried.

Tags: firefox, bookmarklets, programming, extensions, javascript, jquery, firebug, digg, mozilla

Howto Spam Digg

Step 1) Spam the crap out of the Digg user comments using multiple accounts, multiple URLs, and make them all look like legitimate links. Continue this for a few days, to get people good-and-angry.
Step 2) Post a story calling for your own spammy, fake, accounts to be IP-banned. Everyone blindly insta-diggs it, because they're really pissed off.
Step 3) Profit.

Seriously, read the comments and watch the diggers slowly realize what's just happened. I don't think there's anything funnier on the Internet.

Tags: digg, social, communities

Making Digg Relevant

The other day, Digg made some changes to its voting system. Whereas, previously, votes were not weighted in any discernible manner, they are now weighted based upon the, supposed, level of collusion that you exhibit with other users. The idea is that if you commonly vote up the same article as another user, then your combined vote is only worth one "vote" unit.

The fundamental problem that I have with this implementation is that if you're a normal, non-colluding, Digg user - your generic vote weight will go down as time goes on. The more you use Digg, the more chance that you have of haphazardly voting the same as another user. Eventually the system with find you to be in collusion "Three diggs together! Oh no!" and chop your vote to an invisible degree.

An excellent-quality article made it up onto Digg today (a seemingly rare occurrence). In the article, Pete argues that Digg follows a strict sense of Groupthink and conformity. I couldn't possibly agree more. I especially like his proposed solution to the aforementioned problem (while taking a different aproach than that of vote weighting):

To tackle the problem of conformity, do not show profile or # of votes for up-and-coming dugg articles. Just show the article link, with no profiles or votes attached to it. As a compromise, only show the profiles and votes on the articles that make the digg front page, but make them un-diggable from the front page.

I think the decision made by the Digg team was incredibly mis-guided. But it's immediate ramifications are tangible enough for them to make a quick decision concerning it. In my opinion, stopping colluding friends, or bot networks, is only part of the battle; stopping independent, rogue, users is something else entirely (and which I'll be discussing more, in the future).

Tags: digg, social, software

JavaScript Books

Secrets of the JavaScript Ninja

JavaScript Secrets

Secret techniques of top JavaScript programmers.

Pro JavaScript Techniques

Pro JavaScript

The best techniques for professional JavaScript. Published by Apress.

Micro Updates

John Resig Twitter Updates

@jeresig

Infrequent, short, updates and links.

JavaScript Jobs



Hosting provided by: Ruby Hosting by Engine Yard