Wanikani Double-Check

Allows retyping typo'd answers, or marking wrong when WK's typo tolerance is too lax.

Old: v2.0.2 Fix buttons
New: v2.0.4 Turn off debug mode

  • --- /tmp/diffy20201202-20108-1dimzng 2020-12-02 16:22:33.773604869 +0000
  • +++ /tmp/diffy20201202-20108-yq42ze 2020-12-02 16:22:33.777604901 +0000
  • @@ -3,7 +3,7 @@
  • // @namespace wkdoublecheck
  • // @description Adds a delay after wrong answers to prevent double-tapping <enter>
  • // @include https://www.wanikani.com/review/session*
  • -// @version 2.0.2
  • +// @version 2.0.4
  • // @author Robin Findley
  • // @copyright 2017+, Robin Findley
  • // @license MIT; http://opensource.org/licenses/MIT
  • @@ -77,7 +77,7 @@
  • // 3) We intercept the hidden click, and forward it to Wanikani's code.
  • // a) Wanikani updates the screen to show the next question.
  • - var old_submit_handler, old_answer_checker, ignore_submit = false, state = 'first_submit', old_audioAutoplay;
  • + var old_submit_handler, old_answer_checker, ignore_submit = false, state = 'first_submit', old_audioAutoplay, show_srs;
  • var item, itype, item_id, item_status, qtype, valid_answers, wrong_cnt, question_cnt, completed_cnt, answer, new_answer;
  • //------------------------------------------------------------------------
  • @@ -165,7 +165,7 @@
  • }
  • if ((itype === 'r' || ((new_status.rc || 0) >= 1)) && ((new_status.mc || 0) >= 1)) {
  • new_completed_cnt++;
  • - Srs.load(new_status,item.srs);
  • + if (show_srs) Srs.load(new_status,item.srs);
  • }
  • $.jStorage.set('wrongCount', new_wrong_cnt);
  • $.jStorage.set('questionCount', question_cnt + 1);
  • @@ -223,6 +223,7 @@
  • wrong_cnt = $.jStorage.get('wrongCount');
  • question_cnt = $.jStorage.get('questionCount');
  • completed_cnt = $.jStorage.get('completedCount');
  • + show_srs = $.jStorage.get('r/srsIndicator');
  • // Ask Wanikani if the answer is right (but we don't actually submit the answer).
  • answer = old_answer_checker(qtype, $("#user-response").val());