[Userscript]: Double-Check Workaround

:warning: This is a third-party script/app and is not created by the WaniKani team. By using this, you understand that it can stop working at any time or be discontinued indefinitely.


The original Double-Check is updated for the new wanikani update, meaning that this script will no longer be updated. You are free to keep using it while any bugs are ironed out on the original, but my work here is done.

Original Post

Given that Double-Check broke since the last wanikani update (as noted in this topic), a quick fix is done and ready.


I didn’t check all use cases, and even the ones that I did check may have edge cases. Use this at your own risk, this was a quick and dirty job, not a good one.

Current Version

0.5.4 (FINAL)

WKOF version


Supported Browsers

Firefox 111.0.1 (64-bit) (Looks like FF >= 108 or FF >= 102 with import maps enabled)
Chrome 111.0.5563.147 (Official Build) (64-bit) (Looks like Chrome >= 89 works)

Other browsers based on chromium are expected to work at the most recent version, but may not.
Safari >= 16.4 might work, anything less definitely won’t
With any other browser you might get lucky.

Working Features

  • If you hit backspace or the undo button, you can retype your answer.
  • If you press enter or click the next button, you can move on to the next review.
  • When you complete an item, the SRS notification should appear for the item.
  • If you click on the “more details” button, info loads properly
  • Burning an item you previously clicked “undo” warns properly when the setting is enabled

Known Issues

  • Audio probably doesn’t work correctly all the time, since I removed most of the code for it. Anything that does work is a happy accident
  • Some text validation between readings/meanings/kana/non-kana won’t work 100% of the time, but it doesn’t stop other things from working as expected.
  • Lightning mode button looks a little off
  • Clicking lightning mode button causes the script to break until a refresh
  • Untested: marking answer wrong or right, lightning mode itself

There will be no more updates to this script.


I got a question on my approach, so I’ll describe the basics of what needed to be changed.

  1. WaniKani updated their entire review page, so all of the hooks into the page are completely different. So a lot of the changes were replacing query selectors with ones that would work. In the same vein, the classes that are available in the CSS stylings are different, so some things do not look good yet with this script. And finally, many objects that were available on the window were not any longer. Some of these expected window objects no longer existed so I found replacements, and some I just added to the window myself.
  2. The jStorage module is no longer available across WaniKani. In theory a script could pull it in so it is available, but I found that the JS Map class works for almost everything this script needed. I just did a bit of class composition to wrap a Map with a set/key update event so listening to changes would still work. I then had to get the current item details myself and load them into jStorage, and I did not confirm that everything being stored there still worked.
  3. The last major change that arguably is a part of the first point was grabbing the hooks that were previously available on the window from the new Stimulus controller objects.
1 Like

Just installed and I can’t seem to hit enter to submit an answer with the script running.

I’m on Chrome with Tampermonkey and disabled all scripts except for this one and WK Open Framework.

stimulus.min-25bc004b0c72612dc2753d7fa8f87f1aa6a877adce8bb2ffee45fb68e25f6116.js:2 Error invoking action "click->quiz-input#submitAnswer"

TypeError: Cannot read properties of undefined (reading 'passed')
    at t.new_submit_handler [as submitAnswer] (userscript.html?name=Wanikani%2520Double-Check%2520Gart-Temp-Fix.user.js&id=5e30680f-8673-4d5e-8245-7f821664a6b1:694:35)
    at d.invokeWithEvent (stimulus.min-25bc004b0c72612dc2753d7fa8f87f1aa6a877adce8bb2ffee45fb68e25f6116.js:1:7065)
    at d.handleEvent (stimulus.min-25bc004b0c72612dc2753d7fa8f87f1aa6a877adce8bb2ffee45fb68e25f6116.js:1:6454)
    at e.handleEvent (stimulus.min-25bc004b0c72612dc2753d7fa8f87f1aa6a877adce8bb2ffee45fb68e25f6116.js:1:3879)
    at HTMLButtonElement.object (review:6:42133)
    at HTMLButtonElement.nrWrapper (review:6:35899)
    at #r (quiz_input_controller-e9558ad2b83c14ee1c1fa481e77ae26d5564db5ad8191c8c1c25476291eb0875.js:1:1568)
    at HTMLInputElement.nrWrapper (review:6:35899)

Thanks for including the error message!

I have noticed some weird issues that look like race conditions, and while I haven’t seen this error specifically, I wonder if it might be related. My only recommendation while I look into it is maybe to wait a little longer during the initial load, and I’ll do what I can to shore up this most basic flow.


Thanks for doing this, typos were killing me.

Running it on Vivaldi with Tampermonkey, retype works but the button won’t let you advance.

Quick note, I can’t get it to work at all on Chrome, so I’ll start debugging there.

