try to take over the world!
目前為
// ==UserScript==
// @name WaniKani Fast Abridged Wrong Answer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.wanikani.com/review/session
// @grant none
// ==/UserScript==
(function() {
'use strict';
//$.jStorage.get("currentItem")
$('#user-response').after("<label id='lblCorrect' style='background-color: orange; display: none; height: 50px; line-height: 2em; font-size: 1.5em; font-weight: bold; color: white; text-shadow: 2px 2px 0 rgba(0,0,0,0.2) !important;'></label>");
$('#lblCorrect').css('width',$('#user-response').css('width'));
$.jStorage.listenKeyChange('currentItem', function (key, action) {
if (action === 'updated') {
$('#lblCorrect').text('').css('display','none');
//$('#user-response').attr('placeholder',$('#question-type h1').html().replace("<strong>","").replace("</strong>",""));
}
});
$.jStorage.listenKeyChange('wrongCount', function (key, action) {
debugger;
$('#lblCorrect').text('').css('display','block');
if (action === 'updated' && $.jStorage.get("wrongCount") > 0) {
switch($('#question-type h1').text().toLowerCase()){
case "vocabulary reading":
$('#lblCorrect').text($.jStorage.get("currentItem").kana.join(", "));
break;
case "vocabulary meaning":
case "kanji meaning":
case "radical name":
$('#lblCorrect').text($.jStorage.get("currentItem").en.join(", "));
break;
case "kanji reading":
switch($.jStorage.get("currentItem").emph.toLowerCase()){
case "onyomi":
$('#lblCorrect').text($.jStorage.get("currentItem").on.join(", "));
break;
case "kunyomi":
$('#lblCorrect').text($.jStorage.get("currentItem").kun.join(", "));
break;
}
break;
}
}
});
// Your code here...
})();