您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows the context sentence in the question during vocab reviews. For Meaning questions, click to show English sentence.
当前为
// ==UserScript== // @name WK Context Sentences // @namespace nelemnaru // @description Shows the context sentence in the question during vocab reviews. For Meaning questions, click to show English sentence. // @include *://www.wanikani.com/review/session* // @version 1.02 // @license Feel free to improve. // @grant none // ==/UserScript== $("#question-type").prepend("<div id='contextsent' style='font-size:1.5em'><div id='sentj'></div><div id='sente'></div></div>"); $("#question-type").click(function() { if ($.jStorage.get("questionType") === "meaning") { $("#sente").toggle(); } }); var japanese, english; $.jStorage.listenKeyChange('currentItem', function() { $("#sente").hide(); //Following is code courtesy of rfindley var current_item = $.jStorage.get('currentItem'); // Only vocab has context sentences. if (current_item.voc !== undefined) { var url = '/json/vocabulary/' + current_item.id; // Grab the item info from WK server. Process result when it arrives. $.getJSON(url, function(json) { // Extract the sentences from the item info. var context_sentences = json.sentences; console.log('Sentences for ' + current_item.voc + ':'); // Output each sentence to the console. $.each(context_sentences, function(idx, sentence) { japanese = sentence[0]; english = sentence[1]; console.log(' J: ' + japanese); console.log(' E: ' + english); }); $("#sentj").html(japanese); $("#sente").html(english); }); } else { $("#sentj").html(""); $("#sente").html(""); } });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址