[Userscript] WaniKani Lesson Filter

#1

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?

  1. As always, make sure you have a script manager installed. If you don’t, follow these instructions.
  2. Get the script here: https://greasyfork.org/en/scripts/31659-wanikani-lesson-filter

Recommended Workflow

  1. On the settings page, use Ascending level then subject or Ascending level then shuffled.
  2. 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.
  3. NEW: In the orange input you can specify the batch size you want to use. If you leave it blank, it will use the batch size from your settings.
  4. Click the Filter button to apply the input values to your lesson session.
  5. Optionally, click the Shuffle button if you want to randomize the order of those lessons.

image

Note: If you click the Shuffle button before the Filter button, you are basically using WaniKani’s Shuffled lesson setting.

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

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.

24 Likes
About to enter the painful levels... searching for advice on how to handle the pain
Level up times without reordering lessons
Trial Period Graduation
Userscripts on Android (Browser)
[iOS] Tsurukame - native app with offline lessons and reviews
Lesson batch size - many small batches or a few large batches?
The right pacing of doing lessons
Overwhelming frequency of lessons starting from level 40 + solution
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
How would I go about scheduling if I only have time in the late-afternoon and evening?
[Question] Wanikani reorder script and 1x1 mode efficiency
Houston I have a lot of problems but don't halp me
Is WaniKani sub-optimal?
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
Trying to get my apprentice to 0
Lessons too clustered?
Benefits of Doing Vocab before Radicals/Kanji
Better default lesson order
I keep on waking up to so many reviews
Asking for WaniKani efficiency tips
The New And Improved List Of API and Third Party Apps
Reviews suddenly up 60-80 in the morning
How do you personally setup your lessons?
A way to stagger new lessons?
Lesson retention, Survey and Discussion
Lesson ordering changes on refresh
Lesson ordering changes on refresh
Page Changing rapidly
Question regarding speed
Lesson rate, things are a bit weird now
[iOS] Mobile AlliCrab for WaniKani
[Userscript] WaniKani Lesson Cap
The New And Improved List Of API and Third Party Apps
Harder to recall
Cutting lessons short
Buried in lessons
I only did kanjis for a while
Vocabulary vs Leveling
What do you want now? (Request extensions here)
How to balance lessons? Kanji vs vocab
How many new lessons do you do per day?
New lesson order always kanji first
Estimate reviews per day
Estimate reviews per day
[Unsupported] App Store script
Vocabulary vs Leveling
Burned out, now back
Olympians (aka let's get to lv60 in time for the Tokyo 2020 Olympics)
An overdue level 60 post
What can I reset if I reset my account?
Why is vocab the most complicated and most abundant in Wanikani
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
Lvls 50+ too fast?
#2

Alert to @AnimeCanuck, @aplayne, and @ccookf since the three of you have expressed interest in this script.

#3

Awesome! I’ve already done my lessons for the day so I’ll check it tomorrow.

#4

Oh, I’m not using Chrome! All my scripts and WK doings are on Firefox. In fact, I don’t even have Chrome installed on my Windows 7 drive…

Can I copy-paste your Tampermonkey code into Greasemonkey? Do people know if that works, usually?

#5

I think he’s saying he’s only tested in Chrome, but I don’t see any reason you can’t install it into firefox as normal

#6

@AnimeCanuck Sorry for the confusion, @bladepoint is right. I just meant that I only tested in Chrome, but there’s no reason to think it wouldn’t work in Firefox. I’ve edited my original post to clarify this.

Speaking more generally, code that works in Chrome will generally work in Firefox and other modern browsers. I specifically didn’t use any newer JavaScript features so that I wouldn’t have to worry about browser compatibility. Let me know if you have any issues, but I expect it to work.

#7

This used to be one of my favourite sites at work until I started specializing in server-side code It tells you what versions of what browsers support a specified feature, and if it’s limited, what those limitations are:
http://caniuse.com/

#8

I know, I just didn’t feel like worrying about it. With something as simple as this, the only thing I might have used was let, and I didn’t even use that out of habit.

#9

woop woop awesome!

1 Like
#10

Thanks. I just used it and it worked fine.

May be nice to be able to set a default that it remembers. But it works fine as is. Thanks again.

#11

Yeah, I was thinking of saving the typed in values so that the browser remembers what was used last. I’ll look into it.

1 Like
#12

Installing and trying this out today ~ with mostly only Vocab items and a few kanji at the end of my level, and leaving my settings to “shuffle”. I’ll try other settings once I level up in a few days. ^^

EDIT: Oh… So your “shuffle” button… when you meant it “acts like Shuffle”… you meant completely, not at all taking into account the numbers. I put in 3 kanji and 2 Vocab, and clicked it, and it returned 1 kanji and 4 vocab. When I clicked a second time, it returned 0 kanji (all Vocab). Clicking “Filter” returned expected results. Also I see you set it to be directly below Reorder Ultimate. (Thanks! I hadn’t picked anything there, so I don’t know if there’s any interference, but there doesn’t appear to be.)

#13

If you do add that, could you make that an option?

#14

Correct, the shuffle button acts completely independently of the inputs and filter button. If you look at my Recommended Workflow section again, you’ll notice that #3 says to click Filter to apply the input values and #4 says to optionally click Shuffle.

I expected the order to depend on which script was first in the script manager. In my testing though, mine always appeared below Reorder Ultimate. I’m not really sure why, but I didn’t think it mattered enough to look into it.

If you completely filter out a type in my script (by typing in 0), that type won’t be removed from Reorder Ultimate’s UI. There is a simple change that can be made in the Reorder Ultimate script to solve this, but I wanted to see if my script actually got non-negligible usage before requesting xMunich to update his script.

EDIT: My script is completely stateless, so nothing you do in Reorder Ultimate can break my script. It just may change the order of the queue, after which my script will of course maintain that new order when clicking Filter.

I’m not sure how I’d do that other than a variable at the top of the code so that people can manually turn it on and off. I’d rather not bloat the script’s UI like with a way to toggle between saving and not saving the values in the inputs, Any reason in particular you don’t like that idea?

#15

Actually, I think that is really handy when working with them in conjunction - when leaving the main setting (in WK’s settings) to “shuffle” then you can choose which levels and items to even have in the pile with Reorder Ultimate, before filtering them with your script into what kind of lesson session you want to see. I think that’s just lovely. <3 (I was just making an observation. XD)

I had remembered that you had said that, however as it was still a button on your script, for some reason I still expected the numbers to be taken into account - for instance if I had any other setting besides “shuffle” in the WK main settings, I would expect your shuffle button to take those numbers I’ve input and shuffle that many items of those types from across the levels - probably overriding the ascending level order. *shrugs* Now I know it doesn’t work that way. (This is why one tries different things, after all.)

This is exactly the behaviour I had hoped it would have. ^^ Awesome.

I was thinking a simple yes/no checkbox.
Personally I don’t, as I vary my inputs all the time depending on my mood - how much I think I can handle at any time I’m doing lessons. When I’m pretty tired, I will not want to learn anything other than vocabulary, and even then I’ll keep refreshing/hit reorder(the centre of the scale, actually) to pop up 5 or as many as I can easier terms which I can guess the meaning and/or reading already. Having the cache/browser remember your last setting could make a tired person (me) bring up other things that I’m just not capable of at times such as those.

And also, it takes up (very little) memory (but that’s not a reason for a toggle, but a reason for none at all).

Even when I’m not sleepy, I often do one session of 1-2R, 2K, 1-2V, followed by 1K, 4V, (or just 5V), depending on how difficult the kanji were. Then if I come back in 4 hours after my first Apprentice review, I’ll usually want only Vocab (sometimes with 1 more Kanji if it’s not too late)… So for me, always changing it is beneficial to my personal style.

That may not be the case for everyone, of course. Hence the suggestion of a toggle.

(Sorry that was possibly way too detailed an answer.)

#16

Just to clarify, saving the previously used filter would not automatically apply it; it would just pre-populate the inputs. You’d still have to click Filter to apply the values, and therefore you could still change the input values before filtering. This feature wouldn’t be useful for you, but it seems like it shouldn’t hurt either. Does that make sense?

#17

Oh… It seems like I misunderstood again.

^^;

It has really been a long 3 days of watching children for 8 hours and getting up many hours earlier than normal to boot. Sorry.
はい、わかりました!

#18

Version 1.1.0 is now live. Please let me know if you see any issues.

Changes

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.

#19

Question! What items does the script pull from the lessons queue? First item you’re supposed to have, or a random item?

Meaning, if I use Ascending level then shuffled, will the vocab the script give me first from the previous levels, or will it just pick a random vocab?

#20

The script will always use the first items of each type from the queue. So if you use Ascending level then shuffled, you will always get the vocab from the previous levels first. This is, of course, assuming that you haven’t clicked the Shuffle button yet.

1 Like