[Unsupported] [Userscript] Stroke Order Diagram

Great script. I’ve been needing to work on stroke order, and this makes it easier. It’s a big plus that you used Jisho’s stroke orders because of the included cross hair in the back of the symbols. Sorry about the kanji progress loss.
Thanks

Using the “updated” version in the Feedback section, with Tampermonkey. Works great! Thank you!

ありがとうございます!
This is great! I will practice writing on paper, this helps so much!

1 Like

This is such a great idea, thank you OP! <3

Thank you, I installed this script and I am very glad it’s such a huge help already :sunglasses::

  • the diagrams at the kanji page save me time from looking the stroke order up in other resources
  • WaniKani’s font made the kanji for ‘eight’ and ‘enter’ (and probably more kanji) quite similar, while the kanji in the diagrams are more distinct.

I had some issues with getting this script to work on safari 13.0.2. Changing “url” to “new URL(url)” in the XHR request fixed it.

Modified version can be found here: https://pastebin.com/rkEEnmzc

Thanks for the script. Works great now!

1 Like

Hi, thank you for making this script! I am having some trouble installing it, though. (bear with me, I’m a newbie with userscripts.) I installed TamperMonkey on Chrome (Win10) and downloaded the .js file, but every time I try to open it, it spits out this:

dgd

Any ideas?

Thanks again!

Do you try to open it from the explorer? It looks like Windows wants to use it as a regular JavaScript file.

If you click the file in the browser (install this script button) Tampermonkey should detect that the file ends in .user.js and use (install) it, if you download the file another way it won’t work.

If Tampermonkey doesn’t detect the file you have to open the Tampermonkey console, make an empty script and the copy the contents of the .js file over.

1 Like

Thank you! This was such an easy solution – turns out I’d downloaded the file before I’d installed TamperMonkey and kept trying to use that one when I should’ve tried to get it again from the source, which automatically recognized TamperMonkey as the recipient and thus bypassed any downloading at all.

As a fairly tech-savvy person, I’m amazed this completely eluded me, but again, total userscript noob.

Maybe leaving this here will at least help someone else avoid that confusion.

I don’t think that the detection part is obvious, in addition sometimes the detection fails and you get a download instead anyway.

Someone even managed to install a script as a browser extension because they also end in .user.js, so anything can happen.

That’s… kind of hilarious actually. I feel better about myself, thanks. :stuck_out_tongue:

I’m getting the wrong strokes for 飴 here, not sure if it can be resolved but I thought I would at least mention it:

The Jisho.org page shows the correct one:
飴 Jisho

Interestingly, the radical WK uses is not exactly the one used in the kanji, could that be the reason? Or is it just a coincidence?

Both are correct. They are variants of the same kanji. I believe the stroke order you are getting from this script is technically the more modern variant, but as of JIS X 0213 the stroke order on Jisho is the recommended version. I’m not sure which WK intends to teach. It could just be a font issue on your end

1 Like

Ah, then it’s all good, I never thought it could be due to standards and fonts…I just assumed it was a mistake. My bad…
As for fonts, I don’t usually mess with those, but I remember installing a font from https://www.nihilist.org.uk/ on October.
Anyway I’ll just keep it in mind for the next time I find discrepancies.

Thank you!

1 Like

I can get this to work on Chrome on a Mac but not on Safari on a Mac.
Can anyone tell me why this might be the case?

It’s not just you. This script doesn’t run in macOS Firefox 75.

I found that Line 21:

$.jStorage.set = ...

is never fired.

First a big thanks to @looki for this awesome script!!! :slight_smile:

Unfortunately it still uses HTTP and not HTTPS to load the data from JISHO, which puts all users at risk.

The stroke order images are loaded through an unencrypted connection from JISHO to our browsers. Therefore, anyone who accesses this connection in between can modify it without you even noticing. This can of course be your Internet Service Provider or anyone other in between your PC and the JISHO web server.
Since internet traffic is not determinable (meaning the sent packages can go all around the world before arriving at their goal) the packets could also easily go through countries with authoritarian governments. Even if your not the primarily “intended target” you can easily get malicious code (software) loaded into your browsers/computers, which in turn puts you at risk.
In short: DON’T use HTTP without encryption if you care about your privacy and security.

QUICK FIX (which doesn’t solve this problem entirely but it is way better than the current state):
Use the modified script from this user. Open your Tampermonkey add-on Dashboard and navigate to the Stroke Order Diagram script. Then replace the script with the one from the link above (it has a .TXT file attached).

This loads the images through a Content Delivery Network (CDN) which basically caches the images and delivers it to you through httpS (means: encrypted). Since the CDN knows it wants to deliver images it (hopefully! xD) sends you correct images and not malicious scripts. I think we can trust a CDN with this. :wink:

@looki Please consider fixing this problem in another way or maybe update your current public script with the one above? Thank you so much for your efforts!

(Btw., one could alternatively use the userscript from @atzkey, which uses a locally installed font (currently) and therefore doesn’t have this issue. But the presentation of the stroke order is a matter of taste, of course. :wink:)

2 Likes

This is amazing. Thanks for putting it together!

Hello there :wave:
I always get the message “Error while loading” in the field where the stroke order should be displayed.
Installed the script without problem, also gave the authorisation to access Jisho when asked during my first review.
I use Safari 13.1, would rather not want to change to Chrome of Firefox. Other scripts seem to work well until now.
Any idea? :thinking:

Hi,
I am trying to install this script because I would really love been able to know the stroke order while learning the Kanjis. However when I try to install the scrit a message apears:

can anyone tell me whis this is happening? Plese help me! I really want this script.