[Userscript] WaniKani Prioritize Overdue Reviews (reorder script)

So that you don’t have to disable the script itself?

I considered this before, but I wasn’t sure what to do if the script had already ordered reviews and then you turned it off in the settings. What behavior would you expect in that case?

1 Like

Maybe whenever you leave the reviews page/reach the review summary page, the script will be always turned off, but you’d have to turn sorting on manually within the review session/from the page summary (for the next review session only)?

The script is only ever active on a review session page as it is. And I don’t think I should require people to run it manually every review session. I meant more so that if you disable the script from a script setting should I leave the reviews sorted? Shuffle one last time? Something else?

Is there a reason simply disabling the script from Tampermonkey (or whatever script manager you use) isn’t enough?

Turning it on requires to always go to the dashboard from your reviews, which is a bunch of clicks (at least 4) and a bunch of searching, especially if you run more than a few scripts already.

Anyone know if it’s possible (I know they are not intended to work together) to use this script together with the regular reorder script to get 1x1 and/or sorting by type as well?

Someone who helped me beta test the script asked about 1x1 mode, and I think I got that working at the time. But it’s unlikely that you could do any other sorting like by type and have it work with this script.

I guess @xMunch would be the person to ask whether ordering by type would keep the relative order within the types.

Gonna try it now :smiley:

Just to make everyone aware, I haven’t updated this script in response to the API changes made August 17, 2020 API Version 2 Changes Are In Effect, so this script probably no longer works. I’ll try to address this as soon as possible, but I have no estimate for when that’ll happen.

4 Likes

can confirm. is in fact broken

1 Like

Yeah, sorry about that. I lost track of time with this. Hopefully I’ll have time this week to fix it.

2 Likes

Glad to know it’s being worked on. If it helps at all, on Firefox there’s no number next to the icon for overdue reviews, shakes the answer box when you move on to the next item if you press enter to move to the next item, and interferes with the double-check script that allows you to redo your answer if you so choose.

1 Like

@lucihdos @absurdAviator Should be fixed now. Let me know if you run into any issues.

5 Likes

Funny, I’ve been having the answer box shaking issue for a bit but been too lazy to investigate what’s going on, and just now I finally did and narrowed it down to this script. I get here and it’s already fixed, just had to update.

Nice timing!

It took me an embarrassing amount of time for it to click that this was a script problem and my enter key wasn’t broken :sweat_smile:

4 Likes

Ditto! :roll_eyes: (actually, I was entertaining the notion that it was a bug in APIv2)

1 Like

Hello! You may have already fixed this, but i fixed an undefined bug that emitted out of
updateOverdueCountOnPage

	function updateOverdueCountOnPage(key) {
		let remainingReviewIds = getFullReviewQueue().map(item => item.id);
        const doesOverdueSetHaveId = (originalOverdueReviewSet, id) => {
             return originalOverdueReviewSet !== undefined && originalOverdueReviewSet.has(id);
        };

		let remainingOverdueReviewSet = new Set(remainingReviewIds.filter(id => doesOverdueSetHaveId(originalOverdueReviewSet, id)));

		overdueReviewCountSpan.text(remainingOverdueReviewSet.size);
	}

Under what circumstances are you getting undefined for originalOverdueReviewSet? In theory that should never be undefined by the time updateOverdueCountOnPage is executing. Maybe I have something messed up with my promises or my use of wkof.ready. I’m not that familiar with the latter.

The problem with your solution is that you will probably get messed up counts on the page.

Hello! i’d like to use this script, but it doesn’t show up in Wanikani. i’m using Tampermonkey with another script that works fine. Also i have WaniKani Open Framework and it’s working, because my working script does rely on it.

If you click the little settings icon during reviews (from Open Framework), do you not see the settings for this script? This script is meant to run automatically behind the scenes. So it might be working without you noticing.

does this script work better than the WK default options for showing items on reviews?

I confess I couldn’t understand why use this script and not just leave as the default settings in the account.

This part that says “This could hurt your long-term retention, particularly your ability to differentiate between similar looking kanji.”

looks interesting because now on level 24 I am making many mistakes with similar kanji. Maybe this script can help me…