[Userscript] Anki Mode

: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.

I have decided to take over maintenance of this script since the original creator/maintainer have said they wont be updating it. If you have any suggestions for features or experience any bugs please let me know. :grin:

//Credits
Original script by oregu. original
Then maintained by Mempo. second version

How to Install
Install Wanikani Open Framework - Required for this script
Install “Anki Mode” - this script

Optional
The original script did not work with double-check. This version supports it.
[ Install “Double-Check” ]

This version now uses Wanikani Open Framework in order to have a menu system to change hotkey’s and settings.

The default behavior is :

  • press SPACE to reveal answer

  • press 1 to mark as correct

  • press 2 to mark as incorrect


Changelog
3.0.12 - Added filtering for meanings to be only primary and alternative. Thanks @Schnitzel

3.0.11 - Fix for the new way meanings are being sent. Thanks @mdub1001

3.0.10 - Changed srs_mgr to be set by the quiz_queue controller

3.0.9 - Fixed star icon not showing after WK icon update.

3.0.8 - Added support for new lesson quiz url.

3.0.7 - Fixed an issue causing the script not to load in firefox.

3.0.6 - Added support for new recent mistakes page. Added new recommended script startup by Robin Findley (rfindley). Fixed placeholder text not updating after each question.

3.0.5 - Fixed an issue regarding the saving of settings.

3.0.4 - Added support for lessons again after WK rewrite.

3.0.3 - Fixed the type readings feature after WK rewrite.

3.0.2 - Fix for when marking an answer incorrect it was showing as correct.

3.0.1 - Fixed audio playing after WK rewrite.

3.0.0 - Update to new review/lessons/study Ui/Logic. Still need to fix audio playing and the experimental feature typing readings. They are both disabled right now.

2.2.7 - Added support for the lessons page.

2.2.6 - Fixed an issue with the first reading not playing when a vocabulary word had multiple meanings. Made the experimental feature “show multiple meanings” the default behavior now.

2.2.5 - Added option for playing audio after showing answer

2.2.4 - Added ability to reverse the order of the correct/incorrect buttons.

2.2.3 - Added support for typing readings as an experimental feature

2.2.2 - Added a fix for the experimental feature show multiple readings and added support for double check’s lightning mode

2.2.1 - Fixed an issue involving the new experimental feature Show Multiple Readings.

2.2.0 - Added experimental feature for showing multiple Japanese readings if a item has them.

2.1.1 - Added support for recent mistakes/recent lessons.

2.1.0 - Added a next button after the answer is marked correct/incorrect.

2.0.2 - Fixed a bug that was allowing the correct answer hot key to be triggered before the answer was shown.

2.0.1 - Added new input capture box for hotkeys and added a show answer hotkey option in the settings.


10 Likes

great!

Also, is it possible to add more keys for correct, incorrect and answer?

I would like to add for example, 7 and 8 (for correct and incorrect) and 0 (for show answer) on keypad for the days I have pain in my left hand after a long day’s work :smiley:

Sure, I can add multiple hotkeys. I will also add another hotkey option for show answer as well.

3 Likes

I have added a new type of input box to capture the desired hotkey. In order to do this I had to change the way I was looking at which key was pressed. If the hotkeys stop working on your first run of 2.0.1 please just rebind your hotkeys and it should continue to work from that point on. I have also added the hotkey option for show answer. Please let me know what you think of the new way to add hotkeys.

2 Likes

Hi, great script so far, I enjoy using it everyday! It helps speeding my review sessions a lot.

But I realized that some kanji when I type spacebar to show the answer it doesnt show all the possible readings for it, here for example けん should appear alongside み right?

or is the api from WK doesnt allow it? It would be very odd, because even in those vocab examples below we can see 見物

2 Likes

I believe they only allow me to submit one reading. Does it let you manually type けん and have it be marked correct? I believe most of the kanji items test the most “common reading” that wanikani has selected. I already have 見 burned so I couldn’t test it with that one but I tried it with others and it wouldn’t let me use the other reading. For that kanji it looks like they are testing for the kun reading and some of the vocab is reinforcing the on reading. If you play around with it and find evidence to the contrary let me know.

Some kanji do allow multiple readings to be submitted but I believe you have to choose one of them to submit not both. I usually just grab the first reading in that case. I could try to add a way to show all the readings if you think that would be helpful. Im not sure how to handle the readings if its not one they are testing for in that particular case though.

2 Likes

showing multiple readings when typing space bar would be great!!!

since in anki mode I answer it in my mind, I was always saying けん and then it was み appearing.

Thanks so much for updating the script.

When I press “2/don’t know” the answer bar turns red with random hiragana/xxxxx etc and then I can’t continue until I press “know”

Also, the words that I put “2/don’t know” keeps showing up afterwards.

What is the normal process for this script?

Thanks a lot!

1 Like

The typical flow is clicking show answer and then either ‘I Know’ or ‘I Don’t Know’. This will mark it correct or incorrect. After its been marked incorrect or correct I then hit the same hotkey I marked the answer as to move forward to the next answer. I can see how it would be confusing based on how the ui looks after marking the answer.

Next update I may just hide the answer buttons after the answer has been marked correct or incorrect. In its place I will just have a next button.

As far as this issue goes, could you please upload a gif of you answering the question so I can attempt to replicate this bug.

Thank you for your reply. I’m sorry, I don’t know how to make a GIF on my computer.

I just tested the word “suppress”

1)I hit space bar to show answer—>got answer “yoku” for pronunciation

2)pressed “2/don’t know”

  1. got “ばつっっっ” in answer bar in red

  2. pressed “enter” and “2/don’t know” (different attempts)

  3. It tested me the word “suppress” again with the answer bar being blank and the option of “show answer”

so it becomes a cycle of the process of the same word unless I put “know”

hmm which browser are you using?

Also, could you screenshot the list of scripts you are using for wanikani as well.

Chrome

Sorry, could you take it from the reviews page otherwise any review-related scripts won’t show in the list.

I have istalled the script, but it doesn’t appear at all during reviews. I’m using Safari and the other script I have installed is Wanikani Stroke Order by Kumirei. I tried to disable it to see if that was the problem, but Anki mode still didn’t appear.

1 Like

is it possible to show those multiple answers when we press space bar?

sometimes like 否 the vocab shows only いな when いいえ is also possible.

same with ‘in season’: 旬 only しゅん appears as answer、じゅん is also possible.

Do you not see the star icon in the top left to turn it on or off? I have never tried running the script in safari, but I will try to run it on a machine that has it and get back to you on it.

1 Like

I believe it is, and I intend to do this feature. It’s actually a little more complicated to implement with the current way the answer input is set up and integrated with other plugins. However I do intend to implement it; when work calms down a bit :sweat_smile:. Sorry for the wait I know you asked for it a month ago.

1 Like

Awesome, thank you :sweat_smile: I absolutely didn’t notice the star… My bad, I should’ve read the original post properly. It works! Yay! :joy:

1 Like

I believe anki mode will have to be modified in order to work with recent mistakes, right?

for the moment, we will have to type the answer.

Ignore my previous post. I wasn’t aware of the new feature. I just added support for recent lessons/ recent mistakes. Update and you should be good to go.

2 Likes