[Userscript] Wanikani Heatmap

Ohh I see, that’s very interesting - thanks for the tip! I was always wondering how to use the “time per review” field effectively. Should I have a greater gap, I will definitely give ithis a try :3

1 Like

If I do my reviews on the Flaming Durtle app, do the streaks not count on the heatmap?

1 Like

Just a few posts up

2 Likes

Oh thanks, that explains a lot. I started doing reviews only on my pc and just use the app as a reminder because of the heatmap. Gotta keep my review streak up. It’s currently only 20. #roadto100days

1 Like

Hi!
I’m trying to migrate my heatmap data from my old laptop to my new laptop.
I export scripts along with script storage in tampermonkey and import this file on the other machine.
Upon launching Wanikani however, the heatmap does not show up, but the script shows up in the script settings menu.
I’ve tried disabling my adblock and clearing cookies, but to no avail.
Is there a step I’m missing or is the way to migrate data completely different?
Any help would be appreciated.

1 Like

It may not be because of the data migration. Heatmap suddenly stopped showing up on my laptop a month or two ago even though it says the script is installed and running on the page and shows up in the settings menu. It still works on my desktop though.

Have you checked the browser console for any errors related to Heatmap? You can open it up by pressing F12 and going to the console tab.

1 Like

You’ll need to migrate IndexedDB as well. I can get you the steps for how to do that this weekend hopefully

That likely has to do with reviews only being recorded locally now. If you don’t do any reviews on your laptop the Heatmap won’t show up

Ah, I see. That makes sense.

So, not quite sure what’s going on, whether or not this is only happening to me, but it appears like all userscripts have resetted their configuration to default? The heatmap is the weirdest for me, because on top of that it appears to have deleted my history:

I tried to reinstall it of course, so that didn’t help. Also took a look at the configurations. There was an option to choose from which year the map displays stuff, but it was already set to 2012. Can’t be that either.

Is this reversible? Anyone know what’s going on?

This is just a guess, the script author will definitely be more knowledgeable here, but it sounds like your browser’s indexeddb got cleared (this is where the open framework stores script settings among other things). I don’t know where Heatmap gets the reviews locally, I’m assuming the review_cache in open framework as well, which if your indexeddb got cleared recently would make sense why you’re seeing no review history.

There probably isn’t a way to restore your historical reviews. As long as the Get All Reviews API endpoint is down there likely isn’t a way to rebuild that data. [See above posts going over how for the past several months Heatmap can only keep track of reviews locally]

2 Likes

Can you still see your Lessons history in WaniKani Heatmap?

I lost all my Reviews history before June 2023 when I switched devices, but my Lessons history is unaffected.

1 Like

You’re right! I didn’t notice because I typically don’t look at the lessons part of the map, but it’s still there. I didn’t switch my device, and I also didn’t touch my indexeddb, so I have no clue why that happened. I kind of liked seeing the review heat map to see the path to level 60 but oh well, the lesson one will have to do for reminiscing.

1 Like

Only the Get All Reviews API endpoint was taken down. Past lessons can still be retrieved (and thus rebuilt if your indexeddb gets cleared). So your lessons being here isn’t an indication of anything.

1 Like

My understanding is that the reviews information will reappear in the WaniKani Heatmap when the Get All Reviews endpoint of the API is restored.

Or perhaps I should say, if the Get All Reviews endpoint of the API is restored.

1 Like

This has been added!

1 Like

To migrate your reviews from your old laptop to your new laptop you can follow these steps

  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>))
1 Like

Seeing this talk of migrating has given me the idea of wanting to do regular backups of my indexeddb for wanikani (or at least just the review_cache). Any thoughts on how I could go about this?

I spent… way too long googling how indexeddb works and only getting results telling me how to use the api to like, code with it, and the internet equivalent of nothing about how it’s stored on your device. Eventually I figured out that for firefox it’s saved as sqlite databases in your profiles folder in appdata (which then lead me down another rabbit hole of trying to figure out how they’re taking an object store, a supposed NoSQL structure, and putting that into SQLite, and trying to read the actual database file using SQLite CLI tool; spoiler, the actual object_data table’s data column contains encrypted data, and the files it stores are encrypted too. Although I do know exactly which of the binary files is review_cache now). I just don’t know if firefox can “rebuild” the db if something were to happen and I replace the files in there with the backup versions. But if it does then I’m totally gonna learn to write a powershell script and scheduledjob to copy that folder daily.

Hello, I don’t know what’s happening, I lost my heatmap today. Normally it would appear at this area :sweat: I tried reloading the page and waited but it still wouldn’t show up.

2 Likes

yeah it stopped working for me too for some reason

2 Likes