[Userscript] Wanikani Heatmap


#21

No, WK started logging review data back then


#22

Thank you, @Kumirei! I feel … diligent.


#23

Thanks so much for this script, keeping it clean is all the more reason to make sure I don’t skip any days til I’m satisfied :wink:


#24

This is very cool. I wish I could use scripts :(. Great job anyway!


#25

Why can’t you? :thinking:


#26

I don’t own a (proper) computer. My only devices are an iPad Pro 2018 and a Pixel 3 XL. I can’t bring myself to get a laptop when my iPad does 98% of what I need (I work as an artist), but damn that last 2% makes me sad some days. Like, every time I level up but have to finish 80 vocab before I can see any new kanji.


#27

I think someone mentioned Mozilla Firefox being able to install and utilize scripts on smartphones, maybe that’d also work on your tablet?


#28

Apple doesn’t allow any scripts to run as far as I am aware


#29

Well I’m all out of ideas then :man_shrugging:

Sorry @erie-canary :cry:


#30

:slight_smile: still love seeing all of the things this awesome community cooks up.

Some day I’ll get an old MacBook just for WKing, lol.


#31

Maybe a cheap Chromebook would be good for you.


#32

I don’t need a chart to show me how diligent I’ve been :stuck_out_tongue: I just reached Lv.30 and I haven’t skipped a single day :slight_smile: I’m halfway there!


#33

In browser-targeted code, I’ve always done tests like:

if (some_var == undefined) some_var = [];

This is the first time I’ve seen it cause an error.

I do recall things being more strict when running in node, though.


#34

Great script, thank you!


#35

I didn’t know i needed this script until now, i mean wow!
I like these colours, I’m really not that fond of Wanikani’s color palette. I might try to make a userscript just to change them when i have time


#36

Thanks! I’ll look to incorporating it when I find the time!

Hmm. I tried to combat this using a timezone offset. Could you try putting new Date().getTimezoneOffset() in the console (CTRL+SHIFT+J) and see what the output is?

Color tests

From: #fce89b
To: #e25636
Not enough distinction here between the lighter colors, I think.

Trying a more even scale
Colors: #fceeaa, #fec87b, #f98f53, #e65536, #ab0927


#37

That solution works because “window” is an object equivalent to the global namespace (in browsers, at least), and objects don’t throw errors when you try to access non-existent member variables :grin:

I have seen some other object that made variables accessible in the global namespace that wasn’t window, but that’s pretty unusual.

Interesting. Have you tried that directly in the developer console? It gives me an error, just like usual. (I was using Chrome’s console just now.)

Of course, if you have var some_var; somewhere in the code before that, it won’t cause an error.


#38

Woks just fine for me in Chrome’s console

>wkof
{include: ƒ, ready: ƒ, load_file: ƒ, load_css: ƒ, load_script: ƒ, …}
>window.wkof
{include: ƒ, ready: ƒ, load_file: ƒ, load_css: ƒ, load_script: ƒ, …}

#39

Of course, you have it loaded :grin:

Try a non-existent variable like some_var


#40

Oh, I see what you meant. Yeah, that gives me an error as well. Strange that it doesn’t in the scripts though.