[Userscript] WaniKani Pitch Info

Originally, I just wanted to modify this script so that it works with the changes to the lessons, but in the end it turned into a complete rewrite of this script. I don’t know what I should do with it now? Is it considered rude to make a pull request that basically replaces the entire code? Should I instead publish it as a new script? But that seems bad because the current script users won’t get the update automatically.

For now, my version can be installed from here.

This version only uses the github file suggested by @seanblue. A few hundred WK vocabulary items are missing from this file (see previous post). For する verbs, my script currently looks up the word without the する and use that pitch accent. I’m a bit worried that this might not always be correct.

Screenshots of the new script version

I have added some “settings” to the script (a few variables at the top of the script code, no fancy UI). The radius of the dots and the line thickness can be changed. Digraphs are now not squashed by default, as can be seen in the screenshot for きゅう (but this can also be changed with a setting):


The description below the reading now shows which pitch accent belongs to which word type:



I don’t see why that would be a problem. It’s not actually a single word anyway.

I have just noticed that in the github file, the entry for 対 is

対	たい	1

but for 対する, the entry is

対する	たいする	3

I don’t know if this is an exception/considered a different word, or if this might also happen for other words where the entry with appended する is actually missing from the github file.

1 Like

For some words, the する version is read differently altogether, e.g. 達する (たっする) or 接する (せっする). So you can probably not avoid having a separate treatment at least for those special cases…

達する and 接する are both in the github file, so at least those two are no problem.

Unless there are some rules that can be implemented, the only “separate treatment” that I can think of is to not display anything at all if the full word including the する is not in the file.

1 Like

I think if they are in the file you can consider them separate words from a dictionary perspective. I just meant that I think it’s a reasonable assumption that if the する version isn’t in the file that you can just grab the non-する version. If you’re really concerned, add a small disclaimer on the page in those cases.

1 Like

I’ve noticed a bug whenever I do more than 5 lessons. For the first set of 5 lessons, the script works fine, but when the next set of 5 loads, the script causes my entire WaniKani tab to freeze once I try to see the reading of the first word. This happens every time for me, so I end up having to close the tab and reopen WaniKani each time I want to do 5 more lessons.

I realise the script creator hasn’t been online in a year or two, so I doubt it’ll be fixed. Is anyone else experiencing this problem? It may just be a problem with my set-up so I thought I should ask :sweat_smile:

1 Like

That happens to me too, but I think I get two or three sets before it breaks. Also, I didn’t know which script it was, so thanks for confirming that for me.


I think I have found the bug that you described in my “WaniKani Item Info Injector” library script that “WaniKani Pitch Info” uses. I have fixed it and will create a pull request for “WaniKani Pitch Info” to update to the newest version of “WaniKani Item Info Injector”.

You can either wait until the script author accepts my pull request, or you can install “WaniKani Item Info Injector” directly to immediately use the newest version.

Also, if it still does not work after the update, let me know and I will look into it.

EDIT: I had forgotten that the script author of this userscript has already given me write access to the repository. Version 0.56 of “WaniKani Pitch Info” is up and contains the fix.


Thank you so much!

1 Like

Thank you! I won’t be able to test it until I actually get enough new lessons, but I’m sure it has fixed the problem :grin: :grin:

1 Like

Encountering an error that I’m not sure is on my end or not. It affects 3 scripts so I’m posting it on each of their pages in the hopes that someone will be able to fix it for me.

Pitch Info, Cherry Picker, and Hide Context Sentences all fail to load/work correctly when I load up a vocabulary page. Here’s the console errors:

Sometimes I look at Tampermonkey and see that they’re not even showing up in the list of scripts on the page, othertimes they show up but seem to do nothing. Any ideas?


I will fix it when I’m home from work (in about 9 hours).

Update: Should be fixed now in version 0.61.


Just came here to thank you for your amazing work.


It seems to me that the only time I really get to see the pitch pattern info is during the lessons.
However, that definitely isn’t enough for me to remember properly.
Is there a way to show it later as well in some way?
This addon is generally helpful though!
(Sorry if this was answered before. You can post a link to another answer if you like. Thanks.)

The pitch pattern is also shown during reviews, if you bring up the item info (click the :eye: icon or press F) after answering. What I often do is listen to the audio and then check if I heard the pitch accent right.

I only wonder if, for example by means of a script, the pitch (/alternate reading/meaning etc.) could also be shown automatically/without having to click, or at least without the page scrolling down every time, to speed up the flow, and more importantly, to keep it calm.

I take it the latest WaniKani update broke the script? Not seeing pitch info anymore.

Are you on the newest version (0.63)? If yes, on which page do you not see it anymore?

1 Like

Haha so sorry, I was on 0.62. Just updated, and it appears it is working fine :sweat_smile: