One of the reasons why I did the item filtering directly in the fetch is to avoid problems with the internal caching that WK does for the next 100(?) items. If I remember correctly, they cache the next 100 items and only replenish the cache when the number of items in the cache drops below… 20 I think? But if I manipulated the queue in jStorage, chances are that the cache will be filled with useless items because they were filtered by my script.
But I haven’t looked at that code in a few months, so maybe they already changed it.
Oh, I remember reading about that, but had forgotten all about it. Perhaps this script is fundamentally flawed, then. I haven’t had any review sessions of that size while testing. All the ids are available in jstorage and it seemed enough to just replace those, but maybe I wasn’t paying enough attention
Maybe we can just ask the WK team to improve their code to correctly handle queue changes. But first I have to check if the code is still the same as I remember.
The WK code has really changed since the last time I looked at it. It is practically unreadable now. I think I found the relevant code at line number 31909 (at least after letting Chromium format the code which otherwise is all in one line):
Z seems to be the cache, and R is probably what was called QUEUE_THRESHOLD in the past – so I think the problem with the cache still exists? It is really hard to tell from this minimized code.
More like “successor”. I’m super glad someone was interested in taking over (or replacing) Reorder.
You can use the code map file to see the original. Add “.map” after the JS file url. Unfortunately, it requires some parsing. I’m not sure what format it uses, or what browser plugins might eliminate the need for parsing. Basically, I remove the unwanted stuff, then just do a search-and-replace:
\n → newline
\t → tab
\" → "
\\ → \
It’s a little bit of a pain, but much nicer to read.
I modeled it on your script, so it should function the same or a similar way. Not sure if your script also sorts underdue items as well, though. I score each item from -1 (just reviewed) to 0 (just due) and up (overdue), so sorting by overdue sorts every item by how due (rather than overdue) they are
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
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.
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?
@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
Are there even any scripts left that require compatibility mode?
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.
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.