[Userscript] WaniKani Rendaku Information

Seems to be working now. Thanks!

There seems to be an incompatibility with the changes at preview.wanikani.com during vocab lessons on the reading tab. The audio elements end up getting duplicated into the rendaku section. It looks like removing the col1 class from the rendaku section fixes it.

I don’t consider this to be a bug, but it’s writing a rendaku explanation for a reading that isn’t used in the vocab itself (just an alternate kun’yomi of one of the kanji).
Just wanted to let you know of this!

This script doesn’t seem to work on recent versions of wanikani… I turned on debug logging and it seems it adds the initial callback for subject being ready but none of the initialization code runs…

I think the problem is that this script uses some code from other userscripts (Keisei/Niai), and that other code recently broke after some changes in WK. Today, I have attempted to fix the Keisei/Niai scripts. By changing the Rendaku Information script to use my fix, it should hopefully also work again. I have sent a pull request to @nonymouse, so you can wait for them to maybe merge my fix. Alternatively, you can immediately update here:

Rendaku Information script update

I have merged this pull request, thanks! I have a feeling there may be more fixes required however. I looked at a lesson page and I did not see any rendaku information - I’m afraid I’m don’t have much time to look into it at the moment.

1 Like

Maybe you just looked at the lesson for an item that is not in rendaku_information_data.json?

Yes, turns out all the lessons I had available were for vocab which was added after the script was generated. I did see the rendaku information section when I pulled up an old lesson. Thanks!

1 Like

In lessons, on the vocab lesson slide, it looks like audio is getting put on the slide twice, once where it normally is and once under the rendaku script. Also, the audio under the rendak script auto plays meaning the audio on that slide plays twice. This is sometimes difficult to notice since both audios play at about the same time so it sometimes sounds like just one audio instead of two.

Edit: removing the col1 class from the rendaku section seems to fix it.

I’m having a déjà vu – I have just read that yesterday after posting my bugfix here :laughing:

In the little testing I did yesterday, I did not encounter that bug because it seems to only happen when the rendaku section is non-empty, and I only have lessons for the new WK items that this script does not know.

I’m not sure if you intended to reply to me or the script author, but I went ahead and created a pull request with the fix.

I totally forgot that I had posted a fix for this before. Thanks for submitting the pull request!

1 Like

I have merged the pull request. Thanks!

I also added the source code which originally generated rerendaku_information_data.json, and a brief README, in case anyone is interested in updating the script further - either with the new added vocab or with improved rendaku rules.

1 Like

@nonymouse @Sinyaven

Just a heads up, the switch to using react in more places on the lesson page at https://preview.wanikani.com/ causes certain DOM elements not to be present until a while after DOMContentLoaded, and for certain elements, not until they are actually shown on the page. Also, elements that are not shown are typically removed from the DOM now. This breaks WKInteraction and any scripts that depend on it, including the Rendaku Information script and Keisei. The change is only on the preview site for now, but will presumably eventually go live on the main site.

Edit: Advanced Context Sentence is also broken, although it does not use this framework.

Hi everyone!

It seems I´m experiencing some problems related to the script. Suddenly the rendaku information has stopped appearing in lessons and is only available in the individual vocab page. Does anybody have the same problem? Any feedback?

Many thanks in advance!

Edit: I installed and uninstalled but nothing changed.

WK has updated the lesson screen today. I have already created a fix that you can download here:

2 Likes

Awesome! Problem solved!

Many thanks! :pray:

1 Like

@nonymouse I just noticed that I forgot to increase the version number in my pull request. Can you do that, or should I create a new pull request?

EDIT: Oh, you invited me as collaborator. In that case, I can probably change it myself :smiley:

Thanks Sinyaven! I merged the pull request. I also invited you as a collaborator on the repo so feel free to release updates yourself, since at this point you’re a better judge than me of whether they are working.

1 Like

HI! Very small thing, is it possible for a switch to disable the category altogether in cases where the rendaku information is not relevant to the reading (like for a single kanji). Thanks!

image

The new version 0.2008 now adds a settings menu that allows to “Hide trivial info”. To enable this setting, you need to have Open Framework installed, visit a vocabulary item page, and open the settings dialog through the menu:

image

With this setting enabled, the Rendaku Information section will not be added to the page if the description contains the phrase “no possible rendaku”.

1 Like