# StackExchange Election: Primary counter

I want to keep an eye on the votes of the ongoing election, but the unsortedness of the list during the primary election phase makes it hard to keep track of anything. So I wrote a quick script that goes through them all and puts a short overview list at the top, sorted by the current vote count.

Currently support is only for StackOverflow, but if requested I can adjust it to run on other Stack Exchange site elections too.

## Changelog

• 1.4.x: Added the ability to query the vote count for users that have access to the tools. Also added support for https.
• 1.3.x: Updated for new election style (as used on Stack Overflow in April 2015)
• 1.2.x: Display withdrawn users differently
• 1.1.x: Display user rank, reputation and flag count; visual changes; support for Scriptish’ auto-updates
• 1.0.x: Initial release

Note: Since the first releases, GitHub has changed its URLs to a new domain which will break the automated update in user script extensions that support it. To update, click the install link above again and update it manually.

-

The http://stackoverflow.com/election isn't matched.

// @include        http://stackoverflow.com/election/*


it should list

// @include        http://stackoverflow.com/election

-
Thanks, updated. – poke Feb 18 '14 at 14:40
@poke: Thanks! Added the 'completed' tag. – Martijn Pieters Feb 18 '14 at 14:49

(v1.1.0)

Can the table be updated to show a cut-off line? Highlight the top 10 or put a (dotted?) line between the top 10 and the rest of the pack, to show who is going to go through without manually having to count.

-
Done! Added some styles and other stuff in v1.1.0. – poke Feb 19 '14 at 15:34

You should probably add more include patterns for the other stacks.
If you use:

// @match       *://*.askubuntu.com/election*
// @match       *://*.mathoverflow.net/election*
// @match       *://*.serverfault.com/election*
// @match       *://*.stackapps.com/election*
// @match       *://*.stackexchange.com/election*
// @match       *://*.stackoverflow.com/election*
// @match       *://*.superuser.com/election*


instead of those 2 @includes, in the script; it will work for all SE sites -- like Information Security, for example.

-
Took the liberty of modifying your proposal to a single @match directive. @match performs better and has smarter and "safer" wildcard matching than @include. ... Roll the edit back, if you don't like it. – Brock Adams Jul 21 '15 at 20:22
Very good. I'm not an expert on user scripts after all. Good job. – M'vy Jul 21 '15 at 20:23
Oops. Forgot a few SE sites. Edited in the standard SE @match set. – Brock Adams Jul 21 '15 at 20:25

Not matching HTTPS protocol requests. Simply change http://... to *://... in the @match annotations.

-
Done with v1.4.0. Thanks for the suggestion! – poke Apr 13 '15 at 22:19
@poke The new vote feature uses HTTP, which fails on HTTPS :P Best to simply omit the protocol and host when doing AJAX to the same domain. (Line 69) – Madara Uchiha Apr 13 '15 at 22:34
Haha, oops! Totally forgot about that – fixed now ^^ – poke Apr 13 '15 at 22:37