Greasy Fork

Greasy Fork is available in English.

WK Colored Meaning/Reading

Meaning/Reading writen in diferent colors so you don't get confused

当前为 2016-11-07 提交的版本,查看 最新版本

// ==UserScript==
// @name         WK Colored Meaning/Reading
// @namespace    WKCOLOR
// @version      0.1
// @description  Meaning/Reading writen in diferent colors so you don't get confused
// @author       lararal 
// @include      https://www.wanikani.com/review/session
// @license      MIT; http://opensource.org/licenses/MIT
// @run-at       document-end
// @grant        none
// ==/UserScript==

/*
 * WK Colored Meaning/Reading
 *
 * I often write the reading instead of the meaning and vice versa, getting
 * a wrong answer even if I would get it right. I decided to color it differently
 * so I woud do it less often.
 *
 * Used the following script as a reference: 
 * https://www.wanikani.com/chat/api-and-third-party-apps/11700
 *
 */

/*
 * Changelog
 *
 * 0.1 (6 Nov 2016)
 *  - Started Working On The script.
 *
 */


function makeItColored() {
    var type;
    type = document.getElementById('question-type');
    if(type.className == "reading"){
        type.setAttribute('style', 'color:green')
    }
    else if(type.className == "meaning"){
        type.setAttribute('style', 'color:#E6880F')
    }
}


var init = function () {
    makeItColored();
};

// Init the script
(function(){
    init();
});