StackExchange Election: Primary counter

This user script adds a short overview table at the of the election page during the primary election phase on Stack Exchange moderator elections. The table lists all candidates, ordered by their current primary vote score, along with their user information.

The purpose of this is to allow keeping an eye on the votes of ongoing elections which the default interface and (deliberately) unsorted candidate list does not allow for.

Example

The following is an example of the user script in action for election 6 on Stack Overflow:

Changelog

• 1.5.x: Added support for other Stack Exchange sites.
• 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
• Has something changed? It isn't working for me this time. (It worked until the last elections) – Bhargav Rao Mar 19 '18 at 20:12
• @BhargavRao Apparently, they changed the code slightly. Fixed it in v1.4.5. – poke Mar 19 '18 at 20:34
• Hmm, something is broken. I'm pretty sure that I could expand the score into pos/neg when I clicked on them. It is not working for me now. – Bhargav Rao Mar 12 at 2:13
• @BhargavRao You’re right, I missed that last night when I fixed the script. It should work now again. – poke Mar 12 at 20:49

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

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


it should list

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

• @poke: Thanks! Added the 'completed' tag. – Martijn Pieters Feb 18 '14 at 14:49

(v1.5.0)

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
• No idea why I never got to do this earlier but it’s done now in 1.5. Thanks for the suggestions! – poke Mar 6 at 1:02

(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

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

(v1.4.6)

'.votecell .vote-count-post' needs to be changed to '.votecell .js-vote-count' for the new post layout on L45

• No idea how you found this out this early, but thanks a lot! :D – poke Mar 6 at 1:02
• Found out while visiting the previous election – Samuel Liew Mar 6 at 1:03