[Userscript] Reorder Omega

In addition to being able to sort by overdue in ascending or descending order I also include a filter for overdue, which I imagine most people would probably want to use in conjunction with sorting

1 Like

Does this work differently for the extra study page? For what it is worth Self Study seems to work fine the way I am doing it (populating activeQueue with complete data and practiceQueue with ids)

edit: although I have realized that they pick items from the back of practiceQueue and I need to reverse the queue…

I think extra study works exactly the same. The problem with the cache is not that it does not work at all – if an item cannot be found in the cache, it is loaded on demand. But it makes proceeding to the next review maybe a bit slower because the cache is not used.

1 Like

SOLD!

Weird issue. I wanted to test this with a normal review session and it’s filtering down to 10 items with no actions set under the none preset. I’ve disabled all of the other scripts on the review page except WKOF + Additional filters. Is there an option limiting the batches somewhere? If I close out my browser it seems to load the session with all of the reviews I’m supposed to have, but if I refresh the page I can see it reduce the outstanding items after everything loads. I’m an idiot and forgot I had script compatibility mode set.

Will filter first 100 will be cumulative for the day, or will that be for the session?

1 Like

That is strange, indeed. I’ll see if I can reproduce it tomorrow

It’s for the session. I did actually consider making a filter for daily cumulative, but I question how useful that would really be

1 Like

Gotcha, I was just curious. As for my issue I’m stupid and forgot that I had script compatibility mode on since it was making something else work.

3 Likes

Ah, poop! I forgot to account for compatibility mode. I’ll put that on the list for tomorrow. Glad you got it working

3 Likes

@ccookf To be precise if you switch between presets (or change the settings) the filters will re-run and even if you already did some items you could end up with a queue of 100 new items

1 Like

Are there even any scripts left that require compatibility mode? :thinking:


Feature idea: Some way to easily share presets. Creating presets can be a bit complicated, so maybe some users would prefer to use presets made by the community instead of learning how to do it themselves? I’m thinking of encoding the preset into a string that can then be pasted into the forum. This could also be used to make backups of your own presets, or to copy them to another PC.

1 Like

Not sure, but some users might not realize that Reorder Omega isn’t working because of it

That sounds fun! This could also be a nice solution for the issue with space in the settings. I was considering making a separate tab for each page (lessons, reviews, extra study, self study) to save some space, but then you might have to create the same preset multiple time if you want it active on multiple pages. Allowing imports and exports would make it easy to transfer a preset from one page to another

Funnily enough the other day I was considering creating a script that could export and import all WKOF settings. This would also be very useful for the Heatmap, which has plenty of settings which can be tricky to copy over.

2 Likes

I turned it on a few months back since that seemed to keep Ultimate Reorder 2 working.

2 Likes

This is a missed opportunity. Should have named it Reorder OMG.

7 Likes

I hope you decide to do this one. I planned for that capability in WKOF, plus the ability to sync your settings to a server somewhere.

Just a thought… you could have a Copy button and copy it to the keyboard.
I tested the example below on one of my Self-Study presets.

function onclick() {
   navigator.clipboard.writeText(JSON.stringify(wkof.settings.ss_quiz.ipresets[0]));
}

(If you run it in the console, though, it will tell you that the document doesn’t have focus. You can get around that by calling setTimeout() with a few seconds delay, and focus the document before the timer is up).

1 Like

A couple of small issues I’m running into if you wouldn’t mind having a look:

  • The script seems to reorder the items even when the preset is set to none. It all still works, but as it changes the first item ~1/2 a second in it would be nice to avoid that if the preset’s set to none!
  • The preset text doesn’t enjoy combining with Jitai - it jumps up and down when the kanji switch font (because of the slightly different font line heights)
1 Like

I created a pull request that fixes a bug that appears when multiple Freeze & Restores are used. I also included two simplifications, but they are obviously just a matter of taste.

EDIT: I just noticed in your Speed Demon preset that you want sort_by_list() to move items that are not in the list to the end. Too bad that indexOf() returns -1 if it’s not in the list. I updated my pull request and it is still a one-liner, but it’s less clear what it does:

return order.indexOf(a) - order.indexOf(b)

changed to

return (order.indexOf(a) + 1 || order.length + 1) - (order.indexOf(b) + 1 || order.length + 1)

I’m wondering if there is a better way to write this?

1 Like

No idea what’s going on but when I go to reviews, and have ‘None’ selected for my preset, and it filters down to ten, seemingly random, items. If I change the preset, the item I’m on may or may not change, but it always remains at ten.

1 Like

Funnily enough this script is not (yet) compatible with script compatibility mode

I wonder if its somehow triggering ‘wrap up’…

1 Like

I can’t believe I didn’t notice that! Thanks for the fixes!

1 Like

I regret that I have only one like to give.

1 Like