A minimalist perspective on the Kanji Stroke Order userscript.
@looki’s stroke order script is nice, but the diagrams for some busy kanji tend to get rather wide and quite inconvenient to use, so I made a version that works for me (and could be of use for someone else).
No external dependencies, but you need to have the Kanji Stroke Order font installed. The stroke order display itself seamlessly integrates into a blown-up version of the kanji that you see on mouse hover.
There’s how it looks in an excited state (on mouse hover):
And there it is in a dormant state (no different than a vanilla kanji page):
v1.3.0 Stroke order for kanji and vocab during lesson sessions.
v1.2.1 Making it work on preview.wanikani.com
v1.2.0 Making script jQuery-independent
v1.1.3 Minor Windows-specific fixes
v1.1.0 By the popular demand (I got a message, which is like 100% of all update requests I got so far), stroke orders are now displayed on the vocabulary pages, too.
v1.0.0 Initial release
How do you install the stroke order font though? ^^;;
Download the linked archive with the font, unpack it and follow the instructions on font installation for your operating system. On MacOS, for example, it’s just a matter of opening the font file (.ttf) and pressing the “Install Font” button.
I’ve installed it but nothing happens If I try to install it again Windows just says it’s already installed, but the script on Wanikani says it isn’t.
There might be a problem with the font detection, did not test it on Windows well enough. I’ll find a Windows machine and fix the code by the end of the week.
Sorry for the late reply.
Try to update to version 1.1.3 of the script. Hopefully, it’s fixed now (tested on Windows 8 and 10).
Thank you, it works now! ^^
could you modify the script to show the font for all reviews?
For Linux users:
Download the font and put it into
~/.local/share/fonts, then restart the browser so that it picks up the font.
Good idea, but it may interfere with the script that randomly chooses weird fonts for reviewed items (that so many people use). I’d better create a new script that does just that, displays stroke order for items in reviews. I’ll notify you when it’s ready, possibly this weekend.
amazing, that would be wonderful, thanks a lot!!!
Happy Friday! Did you ever take a stab at that kanji functionality?
This sounds fantastic and I would like to use it, but it’s not working for me. I haven’t used many scripts in the past, so maybe I’m doing it wrong. I have the font installed, and it works in Word. I have the script installed, but it looks ghosted out in the drop down menu for Greasemonkey even though it’s enabled. =s Any suggestions?
It says no dependencies but it’s using jquery and he forgot (?) to add it to the script. Just edit the script and add this line // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
Edit: I’m using Greasemonkey
Wow, that absolutely did it. Thanks so much! ^.^
Sorry, friends, I was on a health-related hiatus; shall update the script according to the new site changes. jQuery was present by default on WaniKani, but since they moved away from it, I’ll rewrite the script using vanilla JS soon.
Updated. Got rid of jQuery dependence altogether.
Are you supposed to be able to see it on the lesson pages?
No, the script by design is as unobtrusive as possible; and is only available on Kanji and Vocab pages. I was going to make something similar (a separate userscript) for lessons and reviews and should get to it sometime soon[ish].
1.2.1: Updated to work on preview.wanikani.com.