Skip to content

Instantly share code, notes, and snippets.

@epson121
Last active August 29, 2015 14:01
Show Gist options
  • Save epson121/4ac3ff77ff2f4a9d5534 to your computer and use it in GitHub Desktop.
Save epson121/4ac3ff77ff2f4a9d5534 to your computer and use it in GitHub Desktop.
Berwaz foto contest get highest vote
function returnInt(x){return parseInt(x, 0);};var a=document.getElementsByClassName('votes');var c=[];for(var i=0;i<a.length;i++){c[i]=a[i].getElementsByTagName('strong')[0].innerHTML};Math.max.apply(Math,c.map(returnInt));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment