WaniKani Improve 2.2.2 — faster and smarter reviews

the last item information can be somewhat fixed: search for “quickview” in the script and delete it, and one of the slashes

it will display the full item details page, including WK header and stuff like that. but at least it’s better than nothing and easy to do.

Thanks for the suggestion! It seems like an insignificant feature, until you answer a question and get it “almost” right. It used to be much easier to work out what the actual answer was by checking that Last Kanji window.

Woah, everyone is supa high level already.

Sorry, I’ve been away from WK, but I decided to make it my 2014 resolution, so I just came back. I started my reviews and noticed that WK Improve broke, and not only that, the “quickview” pages were removed entirely from WK. Without it, it’s bad to auto move to the next question when your answer was a bit off and you want to check it out.

I changed the script to display the item overview page. It fits perfectly the space thanks to WK responsive design, but displays all the information, that ruins the review. I mean, you answered the “kanji reading”, want to go back and check the mnemonic again and will see the “kanji meaning” right on top, impossible not to read.

After doing my reviews with WK Improve, it’s just not the same doing it without it, I am spoiled >:

Soooooo, I lost some time making the script rewrite the item overview page, it will display just what you need to see to not ruin your review. In my humble opinion, is much better than the previous version, since now you can see the item level, see/add/edit notes right there, check the status of the item (next review date, “turtle status”, how many times you missed the meaning/reading/etc). It’s slower because we’re parsing the page (and a lot of times I went with the dirty/easier way instead of properly debugging, can’t waste too much time on this, sorry :x)

Hope it works on all browsers, I’m using Firefox 26, forgot to test on Chrome :smiley:

Will test soon, thank you for making my life easier.

Apraxas said... Will test soon, thank you for making my life easier.
 hahaha you're welcome! Hope it works!

Released the version 2.0, I’ve made a lot of changes. Don’t worry, you can rollback to the previous version if you don’t like it: http://userscripts.org/scripts/version/174135/703814.user.js

This time I tested on Chrome too, everything seems fine.

I changed all variables names, it was a mess: my_var, myVar, my_FavoriteVar. I’m using long variable names to keep the code easy to understand. Now I’m using “wki_” on every element and css classes to avoid conflicts with other scripts. I added it to the variables names, in case anyone writes a script that will grab one of our variables, he will know that he’s getting the right variable.

Liked? Disliked? Suggestions? Fixes? Let me know :slight_smile:

Great! Thanks

As I did with CleverFlow, I have adapted the script to autoplay the audio (when available) before moving to the next item.  The code (now version 2.0.1) can be found here: http://pastebin.com/Szs7a8Dg

By default the audio will not play.  To play the audio, click the audio icon at the top left of the screen (near the home icon).  The audio can be toggled on and off at any time and your preference should be saved.

Psycoder said... As I did with CleverFlow, I have adapted the script to autoplay the audio (when available) before moving to the next item.  The code (now version 2.0.1) can be found here: http://pastebin.com/Szs7a8Dg

By default the audio will not play.  To play the audio, click the audio icon at the top left of the screen (near the home icon).  The audio can be toggled on and off at any time and your preference should be saved.

Awesome changes, Psycoder. Do you mind if I incorporate it in the next release?
Seiji said...
Psycoder said... As I did with CleverFlow, I have adapted the script to autoplay the audio (when available) before moving to the next item.  The code (now version 2.0.1) can be found here: http://pastebin.com/Szs7a8Dg

By default the audio will not play.  To play the audio, click the audio icon at the top left of the screen (near the home icon).  The audio can be toggled on and off at any time and your preference should be saved.

Awesome changes, Psycoder. Do you mind if I incorporate it in the next release?
Feel free!

You might want to double check that I didn't break anything (I'm pretty sure I didn't and I tried to stay with the style of coding you were using but it still was a bit of a quick injection).
Experimental: keep up with the right answers to increase your combo. Try to beat your own high score!
This thing works extremely well to combat over-abusing the "Ignore answer" button that many of us users use. This mainly due to the fact that if you do fail after a fairly OK streak it feels like pushing Ignore would be quite unfair to yourself and even if you would, the streak is still lost and thus makes the button feel less significant than without this script. I would however imagine that this wouldnt really be the case when reviewing current level kanjis and radicals, but it is, non the less, helping in a quite pleasant way.

Apart from this feature this script feels quite polished and really helps making the reviews go quicker than usual.
Good work!

Another thing ive noticed is that if you are like me and try to keep that streak up, thus having your focus on the counter, you kinda forget about the amounts of review you have left which is a very pleasant feel. Especially so if you managed to rack up a few hundres of reviews during the winter vacation.

Psycoder said...
Seiji said...
Psycoder said... As I did with CleverFlow, I have adapted the script to autoplay the audio (when available) before moving to the next item.  The code (now version 2.0.1) can be found here: http://pastebin.com/Szs7a8Dg

By default the audio will not play.  To play the audio, click the audio icon at the top left of the screen (near the home icon).  The audio can be toggled on and off at any time and your preference should be saved.

Awesome changes, Psycoder. Do you mind if I incorporate it in the next release?
Feel free!

You might want to double check that I didn't break anything (I'm pretty sure I didn't and I tried to stay with the style of coding you were using but it still was a bit of a quick injection).
 Awesome. Included on version 2.2. Thanks! :D
misacki said...
Experimental: keep up with the right answers to increase your combo. Try to beat your own high score!
This thing works extremely well to combat over-abusing the "Ignore answer" button that many of us users use. This mainly due to the fact that if you do fail after a fairly OK streak it feels like pushing Ignore would be quite unfair to yourself and even if you would, the streak is still lost and thus makes the button feel less significant than without this script. I would however imagine that this wouldnt really be the case when reviewing current level kanjis and radicals, but it is, non the less, helping in a quite pleasant way.

Apart from this feature this script feels quite polished and really helps making the reviews go quicker than usual.
Good work!

I'm glad to know that you liked and it's being useful :D
Too bad the max score will go away if you clear your browser's cache. Now that I added an interface to the script settings, maybe I can add an optional field to people include their API key, that way I can store the settings and combo record on a remote database, making it easier to restore if you clear you browser's cache.


misacki said... Another thing ive noticed is that if you are like me and try to keep that streak up, thus having your focus on the counter, you kinda forget about the amounts of review you have left which is a very pleasant feel. Especially so if you managed to rack up a few hundres of reviews during the winter vacation.
 I've been away for six months, I guess. Came back on Jan 1st, had 780 reviews in my queue. While I develop WK Improve, I test on my review queue. That's helping me to forget that I have so many reviews. Now that WK Improve is almost finished, I'll focus on my combo record, but I don't think I'll beat my current 33, I already forgot a lot of stuff...  actually  I was surprised when I checked and had over 30 -o-"

I had a few problems with it running the checkAnswer function twice for every answer.  I fixed this in my version with the following changes:

1) Add a new variable:
var wki_ignore_click = false;

2) Modified the moveNext function
function moveNext()
{
    console.log(‘WKI: Moving to next question’);
    wki_ignore_click = true;
    ('#answer-form button').click();<br>&nbsp;&nbsp;&nbsp; wki_ignore_click = false;<br>}<br><br>3) Modified the bind of the submit answer button <br>(‘#answer-form button’).bind(‘click’, function(){
    if (!wki_ignore_click)
    {
        setTimeout(checkAnswer, wki_settings.wki_timer_show_next_item);
    }
});

At least with my browser, it seemed that the programmatic click of the submit answer button was triggering the checkAnswer function after the enter key had already triggered it once.

How do i get back the blue and yellow colouring for previous answers? Mine just flashes with a tick and I hardly ever notice it nowadays.

fractalsonfire said... How do i get back the blue and yellow colouring for previous answers? Mine just flashes with a tick and I hardly ever notice it nowadays.
I believe this is a side effect of the problem I listed above.  Since it is running the function twice, the color and icon are being reset on the second invocation.  If you feel comfortable, try the fix steps I listed (the variable just goes at the top and the two other functions replace the ones that are already there).  If you are not comfortable, I can post the entire modified script in pastebin.
Psycoder said...
fractalsonfire said... How do i get back the blue and yellow colouring for previous answers? Mine just flashes with a tick and I hardly ever notice it nowadays.
I believe this is a side effect of the problem I listed above.  Since it is running the function twice, the color and icon are being reset on the second invocation.  If you feel comfortable, try the fix steps I listed (the variable just goes at the top and the two other functions replace the ones that are already there).  If you are not comfortable, I can post the entire modified script in pastebin.
 Thanks a bunch, it works!

Sorry, didn’t noticed the problem before releasing 2.2, yesterday I started to do my reviews and noticed the problem. I just released a new version with some fixes.

Thanks for helping out, Psycoder :smiley:

Hi Seiji, I think I found a minor bug: if you enter an answer by pushing the “>” button (instead of using the enter key), the prev item info does not work.
I think you can fix it by adding this line to the code below: 

if($(‘#user-response’).val()) {

wki_submitted_answer = $('#user-response').val(); setTimeout(checkAnswer, wki_settings.wki_timer_show_next_item);

}