This is a third-party script/app and is not created by the WaniKani team. By using this, you understand that it can stop working at any time or be discontinued indefinitely.
With the new lesson picker and associated changes, this script no longer works. Please check out this wonderful replacement: [Userscript] Better Lesson Picker
Original script information
What is it?
This script lets you specify the number of lessons of each type you want to do in a given session, while maintaining WaniKani’s intended lesson order. This means that if you use this script with the Ascending level then subject setting, you will get the radicals, kanji, and vocab that WaniKani wants you to learn first, just limited to how many lessons of each type you want.
How to Install?
- As always, make sure you have a script manager installed. If you don’t, follow these instructions.
- Get the script here: WaniKani Lesson Filter
Recommended Workflow
- On the settings page, use Ascending level then subject or Ascending level then shuffled.
- When doing lessons, type in the total number of radicals, kanji, and vocab you want to learn in the inputs. If you leave an input blank, the script will keep all lessons for that type.
- Optionally, use the orange input to specify the batch size you want to use. If you leave it blank, it will use the batch size from your settings.
- Click the Filter button to apply the input values to your lesson session.
- Optionally, click the Shuffle button if you want to randomize the order of those lessons.
Note: As of version 2.0.0, filtering will always reset back to the initial lesson queue, so it’s impossible to filter after shuffling. If you wish to have a shuffled queue prior to filtering, use the WaniKani Shuffled lesson order.
What to do if the UI doesn’t appear
The WaniKani team started making a lot of UI changes to the lessons page in 2021. Unfortunately that means this script is more like to break than before. In the event that the script’s UI (see image above) no longer appears, it may still be possible to use the script via the dev console. However, keep in mind that even this approach may not work depending on what WaniKani changed. To use the script using the dev console, use the following steps:
- Open the dev console via F12.
- Select the
Console
tab. - The lesson queue can be filtered by calling
window.lessonFilter.filter(radicalCount, kanjiCount, vocabCount, batchSize)
. Call it with the specific values you want to use (in place of the textradicalCount
, etc.), and usenull
when you don’t want to override a value (just like how you’d leave the input blank in the UI version). For example,window.lessonFilter.filter(3, 5, null, null)
means to filter to 3 radicals, filter to 5 kanji, and keep all vocab, and not change the batch size from the default - The lesson queue can be shuffled by calling
window.lessonFilter.shuffle()
. Nothing needs to be passed in.
Support
- This script has only been tested in Chrome using Tampermonkey, but will likely work in Firefox as well.
- Please post any bugs/requests and I’ll get back to you as soon as I can.
Revision History
2.1.4 - Fix bug to once again treat blank batch size as using the user’s batch size from WaniKani settings.
2.1.3 - Alert when the batch size is invalid instead of picking default values.
2.1.2 - Allow kana vocab lessons. Fix lesson counts on top right of the page.
2.0.0 - Rewrite the script to work with the recent WaniKani update that rebuilt the lesson page.
1.3.1 - Fix an issue where the quiz would start early or require extra clicks / keypresses, particularly after changing the batch size.
1.3.0 - Add ability to filter and shuffle via the dev console in case the UI ever breaks due to changes made by the WaniKani team.
1.2.4 - Use new selectors to properly re-render the page after filtering/shuffling. This was necessary due to this change.
1.2.3 - Blur the buttons after they are clicked so that hitting Enter executes the default WaniKani action instead of ‘clicking’ the button again
1.2.2 - Fix a new bug from a recent WaniKani UI change.
1.2.1 - Decrease the chances of conflicting with other scripts.
1.2.0 - Add a new input for setting your batch size.
1.1.1 - Stop the item batch UI from overlaying the lesson filter UI.
1.1.0 - Your previously used filter values will now be saved and loaded automatically. The values will not be applied automatically and must still be applied using the Filter button.
1.0.0 - Initial release.