WK Colored Meaning/Reading

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         WK Colored Meaning/Reading
// @namespace    wkcoloredmr
// @version      0.52
// @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.
 *
 */

wkcoloredmr = {};

(function(gobj){

    var css =
        '#question #question-type.reading {'+
        'color: green;'+
        '}'+

        '#question #question-type.meaning {'+
        'color: #E6880F;'+
        '}';

    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;
    }
    
    addStyle(css);

}(wkcoloredmr));