[Userscript] Reorder Buttons

I haven’t had any issue since. I don’t know what I did to “fix” it, but I’ll let you know if there’s another issue. For now I’m able to do my reviews (a blessing or a curse, you decide)

Edit: As soon as I say that it happened again. Again, right after a reload, so it must have something to do with the initializing. Here’s the log: [Tue Jan 25 2022 11:22:51 GMT+0900 (Japan Standard Time)] loading settings...[ - Pastebin.com. I’m also screenshotting the console error that shows up every time I try to press enter when it’s stuck:

The “click_submit” and “new_submit_handler” userscript links seem to belong to Double Check, so maybe it’s that script that is the main issue.


I don’t think this script has made it to the list, so I am adding it for you


Straight up, the only one (I’ve tried) that works properly


This is fantastic, thanks so much.


Hey y’all :wave: I’ve been doing reviews recently and found that occasionally sorting stops working and the ordering returns to random. I have some theories to start debugging, but wanted to confirm if anyone else has had similar experiences.

Also, I’ve noticed that WK added the following option in the settings page!

I’ll try fixing this plugin and keeping it working long-term, though it’d be awesome seeing this functionality merged into base WK :eyes:

1 Like

Yeah, they mentioned something like that a few weeks ago, and that it was available on the preview server at the time. Thanks for letting us know that it’s now merged in!

EDIT: Which panel would this be on? I can’t see it in the Settings → App panel?
(are you maybe on the preview server accidentally? …)

1 Like

They are doing a gradual rollout for this feature:

I’m wondering if WaniKani provides an easy way for userscripts to find out whether the feature is already active.


Oh, I see! Wasn’t aware that they are doing something like this.

Which doesn’t make it easier for script developers as there may be different flavors of WK in existence at the same time :sob:


I’ll ask about this on the next feature rollout (beyond what is already scheduled). I think the rollout check is on the backend, but I wouldn’t think there would be much standing in the way of including feature tags on the client side.


Yeah, I started seeing problems with both the SRS level sorting and the 1:1 breaking. Immediately after seeing the problem, I noticed the notification on the main WK page about the new sort option in settings.

Whenever I start doing reviews, it sorts correctly at first, but after a wrong answer, I get a review for a different item instead of finishing the current item first. After a while, it goes random and no longer sorts by SRS level.


@sonarius WK now slices items from the start of the reviewQueue instead of popping from the back to populate the activeQueue, so you don’t need to reverse the review queue anymore.


Yeah, I’m seeing the exact same thing. I was wondering whether WK now pushes the wrong item back to a different position in the list, which then somehow messes up the list? I don’t know.

But I must say I quite like it that the wrong items are pushed back instead of being presented again immediately. This way I can double-check better whether I really remembered them.


They do. I had to update Omega’s 1x1 feature to reflect this. Although I am just realizing that I forgot to update my standalone 1x1 script!

Soon I will be adding this as a feature to my implementation of 1x1 (in Omega and the standalone script), so if @sonarius wants they could just copy my 1x1 code to add that feature in this script, too. That would remove this script’s 1x1 implementation’s dependency on breaking Math.random()

My idea is to have a setting to only show the next question right away if you answer a question correctly. If you answer it incorrectly it goes back into the queue


This is amazing help! Thank you so much :heart:

I haven’t looked at the implementation quite yet, but would it be possible to isolate 1x1 as a standalone plugin people can install and manage independently instead of it living in every script that needs to implement the feature? I have similar plans for the SRS counter portion of this plugin as well (haven’t gotten around to splitting it off yet cause new job :sweat_smile:).

Also, really big question: how do you learn about all this? :eyes: I’m not familiar with dev docs for WK’s “local JS API” (or whatever it might be called). As evidenced by my Math.random-breaking implementation I copied over from other plugins, I really don’t know how to self-help very well when it comes to WK behavior.

Just to be sure about this, are you requesting a specific sorting case be added that lets wrong items fall way behind in the queue, or is this more of a personal anecdote about realizing you prefer doing reviews without 1x1 mode enabled?

I already have my implementation as a standalone script! I also have implemented in Reorder Omega just because I wanted to include some extra scripts in Omega that I personally find really helpful

I actually have a standalone script for this, too, although not an exact copy since I wanted it a bit sleeker

If you mean WK’s changes then it’s sadly primarily through bug reports in my other scripts (this time in Reorder Omega) and digging around in WK’s code in the DevTools. Otherwise I’ve just been learning stuff as I go over the least few years. Pretty much everything I know about programming has been learned through trying to fix things right here on Wanikani and looking up docs or googling.

That’s two different things, isn’t it? 1x1 means I get reading and meaning one after the other. That’s perfect - I definitely want that.
But what I was describing is that with the changes in WK I don’t get the same item again immediately after I made a mistake; instead it takes a while for it to come back to be reviewed by me. (But only the wrong part, which feels a bit strange in the process but it’s much better than being forced to review the other half as well.) The latter feels more helpful when it comes to solidifying corrected mistakes.

As a first step, I was just noticing and mentioning, not really requesting. But I wouldn’t mind if the behavior was like that - i.e. vanilla WK wrong item pushback or something. I don’t think you’d need to implement something for this - it just works out of the box. If you could fix the list reversal issue that Kumirei mentioned, then the script would be fully functional again for me :blush:


Sweet! I’ll test their integration with this script (after fixing things) and see if/how the user-experience changes. If it’s indistinguishable, would you want to consolidate? I could remove the features from this script and point users to your implementations.

Dang, this is really troublesome :weary: it’s great that many people get to use user scripts to learn to program, but it’d be really nice having some consistency in knowledge sharing or documentation for WK behaviors. Do you know if there’s a Discord or even a WK thread for user scripts developers to consolidate that kinda knowledge?

1 Like

Sounds good to me! Although it’s understandable if my take on the SRS counts is not to your liking

I don’t think there is any, but that would be great, actually

1 Like

@sonarius @NicoleIsEnough You may be interested to know that I have added three behavior settings to my implementation (in both the standalone script as well as in Omega) of 1x1


Although only one “correctly” appears to be correct (ly) :stuck_out_tongue_winking_eye:

Other than that, that’s a great feature, thanks a lot!