Screenshot / Code Snippet

About

This small bookmarklet will allow anyone to use the "vulnerability" of the API that it allows you to check the up/down vote count - a feat you could normally achieve by being a 1k+rep user. Mainly useful for sites where you don't have this amount of reputation points, but want to check the stats of the more controversial questions (usually on Meta Stack Overflow).

Platform

Contact

Code

It was written in Notepad already in minified form, and I used Firebug to debug. (API 2.1 version was tested in Chrome's console) Code is above. Contribute (=decrease code size or make the output nicer) any way you want.

Known bugs

If a question has more than 100 answers then some of the answers won't be resolved. For questions with more than 100 answers resolving this is more difficult (= longer script)

Hey - this will help me with SuperUser and ServerFault where I only have 200-400 rep.
– Nathan Osman♦Jun 5 '10 at 22:58

1

You should probably update the screenshot to the latest version, as it looks a bit different.
– Maxim ZaslavskyJun 6 '10 at 2:18

4

Honestly, I hope this prompts them to just remove this restriction on the sites themselves. It seems silly and arbitrary to me, and had me a bit confused when I couldn't see this info on here after getting used to seeing it on SO.
– ColinDJun 6 '10 at 3:36

how about if user is 1k+ rep? Does it detect that? Also feat request for same design/layout as if user had 1k+ rep. i.e. the coloring and fraction-like presentation.
– EimantasMar 11 '12 at 10:39

@Eimantas: the less characters the code has the better, as (older?) IE has a "security" limit of 508 characters. I might add some new stuff to it, but as I see there is ano other script that does the same.
– SztupYMar 11 '12 at 16:20

And if you have >1k you don't need to use this anyway :) (maybe only for the frontpage)
– SztupYMar 11 '12 at 16:20

You can put the actual script on a hosting site (like github) and create a script to fetch and evaluate the script from the hosting service.
– smileycreations15May 9 at 17:11

2 Answers
2

Very cool stuff! I'm going to be using it personally. Thanks for the hack!

If there will be another version, here's what I hope will be in there (minor things, not really necessary):

Layout of + and - votes looks more like the layout of what's shown to 1000+ rep members (slight css change)

Making this into a Firefox plugin or a Chrome extension so it does it automatically (not sure about Firefox plugins, but with Chrome extensions, it's a piece of cake.)

As this uses jQuery anyway, once the function is executed, the up/down vote counts are loaded into the background and click handlers are added to the total vote counts, so that it really resembles the experience that 1000+ rep users have.

As it's under WTFPL, I'll try to implement those features myself and post my results.

Thanks again!

UPDATE: I started making a Greasemonkey version of this; here's what I have so far (I don't have too much experience with GM, so I'm not sure whether this code will work):

Updated the above codes to support API version 2.1. It does use some of the features of the new API (like the filters function, to decrease load on the servers). You can get the older, shorter API 1.0 version by checking the old revision.

The upgrade made the codes longer, but the first one is still within IE's 508 char security limit. Also added a new script that will let you quickly check the up/down vote counts on the frontpage and similar (Hot, Featured, etc.) pages, to quickly check which posts are "controversial".