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 यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==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');
    }
})();