(Obsolete) [UserScript] WaniKani Double Check

Thank you! A couple of notes/requests though:

  1. Could you make the retry option discussed an actual button? I’m on mobile, and can’t do hotkeys.
  2. I have the auto-play option enabled, and whenever I get a vocab reading right, the sound plays once upon getting it right, and once upon moving to the next item. Is there anyway to fix that?
  3. I’m not sure if there’s anything to do about this part, but the script makes reviewing a bit jerky and not smooth, even when not using the conversion option.

^^^

  1. Will do.
  2. I’ll see if I can find a solution to this one.
  3. Can you describe this in more detail? Also, which step is jerky: the first time you press enter, or the second?
  1. Seems to be only happening on mobile; it’s smooth on pc. The jerkiness happens right after submitting my answer (first enter/submit click).

Couple more things:

  1. When there’s a wait/delay enforced (wrong answer), but you click submit/enter twice in a row, you can’t open the item info panel either by hotkey or by clicking on the more info button.
  2. The SRS change indication (ie, the new SRS category an item is in after answering) doesn’t show up - it only shows up after answering the last item (this was also a problem in the original script, but isn’t a problem in the override script)
1 Like

I’m glad to see you are on the ball here. My life got busy. I went to Japan for my brother’s wedding and met a beautiful English girl. I’ve been so busy with things that aren’t wanikani and can’t maintain my scripts :’(

Heh… I’d choose the girl, too :wink:

I understand. I’m going to have to stop maintaining my scripts soon. I’m doing an overhaul on my scripts for APIv2, and then probably won’t do much past that.

:point_right: [v2.0.1] - Added ‘retype’ button. Changed hotkeys. Fixed delay/item_info bug. Added SRS notices. :point_left:

New feature:

Press <escape> or click ‘retype’ button to retype your answer. (ONLY USE FOR TYPOS!!)

Changed Hotkeys:

Press + to mark as correct.
Press - to mark as incorrect.
Press <escape> to retype answer.

“Mistake Delay” changes:

You can optionally prevent double-taps on the <enter> key to prevent skipping past important info and potential mistakes. There are three configurable options:

  • When you answered wrong (default: enabled)
  • When your answer is slightly off… e.g. a typo (default: disabled) <-- was previously enabled!
  • When an item has multiple meanings (default: disable)

Fixed:

  • Pronunciation audio will no longer play twice (unless you change your answer multiple times)
  • SRS level-ups / level-downs are now displayed normally (i.e. when meaning and reading are both answered).
1 Like

It appears to be broken. The previous script that you gave us stopped working, so I updated, and this is not working either. If I click the buttons, nothing happens.Is this working for anyone else? I’m going on vacation mode because I don’t want to get something wrong and lose six months of progress for not typing something right.

:point_right: [v2.0.2] - Fixed buttons :point_left:

@rfindley
The script seems to break the SRS indicator settings (hidden or shown during review).
I have turned them off, but they are still showing up.

Tested it with only this script active (version 2.0.2)

You probably just need to check if the class is present, the node seems to only get inserted when the setting is on, and not just hidden.

It works now! Thank you!

Ahh, yeah, I noticed the setting is in jStorage automatically. I’ll connect the setting tonight.

1 Like

:point_right: [v2.0.4] - Make SRS popup follow user settings.

(For those that are interested: [ diff ])

[Side note: I’ve noticed that clicking ‘Install’ on a specific version of a script on greasyfork.org causes TamperMonkey (and maybe other script hosts?) to NOT update the script when new versions are released. So, starting with this update, I’m always going to link to the main page of my scripts instead of the specific version.]

3 Likes

Works now, thanks.

I also noticed Tampermonkey not updating scripts automatically, despite the script update setting being set to update each day.

The fix for that, by the way, is to remove the “?version=xxxxx…” from the update url on the script editor page in Tampermonkey. Tampermonkey populates that URL when you install a script for the first time. I haven’t tested if it gets fixed automatically by clicking ‘install’ from the script’s main page.

Is it possible to remove some of the buttons. For example, I never use “Last 10” and “Kana Chart”. Furthermore, I have “Item Marker,” which in V4.0 has 5 buttons. Even if I revert to V3.0 which has 1 button, it is still clunky…

Removal of Wrap-Up, Last 10, Kana Chart’s button will do.

I would (and do) have a separate userstyle for the session page; in that case you would only need to do

#option-wrap-up,
#option-last-items {
    display: none !important;}

I’m sure rfindley has a more elegant solution though.

I successfully did it, but the result is

What should I do with 14.21%?

Ideally, any script that modifies the existing interface should account for other scripts doing the same thing. For that reason, my script counts the number of buttons that were present before it started, and resizes the buttons to account for the ones it adds. If you can configure your other button-modifying scripts to run before mine, mine would normally automatically resize the remaining ones to fill the space… except I didn’t account for one thing: buttons that are present but not visible. So, the changes below will fix that.

Find this line in my script (around line 314):

var btn_count = $('#additional-content ul').children().length + 2;

Replace that with the following two lines:

$('#option-wrap-up, #option-last-items').css('display','none');
var btn_count = $('#additional-content ul').children(':visible').length + 2;

The first line hides the two unwanted buttons (as @Kumirei noted). The second line makes my script only count the visible buttons when deciding what width to use.

2 Likes

Although I created this script; neither this script, nor your code, works with Item Marker. It became like this:

40 PM

@polv,
In the Item Marker script, on line 1367, change this line:

var liCount = $('#additional-content ul').children().size();

to this:

var liCount = $('#additional-content ul').children(':visible').size();
1 Like