Wanikani Combo Streak

Shows your review combo

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Wanikani Combo Streak
// @namespace    Mempo
// @version      1.0
// @description  Shows your review combo
// @author       Mempo
// @match        https://www.wanikani.com/review/session
// @match        http://www.wanikani.com/review/session
// @run-at document-end
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    //var div = $("div").class(
    var css = '#WKCS { ' +
               'position: absolute; ' +
               'top: 10px; '+
               'left: 60px; '+
               'width: 100px; '+
               'z-index: 100; '+
               'color: white; '+
              '} ' +
              '#WKCS p {' +
                'margin-right: 10px;' +
                'display: inline;' +
              '}';
    addStyle(css);

    
    var $WKCS = $('<div id="WKCS">').append('<i class="icon-trophy"></i><p>Combo Streak: 0</p>');
        
    $WKCS.insertAfter("#summary-button");
    
    
    
    function addStyle(aCss) {
        var head, style;
        head = document.getElementsByTagName('head')[0];
        if (head) {
            style = document.createElement('style');
            style.setAttribute('type', 'text/css');
            style.textContent = aCss;
            head.appendChild(style);
            return style;
        }
        return null;
    }
    
    /*$(window).unload(function(){
        if(wki_hit_combo > wki_combo_record)
        {
            //$.jStorage.set('wki_combo_record', wki_hit_combo);
            console.log('WKCS: Combo record saved');
        }
    });
    */
})();