Introducing WaniKani Stats (beta).
Adds a “Stats” button to main menu, which replaces the dashboard with some stats. Clicking that button again, brings back the normal dashboard.
01/18/25
Rewrote utilizing WaniKani Open Framework. No more manually entering your API key. Also, added in a ‘Item Details’ tab.
03/34/25
Fixed Level Progression Tab
01/21/26
Start of some rewriting
Item Details links to WaniKani pages
Level up calculations using unlocked_on instead of started_on
Whoops, looks like I left my read only key hard coded in there from early testing.
For whatever reason when I take that out, the whole main area fails to load. I’ll have to look into this more in a bit.
I just tried updating but unfortunately I’ve still run into the same issue. I tried updating, uninstalling completely, reinstalling, turning the script off and on again, etc.
I had a quick look at the code and it looks like your API key may still be in there (line 11289). After I hardcoded my own API key into the script, saved and refreshed, my stats appeared! So hopefully an easy fix for you. My backend skills are rusty af and it’s late so I may attempt a proper fix tomorrow if you don’t get a chance to look at it.
Dagnabit, I did it again. When page wasn’t loading, I put my key back in, to see if pulling key from the store was somehow related, and never switched it back.
Rewrote this script. Now using WaniKani Open Framework, meaning no more manual API key entry. Also added an Item Details section. More stuff to come as well, as I have time.
Sorry, been a busy few weeks. Just pushed an update which should exclude any level which has been “abandoned”, as WaniKani refers to them. I haven’t ever reset myself, so I’m not really able to test it out.
Hi, nice script, thank you very much. Almost everything works for me, but I have an empty “Items at Level” graph, and my “Item details” tab only goes to level 8 when I am level 12. Any help?
Well the level 8 is embarrassing. Seems I must have set it to 8 for testing (to speed up the loading while I went to it over and over), and never set it back to whatever the users level is. That is fixed now (though I have a small styling issue to fix, the items overflow the grids)
As for the Items At Level, I’m not sure. I’ll have to dig into it more when I get time. My first guess is it has something to do with the fact I have every item unlocked? something about locked items must be messing the graph up?
Or, I do have items at every level… Could be if a level doesn’t have any items, that’s messing it up?
I should also update the title to Items At SRS Level. I’m confusing myself here now with level vs srs level
Hi there! No worries but… I installed your script, but, even if the WaniKani Stats extension is checked green in tampermonkey top bar dropdown, the only visible effect is top boxes are larger and element disposition is slightly different. No additional Stats menu. お世話になります!
If you’re at the dashboard, and hit F5, does it come back when the page refreshes? I’ve been fighting with WaniKani’s turbo events on this, and a couple other, scripts. It seems some elements, including the stats button, don’t come back after navigating away from, then back to, the dashboard. Thought I had it figured out, but just tested moving around the site, and yep, it disappeared on me. F5 brought it back though. I’ll have to keep fighting that damn Turbo. I hate that thing.
Been a long time, but its back in development. Taking inspiration from WKStats
Currently has:
Status and Accuracy
Level up progress and calculator
Items table
Level up calculations may not have early levels, if levels were started before WK added the api endpoint. I don’t do any estimating like @rfindley is doing. That endpoint was added a long time ago though, so most are probably ok at this point)
Items table is only organized by WK level at the moment
Items table also takes a bit to load. May appear locked up for a few seconds, just give it a minute. I need to try and speed that up somehow
And, for some reason my numbers don’t 100% match WKStats. They’re pretty close, but not a perfect match. We must be mathing differently? My review counts are higher than what WKStats saying. Perhaps WKStats is excluding some things? Removed items or something? I dunno, I haven’t dissected @rfindley’s code that deep
Not sure how mine will handle level resets.
Its now using WaniKani Open Frameworks magics to get key and everything. Which, is working since ‘Current Status’ is showing correct data.
I was assuming an item that hasn’t been reviewed yet would neither not come back in the api call, or have its numbers be 0. But, perhaps that’s not the case? hard to test, as I have everything unlocked, and have reviewed everything at least once If something has null or undefined, that could be breaking my math.
When I get a chance later tonight, I’ll add some code to, at the base of each item, have its correct/incorrect counts return 0 if NaN.