Shop Mobile More Submit  Join Login
×




Details

Submitted on
July 14, 2010
Image Size
46.5 KB
Resolution
434×395
Link
Thumb
Embed

Stats

Views
6,522 (1 today)
Favourites
76 (who?)
Comments
34
Downloads
62

License

Creative Commons License
Some rights reserved. This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
×
Poll Pies by kemayo Poll Pies by kemayo
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.
Add a Comment:
 
:iconelectricjonny:
electricjonny Featured By Owner Edited Aug 22, 2014  Hobbyist Photographer
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...
Reply
:iconnamenotrequired:
namenotrequired Featured By Owner Jan 13, 2012  Student Interface Designer
I featured this here [link] :)
Reply
:iconinvader-sparkle:
Invader-Sparkle Featured By Owner Dec 26, 2010
Wow thanks this is so cool!
Reply
:iconbaz135:
Baz135 Featured By Owner Aug 26, 2010  Hobbyist Photographer
As neat as it is, if there's too many options on a poll the shades of the different options become to close to each other and so it becomes kind of hard to differentiate.
Reply
:iconpikadudeno1:
pikadudeno1 Featured By Owner Jul 25, 2010  Hobbyist Digital Artist
Chrome doesn't support unsafeWindow, but if you replace the first two lines of code with Content Scope Runner, the script runs fine under Chrome. :)
Reply
:iconsa-cool:
sa-cool Featured By Owner Jul 25, 2010  Professional Photographer
love it! :aww:
Reply
:iconfatezoom:
FateZoom Featured By Owner Jul 25, 2010  Student Interface Designer
i love this id!!
Reply
:iconsatania:
SaTaNiA Featured By Owner Jul 15, 2010  Hobbyist Digital Artist
Simply Awesome :clap:
Reply
:icontifa22:
Tifa22 Featured By Owner Jul 15, 2010  Hobbyist Digital Artist
That's a cool thing :D
Reply
:iconmheltin:
Mheltin Featured By Owner Jul 14, 2010  Professional Interface Designer
Awesome. :la:
Reply
:iconsparkykfox:
SparkyKFox Featured By Owner Jul 14, 2010
I love it, it is useful. I believe you guys should make it an deviantART Official Polls Feature. That would be really useful.
Reply
:iconkemayo:
kemayo Featured By Owner Jul 15, 2010
The fun part about making quick scripts for this kind of thing is that I don't have to go out and test all the edge cases. It also doesn't become something that has to be tested whenever we make big changes.

"I can't say that I've thoroughly tested it. Really long poll answers might make it get weird" doesn't fly when releasing something properly. ;)

(Example edge cases mostly involve the labels: what if they're really super-long? what if they're using non-latin characters? what if they include images?)
Reply
:iconsparkykfox:
SparkyKFox Featured By Owner Jul 15, 2010
Oh i see
Reply
:iconkemayo:
kemayo Featured By Owner Jul 15, 2010
That said, we have had a much-improved-polls plan on the backburner for a long time, and this is the sort of thing that might get rolled in when we get around to it.
Reply
:iconsparkykfox:
SparkyKFox Featured By Owner Jul 15, 2010
Sweet
Reply
:iconmulsivaas:
Mulsivaas Featured By Owner Jul 14, 2010  Hobbyist Photographer
I agree!!
Reply
:iconsparkykfox:
SparkyKFox Featured By Owner Jul 14, 2010
:D
Reply
:iconxelloss100:
xelloss100 Featured By Owner Jul 14, 2010
Nice Work!!! Polls look much better now...
Thanks for sharing!!
Reply
:iconikue:
Ikue Featured By Owner Jul 14, 2010  Hobbyist Digital Artist
SEXY TIEMZ :la:
Reply
:iconweludixon:
WeluDixon Featured By Owner Jul 14, 2010  Hobbyist General Artist
I heart this! Really nice work. I think I'll make more polls now.
Reply
:iconitsfrits:
itsfrits Featured By Owner Jul 14, 2010  Professional Interface Designer
Like! Been wanting this since past September.
Reply
:iconalpha621:
Alpha621 Featured By Owner Jul 14, 2010  Student General Artist
Er, how do you install this :XD: ?
Reply
:iconkemayo:
kemayo Featured By Owner Jul 14, 2010
You need Greasemonkey. Or its equivalent for some other browser.
Reply
:iconclubberry:
Clubberry Featured By Owner Jul 14, 2010  Professional Interface Designer
Great script! :)
Reply
:icontheryanford:
TheRyanFord Featured By Owner Jul 14, 2010  Professional Interface Designer
Mmmm...pie....
Reply
:iconginkgografix:
ginkgografix Featured By Owner Jul 14, 2010
~SD-DAken made a poll pie script already [link] last year but i like your version more :D
Reply
:iconkemayo:
kemayo Featured By Owner Jul 14, 2010
We do take thoroughly different approaches -- theirs includes a whole javascript graphing library, and mine just asks Google to do it.
Reply
:iconnofacemeg:
nofacemeg Featured By Owner Jul 14, 2010
It just comes up with script..
Reply
:iconkemayo:
kemayo Featured By Owner Jul 14, 2010
You need Greasemonkey. Or its equivalent for some other browser.
Reply
:iconwonderglow:
WonderGlow Featured By Owner Jul 14, 2010  Hobbyist General Artist
i dont understand how to install?
Reply
:iconkemayo:
kemayo Featured By Owner Jul 14, 2010
You need Greasemonkey. Or its equivalent for some other browser.
Reply
:iconwonderglow:
WonderGlow Featured By Owner Jul 15, 2010  Hobbyist General Artist
ok thanks :)
Reply
:iconcookiemagik:
CookiemagiK Featured By Owner Jul 14, 2010  Hobbyist Digital Artist
FUN! :eager:
Reply
:iconpatrickruegheimer:
PatrickRuegheimer Featured By Owner Jul 14, 2010   Photographer
How awesome. :D
Reply
Add a Comment: