Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(function(){
let list=document.querySelectorAll('.event--vote-stars');
let score = 0;
for (let i=0,l=list.length;i<l;i++) {
let el=list[i];
score+=el.querySelectorAll('a.star.is-selected').length;
}
console.info(score/list.length);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment