Upcoming Front-End Updates on WaniKani & Effect on Scripts

Hi Everyone,

Important announcement if you make scripts or use scripts.

We’re starting work on the WaniKani front-end code. Quick story is: we’re converting it to React. To start we’ll be touching the Lessons section, replacing it piece by piece. If everything works perfectly, it will look and feel exactly the same to start (though we’re planning to throw in user synonyms on the Lessons while we’re in there). Even if you don’t notice a difference in vanilla WaniKani, one thing will be affected: scripts! Although we don’t know specifically how many people use scripts in Lessons , we do know ~5-10% of our users use scripts, which is no small number. We had a lot of thinking to do.

What will this update do, and is it worth it in the end? On the less impactful side of the spectrum, this update will be good for bug fixes and performance. We’ll be able to make changes more quickly. When new features are introduced, bugs will be much easier to identify and deal with. Speaking of features (here’s the main reason we’re doing this), we’re working on some things, and we needed more flexibility in Lessons and Reviews to do them. I wish I could talk more about this now, but I think in the long-term, the overall benefit will become obvious, even if it’s a bit of a pain right now.

But, I’m here to talk about the short term! Because scripts are built on assumptions about the front-end code, and because we’re going to be changing it, some scripts will stop working. Scripts are going to break! In some cases, authors will need to update their scripts. In other cases, it may not be possible to update a script to be compatible. We’ll do our best to avoid this situation, and if we can’t we’ll try to address it in our own application or help users find a workaround.

We’ll try to make the transition as smooth as possible, and communicate about progress regularly. We’ll post smaller updates and guide(s) on the forums and do larger announcements on our developer/API email list. Before it goes live, we’ll put the changes on a public test server for script authors to try.

We very much admire the work and enthusiasm around scripts. The value you’ve added is awesome, honestly. It’s a scary change for everybody, I think, but in the end it will be good. Let us know if you have any questions. Myself or one of the other people on this project will do our best to give you an answer. Thank you!

Edit: I added groups to our email list, which was originally just for API updates, but now covers general developer kinds of things. If you signed up to the list previously, you’ll want to update your notification settings (unless you just want API updates, then you’re good). Just sign up for the list again, choose what you want to be notified about, and submit. As long as you used the same email, it should overwrite your email profile and you’ll be added to the notification groups you want to be on.

Related Posts / Update Posts:

  • Related Post, 1/23: UserScript Guidelines for Upcoming Front-End Updates
  • Update, 1/31: We wanted to update everyone that, well, we don’t have any updates yet. We’re working on laying down the groundwork before we incrementally replace components. We’ll be back here next week to let you know if we start deploying anything to our preview servers. - @gomakuma @WaniKaniJavi
  • Update, 2/7: Still quiet this week but we are wrapping up some changes today. Planning to post a preview server URL on Monday (2/10) for everyone to check out! - @gomakuma @WaniKaniJavi
  • Update, 2/11: Preview site, forum thread and email newsletter updated.
  • Update, 2/12: Added a note about making sure the @include whitelist on user scripts include preview.wanikani.com
  • Update, 2/21: Some changes coming on preview.wanikani.com on Monday (2/24). Working our way down the Lesson Quiz to convert the answer form and answer feedback to React, the Kana chart, Info and Audio button container, and the bottom right corner shortcut key map and contact link. Will post here and send out an email update when it’s live.
  • Update, 5/13: We pushed an updated version of jStorage yesterday that uses sessionStorage instead of localStorage. If you have scripts/extensions that access jStorage by way of localStorage, you’ll need to make updates to look in sessionStorage instead.
  • 5/21: Updating the preview server today with some React changes. Everything inside the #lessons div on /lessons will be rendered by React but manipulated by jQuery, and the stats section is now a React component. We’re still using jStorage for all of it.
  • 5/29: Another set of updates on preview. We expanded the React component to encompass most of the body of /lessons. Within it, the new React sections are the home, skip, character display, question label, and the shortcut key and contact buttons on the bottom right.
  • 6/4: The changes from 5/21 are now on production
  • 6/9: preview.wanikani.com has an update where the lesson quiz answer checking logic has been separated from the jQuery front-end code. no front-facing changes like markup or CSS.
  • 6/16: www.wanikani.com: Header, Subject, Subject Type, Footer Buttons React components along with the answer checker logic
    preview.wanikani.com: Lesson quiz answer field and tooltips are now React rendered

Sounds good. Would you be able to provide a beta environment for script authors to test their scripts on the new changes before the WK changes go live?


I think you’ll find most people who use scripts probably use at least one in lessons and/or reviews. Any script that actually manipulates the lesson/review content or order do so by hooking into $.jStorage. Keys like l/activeQueue, l/lessonQueue, etc. You can find a decent example of this for lessons in my Lesson Filter script.

As long as you still use that, the lesson and review scripts can probably still manage to work with some modifications. If you replace that with something that fully manages it internally (non-window functions), we’re in big trouble for those scripts, and I don’t think you’ll be happy with the blowback if literally all lesson/review scripts break and can’t be fixed.

If you decide to get rid of that for technical reasons, I highly recommend that you add public functions on window to allow scripts to get and set the lesson/review items. Even if you add more complex lesson/review ordering at a later date, I think allowing scripts to customize this would still be beneficial.


Hi @sornvru - I’m one of the devs at Tofugu. Yes, we’ll be putting the changes on a test server that everyone can access, and you’ll be able to test scripts there. We’ll let you know in the forums and the mailing list when the preview site is ready.



Welcome @gomakuma! Also @TofuguJenny!


Awesome and welcome. I’m glad to see the team communicating earlier in the process.

While the majority don’t use scripts, for those of us who do, they are quite fundamental to the way we use WK, so keeping them working through any changes, especially to any scripts that hit into lessons and reviews is a very high priority.

I like the way this is being handled, so I’m optimistic and looking forward to seeing the new changes.


I’m sure it wasn’t an easy decision to do something that can greatly affect user scripts, since so many members rely on them.

It indeed sounds like a bit of a scary change, but I’m also excited to see what kind of changes and improvements the WK team is planning. It’s clear that you’re trying to accommodate scripts and script creators as much as you feasibly can in this process, and I think that’s great.

On to better and better things! ^^


Now I feel like I’m running an old version lol


I would literally not use WK without scripts


Wow, I’d expect that number to be much higher :open_mouth:

I LOVE Jenny’s avatar :c


I used WaniKani for a while without scripts, but it was overwhelming. If I wasn’t able to build my aforementioned Lesson Filter script, I’m sure I would have given up by level 30.

Perhaps of note, when I finally created that script, it was after WaniKani introduced the default lesson ordering (instead of random), and I designed it specifically to adhere to that new ordering. I feel like in that way my script compliments WaniKani, instead of changes it. That’s one of the reasons I hope lesson ordering code hooks become more explicit with these changes, allowing more scripts to compliment WaniKani’s intended learning method.


According to this estimation, most users are under level 10. At lower levels the need for script is not that high, I guess.

But it would be interesting to know the percent of script users at higher levels. Especially for people who reached level 60, I would expect the majority to use script.


Greasyfork says that WKOF has 15,000 installs. I guess that means that WK has at least 150,000 to 300,000 users


That would be amazing for Tofogu ! But maybe that number can be cut dramatically if there is a lot people like me who installed WKOF like four or five times, on old pc, new pc, old job pc, new job pc… :sweat_smile:


It would be great if you used some kind of central state storage again like Redux and exposed the store globally :slight_smile: Also if you exposed ReactDOM, scripters could more easily write their own Components. React :heavy_heart_exclamation:


Couple post updates:

  1. We made a change to the email list - now you can sign up for the category you are interested in. If you previously signed up for info on API updates, that’s all you’ll be subscribed to. If you sign up again with the same email and choose the userscripts related option, it’ll update your email list profile.
  2. We posted UserScript Guidelines for Upcoming Front-End Updates. It has some info on where script-affecting updates are headed.

Can you keep track of how many times a user has reset?
Using that, can you allow to users who had reset at least one time to add synonyms when taking lessons? Currently I have to take a lesson, unlock the word and then I’m able to add synonyms.

Or they can just make it a regular feature for everyone, as in:

In the meantime there’s a script for it if you want it now.

1 Like

Would it be possible to add support to the public API for manipulating lesson and review ordering? That seems like it would be better, as it allows scripts to keep working no matter how you change the frontend.

1 Like