Known Bugs: May display information requested on previous item when it is returned after you have moved on, until it “catches up”. (ie, you press ‘f’, the content doesn’t load but you have your answer. you press ‘f’ on the next screen and the previous content loads, then the current content loads.) I’ll introduce some sort of check to fix this, but don’t have the time for it now.
bug-fixes: previous item display should now be impossible. (I think this can occur on stock WK, without any scripts...) for me this only occurred under extreme lag, when you opened the info, gave up, answered the next question, opened the info, then old data showed up because the previous data request completed. now it checks if the requested question is still the current question upon data request completion.
pressing space while waiting for data to load. now things are not re-hidden on data load completion. this bug was the primary reason I started meddling with this script.
fixed a bug in the original version where the data was getting re-requested upon hiding the pending info screen, not just upon displaying. not sure what was causing this, but it doesn't seem to happen in this version.
other changes: added User Synonyms to the waiting screen.
bug-fixes: previous item display should now be impossible. (I think this can occur on stock WK, without any scripts...) for me this only occurred under extreme lag, when you opened the info, gave up, answered the next question, opened the info, then old data showed up because the previous data request completed. now it checks if the requested question is still the current question upon data request completion.
pressing space while waiting for data to load. now things are not re-hidden on data load completion. this bug was the primary reason I started meddling with this script.
fixed a bug in the original version where the data was getting re-requested upon hiding the pending info screen, not just upon displaying. not sure what was causing this, but it doesn't seem to happen in this version.
other changes: added User Synonyms to the waiting screen.
Great, those are all the fixes I was planning on looking at but never bothered to do :P EDIT: It doesn't seem to be working for me though :( I've put a link to your script in the original post, but might still see if I can investigate the issues later anyway.
What part doesn't work? I presume you mean the previous item display bug?
Are you using chrome? And of course did you remember to disable the other version of the script?
I only tested this in firefox so far.
EDIT1: You are right... testing on chrome, it does nothing. Behaves like no script.
EDIT2: Well, found some interesting differences between Chrome and Firefox behavior. For both original and my version, Chrome is calling additionalContent.itemInfo() before the script replaces it, so the original stock WK version is getting registered on the click handler. On your version at the end you call additionalContent.itemInfo() at the end of the script. That makes it work in chrome since otherwise the replacement function would never be called, but it also means that both the original function and the replacement function have registered different click handlers and both are getting called. Adding the additionalContent.itemInfo() to the end of my version gets it sort of working, but then a $("#additional-content-load").hide() is needed as you had in your version because the other click handler is calling $("#additional-content-load").show().
My version also experiences the sending extra requests on hiding bug with these changes. And in chrome the space bar don't re-hide fix is broken by the original function running.
Firefox does NOT call additionalContent.itemInfo() before the userscript replaces it, so there is only the replacement version running. So that is why I did not encounter these problems before.
EDIT3: Try it again on Chrome. I think it is fixed now. Deleted all click handlers for the "#option-item-info" button. This gets rid of the stock WK click handler that was causing problems. Replaced two other necessary handlers that were deleted.
kobayashi said...EDIT3: Try it again on Chrome. I think it is fixed now. Deleted all click handlers for the "#option-item-info" button. This gets rid of the stock WK click handler that was causing problems. Replaced two other necessary handlers that were deleted.
The things you crazy kids get up to while I'm sleeping. #downunder
Consider changing the include to: http*://www.wanikani.com/review/session* It lets it work in both http and https, and in cases when garbage gets attached to the end of the url (?user-response=... etc).
Alright, Done. Seems harmless, maybe useful. I didn’t think anyone could use http anymore. But I tried it in firefox and it does let me use the site in http mode, and half my installed scripts drop out. I vaguely recall it used to redirect to https even in Firefox. Now alternatively my chrome has got some sort of sticky HTTP Strict Transport Security (HSTS) settings that make it always insta-redirect to https. Never had a problem myself with end-of-url extra stuff on WK.
Hey, if either you @Ethan or @kobayashi are still working on this, I just confirmed that after the recent update that this script is what’s messing with how the UI displays user synonyms while doing reviews.
Would it be possible to fix that and push an update?
I’ll do some reviews tonight and let you know! (Been out all day. With many children. So tired. Much knee pain. Ow.)
EDIT: Hey @kobayashi , so unfortunately that didn’t seem to fix the issue.
(You can’t see it well with this example, but it should be one synonym “ku” only.) This is of course assuming that the update was downloaded and installed automatically upon opening my browser, as I’ve had other greasemonkey scripts do. Is the code version of your script at the top of the code? If so I can check it to see if the update happened.
Top of the file should look like below if it’s running the most recent version.
// ==UserScript==
// @name WaniKani Quick Info KT
// @namespace https://www.wanikani.com
// @description Shows available information while waiting for the server response. Originally by Ethan, Modified.
// @version 0.1.4
// @include http*://www.wanikani.com/review/session*
// @run-at document-end
// @grant none
// ==/UserScript==
I tested this version in firefox and it seemed fixed for me.
I’ll try it in chrome later.
Definitely looks like it’s still broken for you.
Hopefully your still running the old version.
The loading animation icon should also be fixed.
I think that’s been broken for quite a while.
I just checked, I was running 0.1.3, so not the latest update. I’ll grab that now, and when I have a few more than 2 reviews, I’ll do them and get back to you. I have a pretty high percentage of synonyms, so if I get at least 10, I should see at least 1 in the mix. Especially since I just added some on my last session for being only slightly wrong.
EDIT: I too am using Firefox. And even after Viet and co. “sped up” the website, info was still usually quite slow, so I decided I’d rather have bad-looking (yet still functioning) synonyms and be able to check the info after getting something wrong, than not.
Hey @kobayashi, I just wanted to let you know I’ve had one item (a radical) with a synonym, and everything popped open quick and easy, and it was there looking perfect.