[Userscript] Detailed SRS Popup

Installation link: → Right Here ←


Detailed SRS Popup

Working alternative to @Seanblue’s script Show Specific SRS Level in Reviews.

This script makes the SRS popup in reviews more detailed to show exactly which SRS level the item lands on when you complete it. Normally WK only shows Apprentice/Guru instead of the individual Apprentice 1-4 or Guru 1-2 levels.

Instead of

image

you will see

image

Installation

Installation link: → Right Here ←

17 Likes

Just enlightened a kanji that was supposed to move to Apprentice 2

image

image

restarted the session over, asked it again

image

now its apprentice 3

image

I missed the chance to screenshot another kanji in the same situation that got mastered instead of apprentice 2

4 Likes

Hey @Mods, is there a reason this isn’t just the default behavior or at least a setting?

Sorry to take over your topic @Kumirei, but this has bothered me since I made my script over 5 years ago.

5 Likes

That’s certainly strange… I’ll look at it

1 Like

Arigato

image

1 Like

Did you use Double Check to retype or anything?

1 Like

I do

Here is a list of my active scripts

I also installed a dark theme

Do you think double-check or any other script may be responsible?

Let me try turning it off

EDIT:

Yes, you’re correct. turning off double-check seems to correct the issue

2 Likes

Cool, that’s a good lead for when I get a chance to look at it

1 Like

I am checking this now with the team and I’ll let you know what they say.

Update: Overall we don’t think that showing the exact SRS stages is very helpful for learning, because we want learners to focus on the content to be learned (not the exact SRS stage). We also want the option of having different numbers of stages for different items, so we want to keep the visible stages to a minimum.

5 Likes

You just beat me to it. I also made a script for this yesterday which I was going to upload today. Yours looks a lot better though. I did not know how to intercept the didChangeSRS event and redo all the required calculations, so I found the function that generates it and changed that instead.

1 Like

@rfindley Do you think it would be possible for you to ensure that your fake didAnswerQuestion is fired before the native didChangeSRS event? I use didAnswerQuestion to figure out which item is being updated in didChangeSRS

I don’t mind if you want to publish yours as well. As you see, apparently mine doesn’t play well with Double Check

One of the reasons I did not publish mine yet is because it also does not work with doublecheck by default. I have it working on my end by changing a few lines in my copy of doublecheck, but that didn’t seem very user friendly. Doublecheck grabs pointers (or whatever the javascript equivalent is) to many of it’s hooks into wanikani, but creates it’s own instance of the srs manager for some reason. My script modifies the global srs manager, so that change gets ignored if doublecheck is also running.

The other unfinished issue I was still having is that it only works if I start the script with a sleep for several seconds. I have no clue what I am waiting on, which makes it a bit hard to find a better option.
I have uploaded a copy here. This was my first attempt at javascript or anything web related, so there might be other problems as well.

1 Like

I think I didn’t know how to get to the global SRS manager. It’s going to be probably a week before I have much time to spend more than a few minutes on scripts, but if you have a change for Double-Check that uses the global SRS manager, I can look into merging your changes sooner than that.

2 Likes

Yeah, I think I’d just need to swap a few of the actions in the set_answer_state() function. I’ll check it out when I get some time.

1 Like

Burn Bell stopped working since I installed this script.

Edit: the bell rang several items after the burned items occurred. Something is causing a delay.

Edit2: Now I got a burn bell right on the burned item. The problem seems to be intermittent.

1 Like

The SRS manager is a part of the quiz_queue, which you already extracted.
So I just replaced

if (quiz_queue.hasSubjectIdsWithSRSTarget) {
                    srs_map = new Map(JSON.parse(quiz_queue.subjectIdsWithSRSTarget.textContent));
                    let SRSManager = (await importShim('controllers/quiz_queue/srs_manager')).default;
                    srs_mgr = new SRSManager(srs_map);
                }

with

if(!srs_mgr){
                    srs_mgr = quiz_queue.quizQueue.srsManager
                }

and that seemed to work. I wasn’t really sure what the outer if statement was doing and why this was the only one with an else branch though.

1 Like

Ahh, I see. The reason I didn’t use the srsManager in quiz_queue is because it was a private variable at the time that I updated my script, so it wasn’t accessible. I know tofugu-scott changed most things to public variables for now, but I know he’s been doing so at least partly to aid in troubleshooting problems, so I hadn’t changed any of my script to take advantage of that in case he decides to switch things back to private. But I suppose I now have a snapshot that I could revert to if I ever needed to fall back to it, so I can switch to using the now-accessible srsManager in quiz_queue.

The outer ‘if’, by the way, is to check if we are on the Reviews page (which has SRS info) versus Lessons or Extra Study (which don’t have SRS info).

2 Likes

I’ve just posted an update (for something else that broke due to a WK change) that now includes this change. Thanks!!

3 Likes

Really nice to see this, and also really nice to see it being made compatible with double-check so quickly. Thanks a lot!

Although the compatibility doesn’t seem to work right now, I’m still getting undetailed popups.