[UserScript] SRS Grid

WaniKani updated their SRS Grid, killing my old SRS Grid script ([UserScript] SRS Grid Details)
So I went ahead and started remaking it, while also over engineering it this time. Currently doesn’t have the +/- functionality the old one did. But, it breaks Vocab into Vocab and Kana Vocab, allows you to subdivide apprentice and guru levels, and have initiate and/or locked.

10/04/24: Updated to take turbo events into account. Should persist on dashboard now.

Default behavior:

All three options turned on:

6 Likes

That definitely looks promising, thanks for your effort.
You didn’t share a link to the updated script though?

1 Like

The new version 6 doesn’t show the SRS grid for me (they’re completely gone), no matter if I don’t use any options, one or all in the settings. I deactivated all other scripts I’m using (besides Framework and Framework Additional Details + Breeze Dark 2) but it still doesn’t shop up (sometimes I can see the standard grid from WaniKani for a very short moment until the script is fully loaded).
I’m using the Opera GX Browser on my laptop.

Is there anything I can try out the make it work on my end?

I’ve never used Opera GX, but does pressing either F12, or ctrl+shift+j (ctrl+opt+j if you’re on a Mac, which I assume you are. Who else uses Opera other than Mac users?) bring up the dev console?
Hopefully its reporting any errors to the console.

Popped open on Chrome to get an example, and look at that, some other script I have installed is throwing errors. Fun.

The fact its replacing the standard shows its working to some extent. Something is probably null or undefined its trying to pull values from. I’m thinking perhaps if you haven’t gotten anything to say burn level, and its trying to count those at burn, its bombing out.
I’ll tomorrow when I get some time throw in a bunch of != undefined around the code.

Nah, not a Mac-User by conviction. :yum:
These errors show up in the console:


While checking the console, I deactivated all other scripts again besides both Frameworks.

Hope, that helps a bit.

**Edit: I do have nearly 300 items on burned (both first levels). So it should be a reason for not showing up.

What timing. I just posted version 6.1, which will check for undefined before asking for the length. Hopefully that’s it. The ‘getCountForLevel’ in that error makes me think that’s what it was. the ‘srs_stage’ being mentioned though…

Just installed the 6.1 but, unfortunately, no change. :frowning:
(As far as I can see, the error message is the same as before)

What can I check regarding the mentioned “srs_stage”?
My reviews have currently 34 items (which will be done in a few minutes) plus some more in later hours.
I do have items in all SRS levels (from Apprentice until Burned, though I’m not sure if in all sub.-levels in Apprentice and Guru - but that shouldn’t be the problem.)
And I still have many lesson items waiting.

What I don’t have: Currently no Radicals in the Apprentice levels now in lessons. Could that be the reason?

Sounds like its either not retrieving assignments from API, or hopefully just a timing issue. Added a few console messages, and another check before it loads the component.

Also noticed Greasy Fork states code can’t be minified, which sucks. Now the code is massive, with tons of unused code. So, it’ll be slower. At least until I find a way to do tree shaking without minifying.

It still won’t show up for me (version 6.4, only this and both Frameworks activated). :frowning:


Well, at least the error count went down from 7 to 5. So some form of progress, I guess. :smiley:

Wonder if there are items that don’t have assignments yet?
Tough to test when I have everything unlocked. Suppose to could make a second account to test with…

But it looks like that errors is from line 6357

Just pushed another patch. 6.5

Yes!! Now it works! :partying_face: Thank you so much!!

It doesn’t count the locked, though. I have over 77% locked according to another script. No problem for me, but I figured you’d like to know about that. :slight_smile:
My browser console seems to have no further error messages that could point to the reason (all 5 I get are referring to a problem caused by my ad-blocker).

1 Like

Glad we got it working, thanks for the help.
I must have the locked level wrong. I thought locked was level -1. WaniKani’s API documentation doesn’t really say. I’ll have to do some digging, or peeking into code if other scripts, to find it. Might just be empty, or null, probably.

1 Like