Now also affects the recent mistakes extra study mode
Actions registered for wkQueue.on("extraStudy") will now also affect the recent mistakes quiz and the recent mistakes lesson quiz. For now, I decided that Queue Manipulator will not affect the recent mistakes lessons. If there is demand for it, I might reconsider.
I will try to look into adapting this to the WaniKani lesson changes after I come home from work, but it seems that this requires a bigger change, so the fix might take a few days.
The recent update to the lessons page removed the possibility to pass a custom lesson batch through an URL parameter. The workaround modifies the links in the page to replace the queue received from WaniKani with the custom queue.
I just finished writing the code and did not have time for sufficient testing, but I have to go to bed. Due to the seemingly high demand for the lesson fix, I decided to release the untested version. Please let me know of any problems you encounter.
Ahh, I wish I had lessons to test with right now. You’re amazing for getting this done at all, I was at a loss for how to approach fixing this. Thank you so much! I’ll take a look at what you’ve done later and (if I later see it works) see if I can apply that to the way Lesson Filter script works so that one can be fixed too.
I believe queue manipulator does some handling of the classes of the character header, right? I’m seeing a bug where my radicals (during the lesson quiz, not the regular lesson part) are colored as vocabulary because the div with class character-header and attribute data-controller="quiz-header" is getting both the character-header--vocabulary and character-header--radical classes.
Sadly I don’t have any more radicals to test with after writing this message, sorry.
Something must have just changed with the html of the list of items at the bottom of the lesson because their styling gets all messed up by queue manipulator remaking them. The new line for li.innerHTML should be this:
Discovered a slight bug. Probably overlooked because no one really hovers over the little item tiles at the bottom of a lesson to read their title attributes. Anyway, the issue is that the code just gets the first reading from the api but this is not always the primary reading taught. In modifyLessonPageBatch, b.item.data.readings?.[0].reading needs to be changed to b.item.data.readings?.find(r => r.primary).reading.
Updated to hopefully work with the WK lesson picker update
I don’t have time for extensive testing, and the fix is not exactly optimal, but I think it should work…? Also includes the bugfix reported by @LupoMikti in the previous post.
Now that I’m thinking a bit more about it, in the case of lessons started from the lesson picker, Queue Manipulator should probably take the user selected items as the base queue. Currently, it completely disregards the user choice and starts with the queue of all unlearned items, leading to the same behavior as with clicking “Start Lessons” on the dashboard.
When looking at the diff before updating I noticed something else I had fixed but apparently completely forgot to post about here. Using the slug for radical images means the item tile at the bottom will use the text instead of the radical image, making it look broken. So we can instead make use of the component.
But like, probably all on one line like you have it, and maybe some handling for if the src url comes back undefined other than empty string.
Edit: also, since the setting for lesson order has been removed, you might want to look into what the fetchLessonSettings function is returning and modify things to no longer take into account lesson order.
Thank you for your work and time in maintaining this and looking over my suggestions!
There’s something I’ve been wondering about for a while, but why is the line that assigns the html to the list item duplicated (inside modifyLessonPageBatch just before return li;)? Before, it used to be the line was fully duplicated with no difference between the two. I think at some point I suggested the change in structure but only one of the lines got the new structure and the other didn’t; it was the second line so it was reassigning the correct structure. With this update, now the first line has incorrect structure + component fix and the second line has correct structure but no fix for the component, meaning the final assignment does not contain the component fix and we would still see the slug name instead.
Unless there’s a reason for the duplication I’m not seeing, the full line should be
Have been getting the following since the latest update after clicking “Continue with new lessons” and it just stays on this screen. (Using reorder omega and back to back)