Skip to content

Instantly share code, notes, and snippets.

@lukephills
Created January 10, 2017 21:40
Show Gist options
  • Save lukephills/26787a3a221f2b8917546df140939e82 to your computer and use it in GitHub Desktop.
Save lukephills/26787a3a221f2b8917546df140939e82 to your computer and use it in GitHub Desktop.
Function to get current duolingo tree progress
function getDuolingoTreeProgress() {
var s = $('.skill-icon').length,
g = $('.gold').length,
p = parseInt((g/s) * 100);
return 'Out of a total of '+s+' skills, you have '+g+' gold ('+p+'% completed).';
}
getDuolingoTreeProgress()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment