[Userscript] Wanikani Real Score

True. That’s why I mentioned in the text that the review summary score isn’t always accurate. I only count -1 for missed guru. Points are “right” score - “wrong” score. This is less surprising (and perhaps less depressing) but also less accurate.

I knew lack of perfect accuracy would bother some people, but also that being accurate would confuse some people for the reason you mentioned - it seems like score should be “right” - “wrong” even though that’s not the case.

I’ll address this in an update sometime, but for now, just be impressed by your own cleverness and noticing :slight_smile:

I just added more details about this to the FAQ at the bottom of the post :slight_smile:

Why does the review summary score match the reviews page but not the dashboard?

Remember when I said “I lie to you sometimes on the review summary page, but trust me it’s better that way!”. I wasn’t joking. :slight_smile:

When you miss a burn review, the item moves back to guru not enlightened. Thus for missed guru items, you’re “real score” on the dashboard will decrease by more than 1 point.

On the reviews page however, it seemed weird and somewhat depressing to see the counter go down by several points. My goal was to make things fun and not confusing, so I opted to show the simplified ‘correct items’ & ‘incorrect items’ score. Thus far, no one has mentioned this discrepancy, so I probably got this right.

On the reviews summary page, I had to chose what to show:

A) the accurate number of points accrued or lost (which the dashboard shows)
B) the “answered correctly” - “answered incorrectly” score, which seems to make sense but isn’t actually accurate if you missed a burn item.

Since the choice seemed arbitrary, I chose B, because I figured few people would notice, it was easier to code :slight_smile: and the dashboard is always accurate so there’s not much harm in a little fib here.

But… a few people have noticed, so I’ll probably address this next time I make an update to the userscript, making it accurate in a way that’s not surprising.

1 Like

Well, I’ve now burned everything and, while the tooltip does correctly say 100% done, my “real” level isn’t 60 yet. I’d better get to those 0 lessons pending :stuck_out_tongue:


Must be a bug in my script. Can you send me a screen shot of your tooltip? I’ll update the script :slight_smile:

1 Like

It says

80064 of 80064 = 100%

Edit: found the bug. In the console, if I try Math.floor(80064/1334.4), it gives me 59 indeed. Some weird rounding error, I guess.

1 Like

Needs a “unburn all” button. Useful for new level 60s and returners


Not extremely weird. Computers don’t do well with floating point numbers because of the way the number is stored in memory. It looks like 1334.4, but is probably 1334.400000000000000000001 or something. Math.floor does the rest.
Suggested fix is to always calculate with integers whenever possible.

1 Like

No no, it was literally set as 1334.4.
Edit: I finally understood what you meant. Yes, it would be stored as 1334.4000244140625 in memory on single precision.

Also, 60*1334.4 == 80064.0 but 80064.0/1334.4 gives 59.9999999… :stuck_out_tongue:
By weird, I meant “floating point operation error”. It’s weird in the sense that it’s not mathematically exact (but can of course be expected… that’s how I guessed where to look in the first place)

1 Like

Finally got a minute to make a little patch for you. Easy solution was… :slight_smile:

        let level = Math.floor(60*points/points_possible);

Good idea, but probably as it’s own userscript :slight_smile:

On the lesson quiz page, I sometimes get the following error:

Error: null has no property 'firstElementChild'
Script: 'WaniKani Real Score'
Function: showPointsOnLessonSummary
Line: 178

The error doesn’t happen all the time though, only sometimes. I think it might be related to the fact that the script can run on https://www.wanikani.com/lessson/session even though the html elements it is looking for aren’t in that page. However, I don’t think you can just disable the script on that page by removing the @match statement for it because I’ve seen instances where doing that prevents the script from running on the lesson summary page too, even though it has a different URL. Instead, maybe check the current url of the document whenever the script does anything?

1 Like

Thanks for finding this. Newbie mistake. I fixed it with new include directives

// @include      /^https://(www|preview)\.wanikani\.com/
// @include      /^https://(www|preview)\.wanikani\.com/dashboard/
// @include      /^https://(www|preview)\.wanikani\.com/review/
// @include      /^https://(www|preview)\.wanikani\.com/lesson/
// @exclude      /^https://(www|preview)\.wanikani\.com/lesson/session/

Hmm… probably be easier to do …

// @include      /^https://(www|preview).wanikani.com/(dashboard|review|lesson|review/session)?(/)?$/

I had an idea that reminded me of this script. What if you had a review-style progress bar at the top of the dashboard to indicate your progress of burning everything?

edit: I imagine this to show progress of lower SRS levels too, of course

1 Like

With the addition of 6 new WK items today, the maximum score has changed and should be adapted (currently to 80118, further additions coming).


lvl 15 here and no burned items

is it still useful to install this script now or only later?

Why not? The script is counting every progress you make, even if it is only from apprentice 1 to apprentice 2.

1 Like

Yeah - I should make an update.

1 Like

Also, can you make it work on the preview site? (‘preview’ has ‘review’ in it so the regex needs to be changed)

Ayyy, 60/60 :sunglasses:


But for real tho, could need some adjustments since there’s plenty of new items


With tampermonkey you can easily edit the script. The maximum score is at line 23. Just correct the number and save the script (File - save / save to disk). The current value is 80991 (=8999*9) - until this evening.

Reload the WK page and your 60/60 will be gone.