Hide Review Progress

Hides review progress while reviewing

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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         Hide Review Progress
// @namespace    http://tampermonkey.net/
// @version      1.0.2
// @description  Hides review progress while reviewing
// @author       Iaro
// @match        https://www.wanikani.com/review/session
// @grant        none
// ==/UserScript==

var hiding = false;

function addStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (head) {
        style = document.createElement('style');
        style.setAttribute('type', 'text/css');
        style.textContent = css;
        head.appendChild(style);
        return style;
    }
    return null;
}

(function() {
    //Does the thing!
    addStyle('#hiding-mode.active {color:#00f; opacity:1.0;}');
    hiding = localStorage.getItem('hiding');
    hiding = (hiding !== 'false');
    $('#summary-button').append('<a id="hiding-mode" href="#"' + (hiding ? ' class="active"' : '') + '><i class="icon-eye-open"></i></a>');
    $('#hiding-mode').click(function() {
        hiding = !hiding;
        console.log('Hiding mode ' + (hiding ? 'en' : 'dis') + 'abled!');
        localStorage.setItem('hiding', hiding);
        $(this).toggleClass('active', hiding);

        if (hiding) {
            $('#progress-bar').css('visibility', 'hidden');
            $('#stats').css('visibility', 'hidden');
        } else {
            $('#progress-bar').css('visibility', 'visible');
            $('#stats').css('visibility', 'visible');
        }
        return false;
    });

    if (hiding) {
        $('#progress-bar').css('visibility', 'hidden');
        $('#stats').css('visibility', 'hidden');
    } else {
        $('#progress-bar').css('visibility', 'visible');
        $('#stats').css('visibility', 'visible');
    }
})();