Lesson Remover

Removes the Lessons number on Wanikani when the lowest item percentage is lower than 75%.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Lesson Remover
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Removes the Lessons number on Wanikani when the lowest item percentage is lower than 75%.
// @author       Sinom
// @match        https://www.wanikani.com/*
// @grant        none
// ==/UserScript==

(function() {

    let lowestPercentage = $('.low-percentage.kotoba-table-list table td span.pull-right').html();
    if (lowestPercentage != null){
        if (Number(lowestPercentage.substring(0,1))<75) {
            replace();
        }
    }
    function replace() {
        let row = $('.recent-unlocks').closest(".row");
        $('.navigation-shortcut:first-child a span').html('0');
        $('.navigation-shortcut:first-child a span').css('background', '#aaa');
        $('.recent-unlocks').parent().css("display", "none");
        $('.low-percentage').parent().addClass("span6");
        $('.recent-retired').parent().addClass("span6");
        console.log($('.recent-unlocks').closest(".row"));
    }
})();