1 Like

Thanks for the report!

I’ve never used Vivaldi so I’d have to install it to test it out, but it looks like it’s chromium-based, so I’ll try to fix the script for chrome first and hopefully it fixes Vivaldi as well.

Thank you so much for working on this! I just tried on Firefox as well and got a slightly different error message:

Error invoking action "click->quiz-input#submitAnswer"

 TypeError: item is undefined
    new_submit_handler moz-extension://07b1a7c0-97cb-4791-8f66-c0f28793a421/userscripts/Wanikani Double-Check Gart-Temp-Fix.user.js?id=d4af4e25-e45f-47c8-be42-713fc4e9ad75:567
    invokeWithEvent https://assets.wanikani.com/assets/stimulus.min-25bc004b0c72612dc2753d7fa8f87f1aa6a877adce8bb2ffee45fb68e25f6116.js:1
    handleEvent https://assets.wanikani.com/assets/stimulus.min-25bc004b0c72612dc2753d7fa8f87f1aa6a877adce8bb2ffee45fb68e25f6116.js:1
    handleEvent https://assets.wanikani.com/assets/stimulus.min-25bc004b0c72612dc2753d7fa8f87f1aa6a877adce8bb2ffee45fb68e25f6116.js:1
    object https://www.wanikani.com/subjects/review:6
    nrWrapper https://www.wanikani.com/subjects/review:6
    #r https://assets.wanikani.com/assets/v4/controllers/quiz_input_controller-e9558ad2b83c14ee1c1fa481e77ae26d5564db5ad8191c8c1c25476291eb0875.js:1
    nrWrapper https://www.wanikani.com/subjects/review:6

I got it to work initially on chrome at version 0.0.5, but there’s a weird behavior with it at the moment…

If you click enter, it will mark it as right or wrong, but if you get it right you can’t undo it. And if you get it wrong, after you undo the focus won’t be on the textbox, so you have to click back in to retype.

So it seems to work but you have to be careful what you press.

Can you try it again on Vivaldi at 0.0.5? I did notice that sometimes I have to press the submit button multiple times to get it to go through.

Interesting. I can’t get it to submit at all (incorrect or correct) with the script enabled.

Visually, it just looks like nothing happened and it never gets marked right or wrong and never advances.

If I click the “redo” button it clears the input field, but again, I can’t seem to submit.

Okay, looks like I need to try a little harder to get this flow working. I’m having trouble getting greasyfork to let me install the most up to date version of my script though.

1 Like

Are you getting any errors? On 0.0.5 I’m not able to repro this issue. I’ll keep working on getting other parts of the flow to work, and hopefully they’ll fix what you’re seeing, but without more to go on I’m not sure where to go with this issue.

It (v. 0.0.5) seems to be doing nothing at all on Safari for me. The Developer console shows nothing. I don’t know if there’s supposed to be an on-screen button (there isn’t), but after I submit, it turns green or red as normal, and +, -, (backspace) and (escape) all do nothing—neither visibly nor in the JS console.

Whether this script is activated or not, the Developer console has these two errors:

Load failed

Nothing but your script and the WaniKani Open Framework are activated.

Oh—I wonder if it’s possible to inject something into the ? popup? Then I’d at least know the script had loaded…

Just updated to the version 0.0.5 and I can now submit!

Did get a couple other weird issues, not sure if they are related to the script or WK itself being broken:

  1. “more info” failed to load with a note about “connection issues” which makes no sense because I’m on a desktop computer plugged directly into my router
  2. “more info” expanded with the wrong info (information for previous review item, not current one):
  3. Answering and then “undo” and answering wrong again sometimes results in the answer field getting greyed out:
1 Like

When it loads you should see this:

Nope, I get no button. Nothing, no errors, just, nothing.

p.s. The updated Ultimate Timeline script is working 100% normally just like pre-change on the Dashboard. The Reorder Omega script is loading and I can configure it, but it does not actually run in reviews or extra study; I haven’t had any new lessons to try it on yet.

This may be a silly question, but you also have WaniKani Open Framwork script enabled, right?

This script requires that one in order to run.

I think you should also be able to check Tampermonkey / Greasemonkey to confirm the list of scripts enabled on the page:

If so, I’d try disabling everything except those two scripts and see if it at least loads up the button.

Edited: because it could be an issue of this script interfering with another one.

Sorry, I don’t have a Mac so I can’t test with Safari to see if what you were seeing is similar to what I was seeing earlier.

Yes, as I mentioned above:

It’s required for the Ultimate Timeline and Reorder Omega scripts anyway—if I deactivate it, they both complain with alerts. (Double-Check does not complain, but I don’t know if it would normally.)