[Userscript]: Double-Check (Version 2.x)


Please let me know if there is anything I can do to help.


Are there any errors in the Javascript console? (In Chrome, press F12 and click on the Console tab)


Here you go:


Here is the same in safari:


The script is actually working in your Chrome snapshot, but it seems your browser is rejecting FontAwesome, which is a web font used by Wanikani (and Double Check). This is usually caused by a security plugin.


Ah great, thanks. After reinstalling chrome it now works perfectly. Thanks for the help and the amazing script! However, it still isn’t working on Safari. Is the javascript console screenshot for Safari helpful?


Yeah, it will probably be useful. Later tonight, I’ll boot up a Mac virtual machine and see if I can reproduce the error in Safari.


Thank you for your hardwork on the scripts. They are really helpful!


I found a bug in the Open Framework that was causing Safari to complain. It’s fixed now, so it should work if you update it [here].


I just tested it out in Safari again and it works great! I was also able to use it with all my scripts activated. Thanks a lot for the fixes! Great work!


I just noticed a minor conflict with another of the scripts i’m using.
Whenever i click skip or delay, it “refreshes” the current vocab/kanji but it does not give me a different one.
If i disable Double check, it works as intended.


@rfindley Did you find a simple, general solution in this script for adding, enabling, and disabling the buttons in the menu (the existing ones like “Item Info” and the ones the script adds like “Mark Right” / “Mark Wrong” and “Retype”)? Or does it rely heavily on the fact that you are overriding the submit functionality?


I extracted the code that WK runs when when you click the submit button, including the enableButtons() function, and removed the part where it actually submits result. There’s really no clean way to do it since most of the WK code is in an anonymous wrapper.

As for adding buttons, I detect how many are currently present, adjust the CSS width accordingly, and append the html for the additional buttons.


And do you manually re-disable button when someone chooses to retype?

I see this:

$('#option-double-check').addClass('disabled').find('span').attr('title','Mark Right').find('i').attr('class','icon-thumbs-up');

But I don’t see on a glance how you disable the “official” buttons again.


Same process: I extracted the code that WK uses to reset for a new question. It’s all inside my set_answer_state() function.


Okay, thanks. I guess I’ll find a different way to do what I want. Strictly speaking, I don’t need the button to be in that menu bar. It’s just that the thing I wanted to add didn’t logically fit with reading or meaning, so I wasn’t sure where to put it in the Item Info section.


Looking through my code, I think this:

$.jStorage.set('currentItem', item);

triggers a listener in the WK code that resets the buttons.
You could do the same. jstorage has a listenKeyChange function, or something similarly named.


It’s probably not practical. I’d need to detect when answers were submitted to enable my button, then disable it again if the user selected Retype in Double Check to keep the scripts compatible. And I definitely wouldn’t want to reset the current item as part of my script.

All I want to do is add a link to the item page for the item currently being reviewed, but not allow the link to be opened until the user has answered. I thought the menu bar would be convenient, but it sounds like I should just find some place in the Item Info section to put it.


I can add hooks in my script for the various actions, if that helps.


I appreciate it, but I’d like my script to work without requiring people to install Double Check.