[Userscript] Critical Review Countdown

Hmm, I’ve now installed the same plugins and theme, but it is still working. Just to check if we are barking up the right tree, can you disable everything (other then the Open Framework and this script) and see if it works after a refresh? That will let us know if it is a script compatibility issue, or just something else all together.

Disabled the other scripts, reinstalled, closed out of and reopened Chrome, and it still isn’t working. However, it does show up on my script list now.

For some reason the scripts tries to be active also on the forums:

When I enter https://community.wanikani.com/ I still see the script on. I only realized this, because I got an popup about needing WK Open Framework.
image

Wow, I was just thinking a few days ago that having a script that told me around how long it would take to level up would be nice, and then I find out that one was made only a few days ago! Thank you very much for this script! I’ve installed it, and it seems to be working fine for me, but if I notice anything off, I’ll be sure to tell you.

(Just a few minutes ago, I was indicated I was getting a critical review and then I got enough items right to level up. Yes!)

4 Likes

Hello,

I think it may be a bug. I’ve messed up a review for one radical, and now my “critical review timer” shows the wait time for this radical (in 22 hours), while missing much closer time for review of the rest of radicals (7 hours). I’m using the latest version 1.0.5

All the best!

It sounds like it is working as intended. It currently assumes that you need to pass all radicals to move on, and 90% of the kanji. As long as you do the review in 22 hours, and get all the radicals correct, you will be on course for the fastest level up possible.

In other words, as long as you do the reviews available in 7 hours sometime in the next 22 hours, it will have no effect on how quickly you level up.

PS Is it possible to level up without guru’ing all radicals?

PS Is it possible to level up without guru’ing all radicals?
I’ll find out for sure in three days. My understanding is that you need to guru a radical to unlock kanji(s) that is/are based on it. I have 4 kanji I can mess up on that level, and my troublesome radical will only hold one kanji back, so I still hope to reach next level in 7 days.

1 Like

I don’t know for sure, but I imagine so. All you need is to guru 90% of the level’s kanji, so I think you can probably hold off on guruing a radical every now and then

Juts reporting. I gurued radicals (all but one), and the second batch of kanji got unlocked minus the one that relies on my bad radical. So I’m still on schedule.

No idea how much it would complicate your script logic to handle this 100% correct. Feel free to ignore.

1 Like

So when I use this script, I should try to follow WK’s “next review” as often as possible, but as long as I at least follow the “next critical review time” I’ll still level up as quickly as possible even if I don’t get all the original WK time suggestions?

Right, that’s the idea.

There’s some small caveats. If you get just the right number of on-level kanji reviews wrong at the “critical” time, you may level faster if you were doing kanji reviews as they come up. In other words, a kanji that you didn’t need to level up may become the new “critical” kanji because of getting another kanji review wrong.

That being said, I am mainly using it to know when I should take a break from a busy day and do some reviews. And also to reduce the nagging thought that there are new reviews at the top of every hour.

1 Like

i’m fairly sure there’s an off by one error in this script. i became suspicious when it said there were ~22 hours to the critical review, then i did some reviews… and the next level became immediately available. I had precisely 3 kanji (out of 30-something) that weren’t Guru’d, so I was precisely at the critical threshold.

I believe the error is here:

                    var critical_index = Math.ceil(kanji.length * .9);
                    var critical_kanji = kanji[critical_index];

Note how if there’s 10 kanji to study (for example), we need to pass 9 of them to get to the next level. But it looks up kanji[9], and javascript arrays are zero-indexed, so it’s actually checking to see when the 10th kanji in the list is available, not the 9th.

It should probably be something like:

                    var critical_index = Math.ceil(kanji.length * .9);
                    var critical_kanji = kanji[critical_index - 1];
2 Likes

Thanks for the very detailed report. You are correct. I am cutting a new version with this fix.

1 Like

It is not appearing on my dashboard…

image

1 Like

Hey Redglare, I’m trying to reproduce this, and haven’t been able to so far. I’ve installed and enabled the same set of scripts, and ensured they are all up to date.

What browser are you using? Are all scripts up to date? Not sure what else could cause an issue, if you have any ideas.

I’m using Chrome. I think all the scripts I use are up to date. Btw, I use more scripts than depicted in that shot :sweat_smile:

Even when I disabled all other scripts except WKOF and yours, it didn’t appear. I know literally nothing about coding and such, but I still took a look at your script. Could it be the fact that my current level (54) don’t have a radical? Just a wild guess :woman_shrugging:

Maybe it will appear on my dashboard again on the next level, and then disappear again on level 56? :thinking:

Thanks! That is an excellent guess. I didn’t realize those kinds of levels exist. I’ve updated the script, if you could test it that would be great!

FWIW, @sansarret identified another issue that I think might impact later levels more. Right now I assume that you need to pass all radicals, but I’m starting to run into levels where you can get enough unlocked kanji without all radicals. I’d like to go back and update that logic.

3 Likes

Oh! It appeared! Wiii! :sparkles:

Ah yes, fast levels. I’ve done a few of those already and all my remaining levels are fast levels. I don’t think I’ve seen any problems so far regarding that.

Probably because I cheat and never get my kanjis wrong. innocent whistling :kissing::notes:

2 Likes

This script appears to interfere with the [Userscript] Progress Percentages]

1 Like

They work fine together for me. What browser are you using?