Wanikani Reorder Ultimate [old version, not working]

Lol, I just realize…  while I did fix the ‘max stack depth’ issue… but it seems to only sort the first item, then the next item it’s totally random.

So yeah, still some issues apparently. :slight_smile:

rfindley said... Lol, I just realize...  while I did fix the 'max stack depth' issue... but it seems to only sort the first item, then the next item it's totally random.

So yeah, still some issues apparently. :-)
 Yeah.  That's why I overrode the random function because WK utilizes the random function to choose the next item.  I'll figure something out soon.

Thank you for your reply, ill try to look here for a fix

rushkharg said... I got an other problem. If i click on "forece reorder" or on the scale the ordering works quite fine, but after entering an answer it just resets to random and i habe the click on the scale manually. I use firefox and i even deactivated all scripts apart from this one and it still happens. Thank you guys in advance
</blockquote>&nbsp;Yeah it doesn't stay sorted for some reason.
Confucius said...
rushkharg said... I got an other problem. If i click on "forece reorder" or on the scale the ordering works quite fine, but after entering an answer it just resets to random and i habe the click on the scale manually. I use firefox and i even deactivated all scripts apart from this one and it still happens. Thank you guys in advance
</blockquote>&nbsp;Yeah it doesn't stay sorted for some reason.
</blockquote>It's a total hack job, but I came up with a [<a rel="nofollow" target="_blank" href="https://greasyfork.org/en/scripts/19088-wanikani-reorder-ultimate-2">new temporary version</a>] until xMunch comes up with a clean solution. &nbsp;As best I could tell on my test account, it appears to be working now.
rfindley said...
Confucius said...
rushkharg said... I got an other problem. If i click on "forece reorder" or on the scale the ordering works quite fine, but after entering an answer it just resets to random and i habe the click on the scale manually. I use firefox and i even deactivated all scripts apart from this one and it still happens. Thank you guys in advance
</blockquote>&nbsp;Yeah it doesn't stay sorted for some reason.
</blockquote>It's a total hack job, but I came up with a [<a rel="nofollow" target="_blank" href="https://greasyfork.org/en/scripts/19088-wanikani-reorder-ultimate-2">new temporary version</a>] until xMunch comes up with a clean solution. &nbsp;As best I could tell on my test account, it appears to be working now.
</blockquote>&nbsp;I'm still having the same issue with this one, it only shuffles the first item. Hopefully someone else has more luck.

I also ran into problems with the script… 
But thanks to Rfindley’s fix, it runs fine now. 
Thank you Rfindley, you are awesome.

rfindley said...
Confucius said...
rushkharg said... I got an other problem. If i click on "forece reorder" or on the scale the ordering works quite fine, but after entering an answer it just resets to random and i habe the click on the scale manually. I use firefox and i even deactivated all scripts apart from this one and it still happens. Thank you guys in advance
</blockquote>&nbsp;Yeah it doesn't stay sorted for some reason.
</blockquote>It's a total hack job, but I came up with a [<a href="https://greasyfork.org/en/scripts/19088-wanikani-reorder-ultimate-2" target="_blank" rel="nofollow">new temporary version</a>] until xMunch comes up with a clean solution. &nbsp;As best I could tell on my test account, it appears to be working now.
</blockquote>&nbsp;Cleaned everything. But still having the issue with only the first one sorted, the others random. <br>Settings: <a href="https://i.gyazo.com/fd67b265302fb52be60237d8c1ce6f5b.png" target="_blank" rel="nofollow">https://i.gyazo.com/fd67b265302fb52be60237d8c1ce6f5b.png</a> <br><br>

the new version sadly didnt work. :frowning: but thank you nevertheless

I have a potential fix that appears to work. At least I get more then one Kanji of the same level after each other and order of the kanji is random, too. :smiley:

https://gist.github.com/Ghabry/286aae601d5da133308f9a5892d69a44/raw/6fe810cd3d2b8d0470158e53c4dbe5a849327ce2/wkorder.user.js

I temporarely unhook Math.Random in highestPriorityType and highestPriorityLevel to prevent the recursion from happening (otherwise code is the same as  2.0.21 from xMunch).
Unhooking Math.Random when entering “newRandom” and restoring it before leaving “newRandom” will probably yield the same result (and is a few lines shorter).

(And no idea why the function “not” somehow calls Math.Random o_O)

Ghabry said... I have a potential fix that appears to work. At least I get more then one Kanji of the same level after each other and order of the kanji is random, too. :D

https://gist.githubusercontent.com/Ghabry/286aae601d5da133308f9a5892d69a44/raw/484ed67e0a93d81c41fc1...

