Do you have a hard time reading numbers? Do you think the lessons and reviews button pictures aren’t enough of an indication of how many lessons/reviews you’re procrastinating? Well you’re in luck. Introducing the Wanikani Lessons and Reviews Buttons Scaler.
Okay I’m going to be honest, literally no one asked for this, but I needed coding practice and I had the idea, so here we are.
This script scales the vertical size (the height) of the dashboard lessons and reviews buttons. You know, the pink and blue ones that have the very big numbers in them that never seem to go away. A number is set as the ‘base’ number, and when your lessons or reviews are at that number, the buttons will be their normal size. If you have less lessons/reviews, the buttons get smaller. If you have more, the buttons get bigger.
I didn’t make this script out of any need for this functionality, but hopefully it can act as a form of encouragement for getting people to do their lessons/reviews.
This script does not require Wanikani Open Framework (for now).
You can change the positioning of the text, numbers, and pictures on the buttons within the code (I was too lazy to figure out how to add proper settings). Changing
false will make the button items sit at the bottom of the buttons. By default,
true because I think it just looks better.
You can also change the
base value. By default, this value is 42, which means that the lessons/reviews buttons will be at their normal size when you have 42 lessons/reviews. Any non-negative whole number should work, although lower numbers will give you very big buttons if you have a lot of lessons/reviews. For now, there is no way to set a different
base value for lessons and reviews. I may change this in the future.
There is a limit on how small the buttons can get. The original plan was to make the buttons shrink into nothing when you had zero lessons/reviews, but for technical reasons, I didn’t do that (I was too lazy). There is no limit on how big the buttons can get.
As the buttons shrink, the the pictures will shrink with them to fit. This means the pictures on the buttons may look weird sometimes. If this bothers you, then I’m sorry you don’t get my artistic vision (also there’s no real way to fix it).
I haven’t tested this with too many scripts, but as long as you aren’t using any scripts which massively change the page layout or change the lessons/reviews buttons, then this script should work fine.
Huge thanks to @Naphthalene because I had no clue how to make scripts before this, so I studied their Display lesson/review numbers as categories instead of numbers script intensely. Also huge thanks to @Kumirei for testing. Also to @TomatoSalad, @jprspereira, and @FlamySerpent for additional testing.
This was originally going to be an April Fools script, but the original idea of getting the buttons to expand over the entire page just wasn’t really viable. If you want to see my original inspiration for this userscript, you can check out this video.