Parts of Lessons converted to React now in Preview

Earlier in this thread, I was talking about attempting to prepare @acm2010’s wk_interaction.js for the upcoming changes, but in the end, I decided to create a new library script instead. “WK Item Info Injector” is intended to simplify the addition/modification of WK item info for any script that wants to use it. For example, to create a script that adds a section below WaniKani’s “Meaning” section showing the item ID during lessons and on the item page, you just need to @require the library script and write

wkItemInfo.on(`lesson,itemPage`).under(`meaning`).append(`Item ID`, o => o.id);

and it should result in this:

Screenshots

Lesson:

Item Page:


I tried to make the library script useful for as many different use cases as possible, so I tested it with the unmaintained scripts from this list:

For Keisei, Niai, and Rendaku Information, I have the test implementations on my github forks:
Install Keisei Test
Install Niai Test
Install Rendaku Information Test
Unless someone reports any problems with these versions (or my library script), I intend to create pull requests so that the changes are proposed to the original script authors.
Advanced Context Sentence is, as far as I know, not on github, so I have my modifications only locally, but unless there is negative feedback for my library script, I plan to post my code in the respective thread.

My own two scripts affected by the change to React, Mnemonic Artwork and Old Mnemonics, are already using WK Item Info Injector.


I think I should probably create a new thread describing WK Item Info Injector and how to utilize it, but for now I just wanted to see if anyone immediately notices any issues with it. I have only tested it in Edge (Tampermonkey, Violentmonkey) and Firefox (Tampermonkey, Greasemonkey), and I feel very hesitant to suggest to other script authors to rely on such a barely tested library script.

4 Likes