[Userscript] Lesson Lock

thank you, jenny kumi! :smile:

image

I just tried this script. I have 0 lessons but 120% of the lock score so it’s showing “locked.” Could you alter the locked behavior to not show locked if there are actually 0 lessons available?

Sounds reasonable. @anon88459823 What do you think?

Never encountered that scenario myself but makes sense - as there is nothing to be locked really :smile:

Updated

First of all: Thanks for the script, it’s great!

I got a bit bothered however that you could still click the greyed out button and continue to do your lessons. So I quickly added something along those lines to the lock section:

$('.lessons-and-reviews__lessons-button--0').on('click', function(e) {
                e.preventDefault();
                $(this).off("click").attr('href', "javascript: void(0);");
            });

It’s not particularly useful if you got more discipline than me and I’m not sure if it breaks something else, but so far it seems to be working :sweat_smile:

This script has been updated to work on the new dashboard layout.