[Userscript] Wanikani Heatmap

Yep, that’s it. Quite disappointing, but there’s nothing I can do about it

3 Likes

@Wilrick @masiv1001 please read the recent discussions in this thread. Unfortunately this is caused by WK and there’s nothing that I can do to fix it

2 Likes

しょう が ないね
It’s something that should be provided by WaniKani in an API endpoint, like for example GET /user/streak/review, in the first place because it’s an expensive db query. Could even be added as a field in the user model to be precalculated and just incremented or reset via a daily cronjob if JIT calculation is too slow.

3 Likes

I saw it after posting. Too bad for my streak :smiley: Whatever, I know the truth deep down.

Thanks for providing the heatmap btw. You’re awesome !

4 Likes

Hello Kumirei and thank you for a great script!
I see lively discussion above and everybody struggling with recent WK updates, so I’m sorry for bringing another one that I can’t find solution above.

Recently I’ve reinstalled script, so now it’s 3.0.61, cleared cache and cookies for WK (otherwise script didn’t load), so now it’s finally loading!.. but it lost all previous reviews history, despite kept lessons history:

Also I see that during initial load of script, it doesn’t load reviews statistics, so now wonder it doesn’t reflect properly…

image

So my question is it possible to force script to reload review stats somehow? Does new WK still provide it in its API?

1 Like

We no longer have access to historical review data, so there’s sadly no way to retrieve that data anymore. All the stats were calculated from your review history

4 Likes

Ouch, too bad. Still, we can retrieve such stats for lessons, is this correct?

Thank you for your instantaneous response!

1 Like

Yeah we still have access to lesson data

2 Likes

the main thing I used this script for was to see how many reviews I’ve done today. I really hope WaniKani makes a new API or adds this stat to the dashboard themselves eventually

3 Likes
  1. Find the browser console (F12 → Console)
  2. Export review cache to a string by inputting JSON.stringify(await review_cache.get_reviews())
    a. Copy the string, including enclosing quotes (just hit copy)
  3. Transfer to new device by your preferred method
  4. Insert into review cache review_cache.insert(JSON.parse(<string>))
4 Likes

Thanks, will try this later today

If I disable the script will it delete my local caches? While it’s not working, I don’t really like the visual reminder. If WK makes the data available in an accessible format later, would not having the local cache not be a problem even? I don’t want to repeatedly go through the trouble of downloading and uploading my review cache every time I switch between work and home computers.

1 Like

I think it should remain as long as you don’t clear your browser cache etc. @rfindley IndexedDB or wkof file cache doesn’t have TTL, right?

1 Like

Correct. The cached data remains until you clear cache, or the WK server returns newer info.

2 Likes

for some reason my reviews did not record yesterday, even though i have been on 3.0.61 for the last 3 days. i am quite sure i did them, too, because i had the most terrible headache yesterday but still forced myself to do them on the same computer i always do em on. no biggie for now cause i was able to add them via console, but i am not sure how that ended up happening :confused:

edit: i did like 20+ in the last two hours, yet it still shows only 10 for today. i double checked the item inspector app and found a discrepancy there, for example i reviewed 景況 at 5pm and got it wrong and it wasnt recorded, but it should show up, right?

1 Like

Did you do the reviews on a different device than the one on which the Heatmap is installed?

1 Like

no, on the same device because i read that the cross device tracking doesnt work any longer.

1 Like

Thanks, I’ll take a look and see if I can find anything

1 Like

Why is it not counting the reviews made on another device?
Why is it counting the reviews made on the “extra study”?
It used to be much better when it counted just the real reviews made on any device.

Wanikani shut down the API endpoint used to retrieve reviews, so it’s not longer possible

That was a bug but is now fixed, make sure you’re on the latest version 3.0.61

Yes, but there’s nothing I can do about it

8 Likes