kemayo on DeviantArthttp://creativecommons.org/licenses/by-nc-sa/3.0/https://www.deviantart.com/kemayo/art/Poll-Pies-171307677kemayo

Deviation Actions

kemayo's avatar

Poll Pies

By
Published:
8.4K Views

Description

Pie charts are cool. This sticks a google charts pie chart under any completed poll. It'll add one in after you vote without requiring a page reload, also.

I can't say that I've thoroughly tested it. Really long poll answers might make it get weird.

Install here: [link]

You need Greasemonkey. (Or a compatible equivalent in another browser. It's possible to persuade Chrome to use these scripts, I believe.)

The after-vote stuff doesn't handle voting in the message center. I might fix this someday.
Image size
434x395px 46.51 KB
Comments34
Join the community to add your comment. Already a deviant? Log In
electricjonny's avatar
Hey :) Just wanted to let you know that I've fixed and changed the js here to work right, now that it seems it doesn't work at all.

Greasemonkey seems to have further sandboxed its unsafeWindow, so using that to grab dA's jQuery doesn't work anymore.

Also, it seems that the code to grab the poll vote descriptions doesn't work anymore (dA and changing the div classes/markup…), so I fixed that.  Also made it work on poll.deviantart.com, so people can see the google pie result there.  I also changed the pie color to blue, since that seemed to fit a bit better with the dA skin, rather than the default orange.  EDIT: Heh sorry, seems that I had some Stylish to modify the bar result color... so your default orange may be alright here.  Feel free to cut that arg out of the URL and go with the same code, just without the blue colored pie =P

Anyway, here's the code updates, if you want to change yours fc00.deviantart.net/fs71/f/201… :)

EDIT:  It seems this makes the message centre not show results :o   So, yeah, don't update...