[Unsupported] [Userscript] Stroke Order Diagram

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.

Does this script have a github repo?

You need a script handler installed in your browser. Get Tampermonkey then navigate to the script page again and install it.

1 Like

Thank you! that helped a lot. I am new with this of the scripts so I didn’t know I had to install a handler first.

Thank you for your help!

Having discovered this first on Chrome, I agree that this is a great script from @looki and that the proposed changes should get added for everyone’s safety.

However, I’d also like to flag that I doubt this will work on Safari either due to not parsing/passing the kanji correctly (console will log the kanji but doesn’t seem to make it into the URL) or due to the over aggressive implementation of CSP v3 by Apple. The script fails to get a 200 response for a page when loading JISHO content so the stroke order sections will error or be stuck saying “Loading”.

Sadly, not really much we can do here to fix it for Safari users but I’ll cast my eye over the script from @atzkey to see if I can work any magic for Safari users. Apple just love to make things difficult!

2 Likes

This script is really useful and I thank you so much for making it, but I keep running into a problem where I have to close and open the info tab again in order for the stroke order section to show up during reviews. Occasionally it shows up the first time, but 99% of the time I have to close and reopen it. I don’t know if anyone else faces this problem or if its just a loading problem, but yeah.

i downloaded this but i dont know how to insert it into the reviews lessons and kanji pages

I got the modified script that 1a355 posted to work in Safari 13.1.2 by using the fix from this post. :smiley:

1 Like

Many thanks - explains the errors I saw and finally gets it working!

Is anyone else having problems with this script? The diagrams don’t load anywhere anymore.
1

I am experiencing the same thing!

Yeah, same. It stopped working

The problem is mixed content (wanikani being https and classic.jisho.org, the site where the stroke order comes from, being http).
For now, you can enable mixed content (see https://docs.adobe.com/content/help/en/target/using/experiences/vec/troubleshoot-composer/mixed-content.html) to fix it.

6 Likes

I’ve stored the svg images in my github account, and modified the script and it’s working without mixing content enabled now.
@looki are you interested in merging the changes?

Thanks so much for this fix!

1 Like

Is it just me or did it stop working again?

image

2 Likes

Yeah same here, it stopped working for me as well