[UserScript] Stroke animation for reviews and lessons

Ethan said... I just fixed a bunch of bugs relating to the 〜 issue.

So hopefully it should be good now.

Let me know if you have any more problems. I ran out of image radicals to test on, but they should be back soon.

 Stopped working completely for me ;_;

I’m sorry but coming from a complete amateur here… How do I download this to run? When I click to download I am just getting a safari webpage popup of code (and I use chrome to click on the link). Why is this happening?

I’m sorry but coming from a complete amateur here… How do I download this to run? When I click to download I am just getting a safari webpage popup of code (and I use chrome to click on the link). Why is this happening?

The only thing I would change if possible is the colour of the text to white, it looks much nicer on the background and stands out more. But a really good script.

Yabba said... Stopped working completely for me ;_;
 Can you open the console and let me know what the errors are?

Something that just happened for me was the functions didn't load before the script tried to execute them. If the error says 'renderMojiOrSpan' then it might be the same one.
Oviemon said... I'm sorry but coming from a complete amateur here... How do I download this to run? When I click to download I am just getting a safari webpage popup of code (and I use chrome to click on the link). Why is this happening?
How to install userscripts:
/t/How-to-Install-Userscripts/8319/1 
Ethan said...

Something that just happened for me was the functions didn’t load before the script tried to execute them.

My standard script startup is:

if (document.readyState === ‘complete’)
    main();
else
    window.addEventListener(“load”, main, false);

This eliminates race conditions at startup.

thanks for the tip.

i love this app since i first discovered it, but since about a week or so it doesn’t work for me anywhere. i tried different browsers and on different computers. it just doesn’t load and the normal font is displayed. I would really be gratefull  if there was a solution for this problem!!

ReneLu said... i love this app since i first discovered it, but since about a week or so it doesn't work for me anywhere. i tried different browsers and on different computers. it just doesn't load and the normal font is displayed. I would really be gratefull  if there was a solution for this problem!!
 I may have caused a bit of a problem by not uploading the same version I have running right now, but I'll update now.
Hopefully that will sort it out.

Another thing you could try is restoring the // run-at line ( to // @run-at)

I’ve updated it now, I hope it works for you, I had to tweak it so the size on the lessons wasn’t tiny, but there might be strange behaviour with mixes where the character or kanji aren’t in the library.

Also, avoid doing lessons and reviews at the same time, the script will confuse the two and lose handles. They are the next bugs in my sights (unless something else comes up). but for now I’m going to go back to working on self study plus.

Hey, I just installed this, but it refuses to run. Tampermonkey says it’s running, but it doesn’t actually do anything, the kanji are just in the original form. I’m using the most recent version of chrome.

lindril said... Hey, I just installed this, but it refuses to run. Tampermonkey says it's running, but it doesn't actually do anything, the kanji are just in the original form. I'm using the most recent version of chrome.
 Same problem, not working on my computer as well (I am using Greasemonkey on Firefox). Too bad, because it really looks like a great tool for WaniKani. But maybe I did something  wrong, it's the first time I'm trying to use userscript...

Doesn’t work for me either.

Edit: Did a load of fiddling with the scripts. Looks like there are quite a few bugs with the script now. External scripts aren’t referenced correctly, and events are either being lost or firing out of order so animation never starts.

Brushed it up a little, works for me again let me know if 0.9 works for everyone else.
Been a bit distracted with my overhaul of WKSS+ lately.

Hey, could you please consider making it also work on individual (radical?)/kanji/vocabulary pages?

Appears to work, thanks. The animation plays rather fast, but it is showing up now.

Just installed and getting some weird layout issues - will screencap next time it happens, but for now I’ll just explain: 
on vocab words the original WK font shows up but pushed down significantly as the purple header is about 500px taller, and there’s no way to toggle the two with the shift+left/right. As the script doesn’t properly load, the replay doesn’t work either, obviously. 

That said, random radicals (that are “real” kanji) will show up though with the script, and without layout issues. Haven’t gotten a kanji in my reviews since installing, so don’t know if those work.

This is an incredible addon, though. Will take a look at the code later to see if I can change three things to make it perfect for me: display WK by default and allow me to toggle to the script rather than the other way around (don’t want the extra cognitive load when I first start learning a new word), slow down the animation by just a little, and change the text color to white. I assume they shouldn’t be too tough to achieve unless all display/rendering is done in the original script.

[edit] Chrome 48.0.2564.109 on OSX 10.11.3 El Capitan with all system updates[/edit]

Here’s a screencap:



That’s my browser at full height on a 15" retina MBP without standard chrome.

[edit] completed the full review I had (9 items). This display bug happened on the reading screen of 行う plus 来る. Two vocab words, 十六 and 子犬, functioned properly, script did not run on the other two vocabs, 水中 and 用いる. One kanji reading screen, 京,  also registered the script but none of the other two did. Radical was antenna and did not acknowledge script.[/edit]

A few more visual bugs: these are both from lessons, not reviews.
Something about the canvas definitions, maybe? 

Radical is barely visible.


In lesson reviews, the header’s height shrinks too, but not as pronounced.