Skip to content

Instantly share code, notes, and snippets.

@Pierstoval
Created July 1, 2020 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pierstoval/1cd7ec29538e1598643d908a491165af to your computer and use it in GitHub Desktop.
Save Pierstoval/1cd7ec29538e1598643d908a491165af to your computer and use it in GitHub Desktop.
(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