1. Forum
  2. >
  3. Topic: Duolingo
  4. >
  5. Here's how to count the numbeā€¦

https://www.duolingo.com/profile/dont_tread_on_me

Here's how to count the number of lessons on Duolingo

Open up Duolingo. Press F12, click on Console: Paste this into the Console: var x = document.getElementsByClassName("W1dac"); alert(x.length); Then the alert box popping up will tell you the number of skills.

And you can also count how many of these you have unlocked by appending the above mentioned code with this:

var c = 0; for(var i = 0; i < x.length; i++) { if(x[i].getAttribute("data-test") == "green skill-tree-link" || x[i].getAttribute("data-test") == "gold skill-tree-link" || x[i].getAttribute("data-test") == "red skill-tree-link" || x[i].getAttribute("data-test") == "blue skill-tree-link" || x[i].getAttribute("data-test") == "purple skill-tree-link") { c++; } } alert(c);

October 16, 2017

7 Comments


https://www.duolingo.com/profile/FieryCat

Then the alert box popping up will tell you the number of lessons.

It is not the number of lessons, it is the number of skills.


https://www.duolingo.com/profile/dont_tread_on_me

Sorry, that's what I meant.


https://www.duolingo.com/profile/Jersebas

Nice tip, thanks! =) Maybe mention the F12 thingy only works on Windows? On a Mac (with Safari) it would be Option-Cmd-C to get the JavaScript Console


https://www.duolingo.com/profile/Mathso2

Also, Mac Chrome is Option+Command+I :)


https://www.duolingo.com/profile/Thomas.Heiss

Why so complicated?

The good news is that the old user script "DuoLingo course progress" still works counting the skill, lessons and suggesting the "estimate of course completion" on the right side below the "Daily graph" panel with the duo.old_web_url_whitelist=["^.+"];" workaround on the (old) discussions.

However the blue course progress bars (percentage and next level) from the top of the tree have gone for me since the last DuoLingo forum maintenance update (I bought two Portuguese bonus skills; for other courses with no bonus skills the two bars are gone too).


https://www.duolingo.com/profile/AKicsiMacska

This is basically just for me, here are them together:

var x = document.getElementsByClassName("W1dac"); alert(x.length); var c = 0; for(var i = 0; i < x.length; i++) { if(x[i].getAttribute("data-test") == "green skill-tree-link" || x[i].getAttribute("data-test") == "gold skill-tree-link" || x[i].getAttribute("data-test") == "red skill-tree-link" || x[i].getAttribute("data-test") == "blue skill-tree-link" || x[i].getAttribute("data-test") == "purple skill-tree-link") { c++; } } alert(c);


[deactivated user]

    hey that is cool I have to try that out P.S. you smart

    Learn a language in just 5 minutes a day. For free.