Skip to content

Instantly share code, notes, and snippets.

@4lun
Created January 27, 2015 13:52
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 4lun/7aab7add00b8a011f836 to your computer and use it in GitHub Desktop.
Save 4lun/7aab7add00b8a011f836 to your computer and use it in GitHub Desktop.
Counts the amount of checklist items on a Trello board to and how many are complete (run in the console).
var total=0,complete=0;$('.badge-text').filter(function(i,e) { return ((e.innerHTML).indexOf('/')!== -1); }).each(function(i,e){ var s = (e.innerHTML).split('/');total+=+(s[1]);complete+=+(s[0]) }); console.log('Checklist items complete: '+complete+'/'+total,'('+Math.round((complete/total)*100)+'%)');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment