[Userscript] WK Anki Mode

I made a version with buttons for mobile:

I believe @irrelephant also made a less hacky version with buttons (also linked in there iirc). Not sure if it still works though, it’s been a while since I’ve actively used WK :wink:

1 Like

thank you, i’ll check it out :slight_smile:

1 Like

Oh I really doubt that! :smiley:

But I can tell you that at least my version still works, I use it every day. I also built my own little iOS app workaround ( Running userscripts on iOS: a workaround in case anyone is interested ) just so that I can use it on iOS. I don’t know how everyone else does it but the typing on mobile would drive me insane otherwise.

:heart: Anki mode! :heart:

1 Like

Shoutout to Anki mode for allowing me to do my reviews without complications to my fingers’ overuse injuries that would suspend my software engineering career for years. It’s good to be learning again.

1 Like

irrelephant, I’ve been meaning to get in touch with you but somehow couldn’t find a way to PM you (is that actually possible?).

I’m still in love with your script, but I was wondering if it is possible to have it automatically advance if the answer is correct to speed things up further - I tried using the lightning mode mod, but found it somehow broke the anki mode, but I’d still love something like that because I always have to tap the green or red buttons twice on my phone which adds up over time. Do you think there is a way? That’d be mighty swanky :smiley:

1 Like

They disabled PMs a while ago, there is only a pseudo PM thread now.

So the behaviour in case of an error would stay the same but in case you got it right it would move on immediately? I‘ve never looked into this since I like seeing the new level and being able to read the info after answering but I will have a look when when I find some time in the next couple of days. I had a busy week so far and have a review pile waiting for me first… :slightly_smiling_face:

1 Like

Count me in about the review pile. What a week! Night shift galore!

About the behaviour, I was hoping it would auto-advance when I hit the green button when I combine Anki with Lightning. What actually happens is that it works exactly once, and on the next card, clicking either green or yellow doesn’t trigger anything so you can’t continue. I think it once worked multiple times, but I tried replicating that today and it didn’t. Even then, you had to restart the review to get it to work again. I think there may be some problem with the interaction between the scripts, so it might be necessary to actually code the auto-advance in the anki-mode script and make that optional, but I’m hoping it isn’t since I couldn’t ask you to do that on my behalf.

Now… on to that dreaded review pile! May we ever see the light of day again :wink:

1 Like

Bit of a question on use. I downloaded and installed with tampermonkey and I have the blue button, but whenever it’s in on mode the page just freezes and input areas disappear. I can’t type but also can’t mark correct. So I can write answers and use the site as normal with it off, but I can’t do anything with it on. Not sure what I’m doing wrong.

do you know the shortcuts?

  • press SPACE to reveal answer
  • press 1 to mark as correct
  • press 2 to mark as incorrect

Yes, nothing happens when I hit the shortcuts.

Are we maybe having a misunderstanding here about what Anki modenis supposed to do? It is correctly for the input field to disappear because Anki mode is all anout using the buttons instead of typing.

Either that or I get your question wrong.

So you click „Show Answer“ (Blue) and the the green button if you knew the answer or the red one if you did not know it. Then you click on the green button again to go to the next question. At least that’s how I think it works, I currently have no reviews to check and the process is so automated in my brain that I am not 100% sure about it.

There is only a blue button that turns the input field on and off. There are no other buttons and hitting the numbers or space doesn’t do anything. So it just freezes the input bar but nothing else. I’m using it with the pc version not an app if that makes any difference ?

strange. Just tested in Chrome and Firefox and works fine. Only other troubleshooting I can think of is

  • what browser are you using?
  • paste the console output in a reply. (CTRL+SHIFT+J or right-click > inspect > console tab)

I’m sorry to add to the confusion. You probably installed Mempos original version which works only with shortcuts. Since you mentioned a blue button I incorrectly assumed that you had installed one of the modified version that has buttons so that you can use it easily on a mobile phone (https://greasyfork.org/en/scripts/36746-wanikani-anki-mode-irrelephant-mod-with-buttons )

I’m using Chrome.
This is what I get when I do inspect
Active resource loading counts reached a per-frame limit while the tab was in background. Network requests will be delayed until a previous loading finishes, or the tab is brought to the foreground. See https://www.chromestatus.com/feature/5527160148197376 for more details
application-ad22670f636ed2b126016bb87aa69fb8a2e303e03c794926cac203bbeeddb70a.js:2 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2
userscript.html?id=44f3e9f4-0f6b-44ec-8494-4d83d4cd7d37:125 WKO: loaded
userscript.html?id=815ec36c-40b1-45e3-a969-614aa0ff93a9:19 /// Start of Wanikani Anki Mode
userscript.html?id=815ec36c-40b1-45e3-a969-614aa0ff93a9:25 ƒ (e,t){var n,i,r,a,o,s,u,c,l,d,f,p,h,m,g,y;if(r=,u=,o=.jStorage.get("currentItem"),n=!1,d=!1,l=!1,s=!1,t=.trim(t),“reading”===e&&(t=t.replace(/n/g,"\u3093").replace(/\s/g,"")),$("#user-response"…
userscript.html?id=815ec36c-40b1-45e3-a969-614aa0ff93a9:237 ///////////// AUTOSTART: false
application-ad22670f636ed2b126016bb87aa69fb8a2e303e03c794926cac203bbeeddb70a.js:3 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://maxcdn.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.woff?v=3.2.1
application-ad22670f636ed2b126016bb87aa69fb8a2e303e03c794926cac203bbeeddb70a.js:3 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu.woff2
css-hits-counter.js:153 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2
userscript.html?id=44f3e9f4-0f6b-44ec-8494-4d83d4cd7d37:125 WKO: k665

unfortunately that doesn’t tell me anything except that you have slow internet. The only other thing you might try is reinstalling the script, but otherwise I have no idea what is going on.

EDIT: posted an update with a minor change to the script. Did that fix it by any chance?

Doesn’t seem to, but it may just be an issue with tampermonkey since I tried downloading another script that used shortcuts just to see and those shortcuts don’t work either. I assume that’s also what is causing the slow internet error because every other window tampermonkey can’t access doesn’t have that on the console tab and shows up like normal. Thanks for trying to help!

maybe there’s a faulty script that slows everything down. Something that includes external libraries like jQuery might do that.

1 Like

Very cool script! As a big Anki user, this helps me a lot. Typing is pretty slow and error prone for me. And in Anki mode, I force myself to pronounce the meanings and readings, which I think helps the memorizing process (for me at least).

One tiny suggestion: is it at all possible to have the audio play as soon as we press space bar, and then press correct or incorrect? Being able to read the hiragana while hearing it might help me consolidate my hiranaga skills :slight_smile:

Thanks for the good work!

Hey all,

I’ve been using this script for a while (shout out to doing reviews at work via anki mode :wink: ) and I wanted to change the keyboard shortcuts so I can sit a bit more comfy. Couldn’t find anything about it in the thread so I did some digging; I’m not a programmer

Around line 250 you’ll find bindHotkeys

You can change the javascript character code accordingly!