[Userscript] WaniKani Lesson Filter

Thanks for the response! Unfortunately I don’t think anything more than three characters would fit, so I definitely can’t go with 一回分の量. If batch is hard to translate, what about something like “set” or “group”? Something with 組 perhaps?

Or could omit の量 and say 一回分 if you want to do it in Japanese?

Ignore this because you didn’t ask me my opinion as a coder… :stuck_out_tongue: but considering the fact your users are studying Japanese in English, I personally like “Batch size” as is in English.
If you change it to 一回分 etc. users probably don’t understand the meaning. 部首 漢字 単語 are recognizable because we use them on WaniKani and the colors are unique to each, though. Could make it バッチサイズ, but it’s more than three characters :disappointed_relieved:

Not sure how this functions (does the green part show something, or users insert a number??), but if the Batch Size part will be showing the total number of items, you could use 合計 (at total) or something .

I had considered that as well. For that reason I might just go with バッチ. I figure they could sound it out. :smile:


The user inserts a number. Let’s say the user has their setting set to 5 for lesson batch size. This means by default they would do 5 lessons at a time. This input would allow them to change it on the fly without going back to their settings. It’s not really the total number of lessons, so 合計 wouldn’t be accurate.


Thanks again for talking all of this through with me. :blush:

バッチ sounds :ok_hand:, too!

Ohhh, that sounds useful! Good luck and let me know if there’s anything I can help✊

2 Likes

Version 1.2.0 is here! Now you can specify what batch size you want to use within your lessons!

image

Fantabulous, thank you very much, @seanblue. gives ice cream

2 Likes

Oh, huh, I don’t think I knew this existed. I’m mainly posting so I remember to install this on my laptop, but also thanks for making it. :+1:

1 Like

I just released a minor update to decrease the chances of this script conflicting with other scripts. Let me know if anything weird happens.

1 Like

Hi, glad you’re enjoying the script!

I’ll try to look into making the filter UI collapsible sometime in the next few weeks. Do you have a strong preference about whether the section should stay collapsed between lesson batches or when you leave the lessons page and come back later?

1 Like

Personally I would want it to stay collapsed until I left the lesson page and went back. I can always expand it if I need it while in the middle of lessons. And I’d also love that feature, the collapsibility, I mean. :slight_smile:

1 Like

@seanblue
Would like to use this on an acquaintance’s computer when Im away next week, if I dont install TM, can I just paste the userscript into the console? If so, where and do i need to add any code for it to work?

The script initiates when the lesson loading page disappears. If you miss the event of that disappearing, there’s a good chance the script won’t run at all. If you want to run it after the page has loaded, you could try replacing:

(function() {
	setEventToTrigger('prop', propModifiedEvent);

	$(document).on(propModifiedEvent, '#lf-main input:disabled', enableInputs);

	$('#loading-screen:visible').on(eventPrefix + 'hide', function() {
		setupUI();
		setupEvents();
	});
})();

with this:

(function() {
	setEventToTrigger('prop', propModifiedEvent);

	$(document).on(propModifiedEvent, '#lf-main input:disabled', enableInputs);

	setupUI();
	setupEvents();
})();

I don’t know if that will work though. But you can try it on your own computer with the script off to try it.

1 Like

Thanks. I’ll try that

Thanks for this script, and thanks for mentioning it (some time ago) in someone else’s post. I don’t know why it took me so long to realise that this is the best solution for consistency of number of lessons while also allowing you to balance the differing mental workloads of the different items - brilliant!

Cheers!

3 Likes

Thank you for this. Just downloaded it now … :slight_smile:

2 Likes

Thank you for providing us with all this useful scripts =D This is exactly what I was looking for. Now I don’t have to wait to do my vocab lessons, when I don’t feel like doing more kanji first.

1 Like

@seanblue - Hi, quick question - I ran out of vocab this morning for the first time since installing and using this script on a ratio of 3 rads/kanji : 8 vocab over the last 5 levels; I believe you were doing a ratio of 4:8 - did you ever have this happen?

Yeah, this happened to me pretty regularly. It just meant I had some lighter days of only doing a few kanji lessons. It never caused any issues long term.

1 Like

@seanblue - I love this script! I’m using it to smooth over the gaps between levels, so I can keep learning at a steady pace without great bulges in lessons and reviews.

Before I installed this script, I felt compelled to learn all radicals and kanji as soon as they became available, in order to unlock more vocabulary, but this (predictably) resulted in an uneven flow of reviews, sometimes at inconvenient times.

Now I’m spreading my lessons out, trying to do the same number of lessons every day, so I don’t end up with overwhelming mountains of reviews in the future. I’m not too concerned with speed at the moment. I’m looking for consistency because I want to establish a solid habit that can survive some distractions that are looming over the next few months .

Ideally I would like to set the mix of lessons in each batch such that I learn the last vocabulary item from the previous level just before I learn the last kanji of the current level needed to level up. At the moment I’m doing this manually, checking the number of vocab and kanji remaining and fiddling with the mix to achieve the desired result. I’m probably going to stop bothering with this soon, though, since it adds a layer of inconvenience to my study sessions that is undermining the new habit that I’m trying to build.

On my wish list would be a way of doing this automatically, because the more automatic and mindless the process is, the easier it will be for me to establish a regular habit.

From what I’ve read earlier in this thread, however, you don’t want to make the script overly complicated, so even if you could automate this calculation, maybe it isn’t such a great idea. And maybe it’s not really so important to try to keep everything at the same level. I’m relatively new here, so I’m open to hearing the views of experienced users about that. It just feels a bit unsatisfying to level up while there is still a backlog of vocabulary (from the previous level as well as the current level).

But in any case, I certainly wouldn’t want to return to the vanilla state of having to complete all the previous level’s vocabulary before starting to unlock the next level’s kanji and vocabulary, with all the attendant dead time between levels. So I am very grateful to you for creating this script. Many thanks – much appreciated!

3 Likes