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!