[Userscript] Reorder Omega

Yep, still on the to-do list.
(I should have said “fixes support for the script menus on the Reviews/Lessons/Extra Study pages” since you can’t navigate to any other turbo pages from those :grin: )

3 Likes

Updated Omega to require WKOF 1.1.0 since it can be quite important to be able to edit presets during reviews. @rfindley I’ll probably notice wherever you post, but it would be great if you could let me know when you make more changes so that I can update the requirement for Omega

1 Like

@Kumirei,
You might be interested to take a look at my update for [Hide Context Sentence]. It’s a model that I may be using for scripts that are intended to survive across multiple Turbo pages.

Currently, I don’t want wkof to assume that a menu link added on one page should remain after a page-nav. So, I’m still debating whether to add some form of lifecycle management to wkof, or just publish a programming template for scripters to self-manage. If you have thoughts on that, I’d welcome your feedback.

I’m somewhat against the lifecycle idea because I’m not sure I can know what parts of a script to retain vs unload. Plus, scripters are going to have to start being aware of the need to unload things on pages that their script isn’t intended to run on.

I’m really liking the Stimulus changes, but Turbo is going to be a headache for a while, I think.

3 Likes

I think that’s a pretty good model. Although I am unlikely to make many more scripts at this point, I think settling on a standardized design for my scripts is probably a good idea for when the dashboard is converted.

With the Turbo events already available I don’t think there would be much need for lifecycle management in WKOF. It is probably for the better that script authors get familiar with the underlying technology rather than relying on WKOF. A template (such as Hide Context Sentence) would be a great introduction for an aspiring scripter who doesn’t want to (or frankly need to) read the Stimulus/Turbo docs.

I was expecting it to persist, but I suppose that does make sense. It’s not too much trouble to add it again on navigation

1 Like

Ah, I just discovered the problem, and man is it sucky…

It’s documented on GitHub too. Apparently extensions on iPad aren’t allowed to run in the background, only on demand. So the only time a userscript will get checked for an update is before it might be loaded, meaning it’s in a matched URL.

Since until now everyone had specific WaniKani URL’s for the scripts that have all changed, any that didn’t just match all WaniKani URL’s won’t get updated, ever. (Edit: Except for Dashboard scripts or scripts that for some other reason matched all URL’s.)

This (probably incorrectly, but I don’t know if the behavior’s defined) applies to dependencies too, so if you load an old dependency, and that dependency doesn’t specify the URL you’re on, it doesn’t check for an update.

So, I’ve had to go through and manually update all the dependencies, and now it’s working. But… gah!

3 Likes

That one was dumb of me – I just needed to disable the enhanced tracking protection. I even have this suggestion as a bullet point in my [Guide] What to do if a userscript does not work :sweat_smile:

Speaking of which, if anyone is still having problems with Reorder Omega, it would be very helpful if you could go through the suggested steps in the linked guide, write everything you find into a bug report, and post it here.

2 Likes

One of the more annoying problems is that when going to the lesson page, turbo:before-render is fired twice – once for the general lesson URL (https://www.wanikani.com/subjects/lesson), and once for the specific lesson URL (https://www.wanikani.com/subjects/8957/lesson?queue=8957-8960-9131). However, it seems that the second event is cancelled, because only changes to detail.newBody of the first event are kept.

1 Like

So right now I just progressed a level and I’m trying new lessons.

If I select a saved sorting, I get the right new lessons—I tried it with my “Radicals first” filter and was able to study and quiz the radicals.

But “None” is not giving me the same results as disabling Reorder Omega entirely. With “None” I am seeing kanji, with the script disabled I’m seeing leftover vocabulary from the previous level. If I close the tab and start over I see the leftover vocabulary for a few seconds when the only decoration is “Preset: None”, but then the elapsed timer starts up and at that moment it snaps back to new kanji.

I checked and I don’t have any errant actions or filters saved on the “None” preset.

Also, when I select a different preset, the old preset remains drawn on the screen. So I see, like “None” and “Speed Daemon” both overlapping on top of one another.

This may be unrelated but I’ll mention it in case it is: It turns out as I mentioned above I had to install the new script manually because the URL changed and on iPad userscripts can’t update unless you go to their allowed URLs. But what I didn’t realize until a few minutes ago was that this saved the old Reorder Omega version as well and both were active in the Userscripts list for the page. Since I couldn’t be sure which I’d be disabling if I used the disable button, I just deleted the old one from the directory and closed the tab and opened a new tab to WK, and it’s now gone from the list. But I’m still getting the same behavior (overlapping preset text and “None” showing kanji first).

I’m not sure what to do? (Other than disabling the script before doing lessons when I don’t want a special order. I do wonder what order None is giving me, though!)

1 Like

Thank you for mentioning it, I didn’t consider that this would affect the None setting. @sinyaven this is due to wkQueue having to get the queue from the API, right? Did you decide yet whether to emulate the native order? (I really don’t understand why Scottish thinks it’s a bad idea)

1 Like

I’m having the same problem on iPad safari. It’s odd - i get the drop down box with the options in the reviews, but nothing shows up for lessons.

Yes, that is on my todo list. Yesterday evening, I took a bit of a break from userscript fixing in order to get more than 6 hours of sleep, but today I woke up 2 hours early, so this did not work out :laughing:

1 Like

Heh. Whatchu need sleep for?? Coding is life! :coffee: :coffee: :coffee: :face_with_spiral_eyes:

3 Likes

I managed to implement the native WK order before heading off to work:

2 Likes

I’m having the same issue, the reading/meaning questions appear randomly despite having back/back option set to “Repeat until correct”

2 Likes

Hello! I have a problem with reordering back to back. I want to have both the reading and meaning back to back but when I check the script options it only shows me this and I’m pretty sure it worked before the update. Shouldn’t there be 4 options in the dropdown?

1 Like

@Antaury, no one has figured out how to implement the other two options yet after the update. I think people are still looking into it, though.

2 Likes

Ahh, thank you for confirming

Just FYI, it’s reordering as before for me now, thank you for your work on this!

(don’t know about back to back, I don’t use it, I suppose)

1 Like

In case you need to relax from double-check …
[Hide Context Sentence].
Could you perhaps whip up a similar script also for item info?
Close the context sentences and open Kanji list?
I wanted to give it a try myself, But I’m not an expert for this web stuff :smiling_face_with_tear:
I also sent this request to info@wanikani.com. But I don’t expect any reply.
The idea is that in case of an error I could click on a kanji if I had a problem with one of them without opening Kani first. Also there is a chance that it’s already visible on my screen in context sentences are closed. If necessary I can go to less than 100% it that’s not enough.
An additional option of jumping with “1” to the first kanji would be the iceing one the cake. Just a crazy idea :rofl:

Good news everyone! Random/alternating voice actor is back! The drawback of this implementation is that it’s per-item, and not per-answer, so if you have it set to alternate voice actor, it might not always alternate.

2 Likes