I temporarely unhook Math.Random in highestPriorityType and highestPriorityLevel to prevent the recursion from happening (otherwise code is the same as  2.0.21 from xMunch).
Unhooking Math.Random when entering "newRandom" and restoring it before leaving "newRandom" will probably yield the same result (and is a few lines shorter).

(And no idea why the function "not" somehow calls Math.Random o_O)
 Makes sense since viet said they update their jQuery dependencies.  Agree not sure why it would be called, but if that is the case it can be worked around until I feel like doing a rewrite.

Pushed a fix that seems to work.  Just changed .not('.hidden') to use the css selector :not(.hidden).  For finding the reason I thank you :).  Hope this holds out until the rewrite.
xMunch said...  Makes sense since viet said they update their jQuery dependencies.  Agree not sure why it would be called, but if that is the case it can be worked around until I feel like doing a rewrite.
 Yeah, have an idea to make this less dirty. Will maybe find time during the weekend to clean this up. But first have to reduce by queue length ;)

And minor edit. Just renamed my fixed script so it auto installs...
https://gist.github.com/Ghabry/286aae601d5da133308f9a5892d69a44/raw/6fe810cd3d2b8d0470158e53c4dbe5a849327ce2/wkorder.user.js

edit ignore my script, fix was pushed and the solution is quite clean

The 1x1 mode not working is killing me…



At least it still works in the iphone app… Small favors.

Frouzich said... The 1x1 mode not working is killing me...
 Works for me, press "force reorder" after enabling the mode.

Hey, apologies since I’m kind of new to extensions and all so this might be a very obvious fix or something, but I downloaded the extension and have it enabled on my Chrome browser, however it doesn’t seem to be working?  Whenever I try to make it work while doing lessons or such, “Uncaught RefrenceError: jQuery is not defined” appears in the developer console. I’m probably doing something wrong, but I’m clueless on what. Can someone help me? Thank you, and sorry if this question has been asked and answered before. 

ValkyrieM said... Hey, apologies since I'm kind of new to extensions and all so this might be a very obvious fix or something, but I downloaded the extension and have it enabled on my Chrome browser, however it doesn't seem to be working?  Whenever I try to make it work while doing lessons or such, "Uncaught RefrenceError: jQuery is not defined" appears in the developer console. I'm probably doing something wrong, but I'm clueless on what. Can someone help me? Thank you, and sorry if this question has been asked and answered before. 
You'll need to install TamperMonkey plugin for Chrome first.  It's a script manager.
Without TamperMonkey, scripts install as Chrome extensions.  Some scripts might work that way, but many won't.  Either way, TamperMonkey is a fantastic tool, so it's much preferred.

If the script did install as an extension, you should remove it (chrome://extensions/), so you don't end up with two copies trying to run.

Thank you so much, that fixed it!

I have a sudden problem with this script that after clicking anything in the reorder window (eg removing kanji), I then can’t use arrow keys to move through the lesson pages. There also seems to be a general slowdown on the page (eg when I hover over the reading / meaning tabs it takes half a second for the little triangle to appear). There’s no problem having this script running, it’s only after I click something. Anyone else experiencing this?

I’m using the script for lessons in Chrome.

Is it just me or the script just stopped working?

I’ve been using the script successfully until today but few moments ago I realized that settings panel doesn’t show up anymore, both for reviews and lessons.
I tried to turn off other scripts but it didn’t change anything.
I’m using Firefox 50.1.0 (with Greasemonkey 3.9) on Windows 10 and the latest version of script (2.1.0).

Console output: WKU Init()
Checking for UID updates
Applying UID levels
Review settings: {“sorttypes”:true,“sortlevels”:false,“onebyone”:true,“quickNext”:false,“priority”:{“rad”:1,“kan”:2,“voc”:3},“questionTypeMode”:“1”,“typePriorityMode”:“2”}
 Anyone else having these troubles?

Towe said... Is it just me or the script just stopped working?

I've been using the script successfully until today but few moments ago I realized that settings panel doesn't show up anymore, both for reviews and lessons.
I tried to turn off other scripts but it didn't change anything.
I'm using Firefox 50.1.0 (with Greasemonkey 3.9) on Windows 10 and the latest version of script (2.1.0).

Console output: WKU Init()
Checking for UID updates
Applying UID levels
Review settings: {"sorttypes":true,"sortlevels":false,"onebyone":true,"quickNext":false,"priority":{"rad":1,"kan":2,"voc":3},"questionTypeMode":"1","typePriorityMode":"2"}
 Anyone else having these troubles?
 Nope, It's not working for me either.

It seems like gist github is offline.

EDIT: actually, yeah that seems to be the problem https://status.github.com/

Hopefully it will be working when github comes back online.