[Userscript] Wanikani Katakana For Onyomi

Overview This script transforms everything related to kanji onyomi readings into カタカナ.You may find this helpful as this is the dictionary standard, and is also a great opportunity to become more familiar with these characters.

Requirements: Wanikani must be set to Script Compatibility Mode “On” under Settings > App.
Script installation: WaniKani Katakana For On'yomi

Acknowledgements This is a continuation of [Userscript] WaniKani Katakana Madness by @Miaka who is no longer active. The vast majority of the code was written by Miaka.

Known Issues:
Script compatibility mode is required.
Replacement into katakana does not work perfectly during reviews/quiz. If you show full information it should work.
During lesson quizes, the input will not accept single n as a valid input. Ex: To get セン you must type senn. Consider this practice for japanese keyboard input on less lenient software :slight_smile:

16 Likes

Everything? As in kanji and vocab? Or just for kanji?

1 Like

Just Kanji. Will clarify op.

1 Like

Question. Will typing the answer in hiragana be counted as wrong?

Your answer will automatically be converted into katakana when appropriate.

2 Likes

It’d be nice to have an option to switch everything over to katakana. I presume it’s trivial to do in the code, so I’m going to try and tweak it for myself.

Thanks for the update!

1 Like

Depends on what you mean by everything. Making the current replacements work for all items should be pretty trivial (delete some if statements), replacing additional content is more annoying.

Hey, thanks for taking over this script.

I wonder if you would be able to add functionality for extra study questions as well?

It doesn’t break anything, it’s just a bit jarring doing extra practice and using hiragana instead.

1 Like

I can look into it.

1 Like

There is a new version now that should support extra study. I don’t really use that feature of wk, so please let me know if there are any issues.

1 Like

Seems to be working perfectly in Recently learned extra study, I don’t plan on making a kanji mistake just to test that out though, so I’ll let you know if I ever do.

Thank you so much!

1 Like

Hi Guys,

It seems I cant write ン during lessons. It always enters N and readings cant get validate.
Is this a specific known issue of Katana for onyomi ? or I do I have to much userscripts etc ?

Try typing nn, it should turn into ン. It’s a known issue that I haven’t managed to fix.

1 Like

Hey, I’m having an issue that I think might be with the script, but I’m not 100% certain. I can reproduce it with most of my other scripts off, but I do have Reorder Omega enabled because it would be terrible to test this without it, given the stack of 700 reviews I’m still whittling down (From 1500, halfway there, woo). I do see that you have Script Compatibility mode as required, and I do have that enabled at least.

At least during reviews, the reading mnemonic section seems to have its formatting stripped away on items with an on’yomi reading that are converted.

If you’d like I can test further with only this script, but it might take a bit for me to lottery onto an on’yomi kanji reading.

Hmm, yeah that’s probably caused by this, as this script does go into this content to modify it to katakana.

I’ll investigate it and see if I can fix. Thanks for the heads up.

1 Like

I tried to fix this, and think I found something, I’m testing currently and will release it on tampermonkey if I don’t see any issues.

If you want to test it yourself before then, you can edit the script by changing the line that contains
var reviewItemInfoDropDownReadingLocator
to be
var reviewItemInfoDropDownReadingLocator =‘#item-info-reading-mnemonic span:lang(ja)’;

Just tried it out on my machine, and looks to be working fine now. Hope your testing goes just as well.

As a side note, being out of kanji reviews for another hour and only having vocabulary to test it on… I don’t think I’ve thought about how many words are just “If you know the readings of your kanji you’ll know how to read this as well” until having to go look for one that isn’t. At least there’s the header and hint section of that block being fixed to sanity check that I didn’t somehow mess something up putting that in until I hit one.

Yeah, this is why I usually take a few days to test. It can take quite a lot of reviews before you hit a combo that I failed to foresee while coding.

Thanks for this! I like being able to know what reading I’m using, and Katakana helps. However, it seems this script breaks the WaniKani Pitch Info userscript. It may be that the Pitch Info userscript will need updating to support Katakana being present

image

I tried changing the UserScript order in Tampermonkey, but that did not work

Hmm, that is strange. This script should only impact kanji, and I assume pitch info is only valid for vocab? It’s certainly possible they interfere anyway, but it is odd.

2 Likes