[Userscript]: Dashboard Kanji Sorting

A simple script that adds a sorting button to the Kanji on the dashboard.

You can sort by:

  • Time: Sorts by time (closest review first)
  • Stage: Sorts by SRS Stage (Apprentice I, Apprentice II, Apprentice III, etc. in ascending order)

[Download / Install via GreasyFork]

Normally, the kanji on the dashboard are all mixed and it’s hard to tell how many kanji are left for the completion of the level, or when the next current-level item can be reviewed again:

With the sorting, however, the kanji section on the dashboard is much clearer, making information on the current level easily accessible:

Note: It already sorts when the page loads, so there is no need to click the button every single time.



Two minor suggestions (feel free to ignore):

  • It isn’t obvious that the toggle is clickable. There are tons of common visual indications for switches. Even radio-buttons might be better (and simple to implement).

  • The word “time” is a bit overloaded. I think it sorts by srs stage, or by scheduled review, so perhaps the two labels should be “stage” and “schedule” (both are part of the SRS)?


Thanks for the suggestions!

You’re right about it not being obvious that the toggle is in fact clickable, but I feel like since people will most likely read the description or see the gif from this topic, or just click on it because they see something new has been added by the script they just installed, it should not be too big of a problem.

About the labels, “Time” may be overloaded, but it’s the simplest term to describe the kind of sorting. “Stage” though, is much simpler than “SRS”, so i will change the label from “SRS” to “Stage”.


nice feature!

however, i’ve installed it, it appears in my tampermonkey dashboard, but doesn’t appear on my WK dashboard. am i missing a step?

when i look at the code, there’s a line “include […]” which seems to be commented out. it seems i’d have to uncomment it? but i am not a coder, and don’t really want to mess with code without double-checking.

You’re not missing a step. There just might be some incompatibility with the browser / other scripts might be interfering.
The thing that comes after the “@include” is not commented out, the “/” at the beginning and end indicate start and finish of something called regular expression.

Do you mean that only the button doesn’t appear, or do you mean that the script is not being executed at all when you’re on the dashboard?
If you’re on the dashboard, clicking on the tampermonkey extension will show the currently active scripts. Is the “WaniKani Dashboard Kanji Sorting” script visible and enabled there?

If it’s running and enabled, it should look like this:

this is what it looks like on the WK dashboard (it doesn’t appear at all):

and on the tampermonkey dashboard (it appears like all the other userscripts):

i tried disabling all other userscripts on the WK dashboard, it still doesn’t appear…

edit: running firefox 103.0.1; tampermonkey 4.17.6161; macOs 12.5

I understand. So the script is being executed just fine, just the button seems to not appear… I’m afraid troubleshooting this might not be completely possible for me since I don’t own a device with macOS 12.5.

From what I could test on a macOS 10.15.7 device- with the same Tampermonkey and Firefox version- I am unable to reproduce this behavior.

ahh, i’ve been able to narrow down the problem.

earlier, i had accidentally disabled all scripts, including the kanji sorting, oops. i’ve had time to look at it in a bit more detail, and it seems to be some conflict with the ganbarometer - if i disable the ganbarometer, the kanji sorting works. otherwise it doesn’t.

i don’t know if there’s anything you can do, ah well ^^

1 Like

Thanks for the additional info! I’ll check it out tomorrow :+1:

1 Like

So, I’ve done some additional testing, and running Dashboard Kanji Sorting, Open Framework and ganbarometer-svelte worked just fine.
Right after installing either ganbarometer-svelte or Dashboard Kanji Sorting, sometimes, one of the two would not immediately appear, but it was just a matter of refreshing and they both worked flawlessly at the same time.

Since I can’t really investigate it further without a specific error message or something similar, I’m afraid other than trying to refresh the website, there aren’t other things i could recommend.

Edit: I’ve updated the script (now v0.3) to run at document-end, and it seems to work every single time now.

Yes - sounds like a race condition with page load.

Haven’t looked at ganbarometer in ages (“works for me” :smile:). Let me take a peak.

sorry for the delayed reply, had a busy week and wasn’t on WK. Kanji sorting is working beautifully now, thanks for a great little script ^^

1 Like

Weirdly, the script is stuck on the stage view for me, and if I click on it the button changes to say time but the sorting does not change :thinking:

Just to confirm, the “Stage” sorting works fine and re-orders the kanji?

The script actually sorts by stage and then by time automatically at the beginning. Sometimes nothing will change if you sort by time again since the kanji could already be in the correct order. To see if this is the case, check the text that appears when hovering over each kanji if they are already in order.

If this is not the case and they sort just fine by “Stage” but not by “Time”, could I ask you to please:

  • re-enable each script and refresh one by one, (start with WK Open Framework)
  • tell me the name of the script at which it stopped working again. I will see if i can make them compatible

Also could you tell me the browser that you’re using and its version?

1 Like

Oh, yeah, I see!! Currently it is in order since both time and stage will make the same one, so actually I can’t really check if it doesn’t work… Now I wonder if I always check when they are the same… :joy:
I’ll have to keep an eye on it and let you know again (/try what you mentioned)!

1 Like

Is the script down?
It won’t show up on my dashboard at all anymore (the button is not there and the items clearly out of any order this time! haha)
I tried to re-install, disable all my scripts and re-enable one by one but nothing changed.
I’m using chrome version 115.0.5790.170 with tampermonkey (although I tried it with violentmonkey too with just open frame and kanji sorting).

You’re right the sorting was broken. I’ve released an update so you can update from here.

Since I don’t have an active subscription anymore, I am unable to properly confirm whether it will sort properly- all I did was just simple tests.
Does the sorting work again after updating?

(Note: This fix introduced an incompatibility with scripts that change the very top of the page, where the same button style is used for the “Kanji” button)

1 Like

Looks to me like it works well now, thank you!! :tulip:

1 Like