[Userscript] Prevent "Your answer was a bit off" answers from being accepted a.k.a. "Close But No Cigar"

:warning: This is a third-party script/app and is not created by the WaniKani team. By using this, you understand that it can stop working at any time or be discontinued indefinitely.

Important: Please ensure that you have installed 0.10.0 or later. Older versions of this script may not work with WaniKani in its current form, particularly during lessons.

I wrote a script to stop the automatic acceptance of close answers.

If an answer is close it asks for it again (it basically re-purposes the built in on-yomi/kun-yomi functionality).

Mainly because WK was saying I was right when entering passive verbs instead of active ones and ‘typos’ that were really just similar words with different meanings.


Get your mitts on it here:
https://greasyfork.org/en/scripts/7478-wk-but-no-cigar

Screenshot:


22 Likes

Update: Doesn’t work in lessons, only reviews.

I may change this in the future, but until I have a look at it, I don’t know.

Edit: works in lessons now

3 Likes

Very usefull! Thanks.

1 Like

I’m not sure how this is useful, but I’m going to install it. If anyone has any examples they’d like to share, let me know!

if  you want to be honest with yourself you might use it 

I’m only level 5 but sometimes I screwed up and got it right anyway because of the acceptance

1 Like

There are items where you can get the item flat wrong and have it accept i.e. put in to import on to export 輸出する

1 Like

wow thanks

1 Like

  

3 Likes
tetraflu0ride said... I'm not sure how this is useful, but I'm going to install it. If anyone has any examples they'd like to share, let me know!

 well i have made this mistake (人) person i put as people so I'm ASSUMING that it would accept it too since person~people

thank, you i needed this. i’ve already used it once, too! i’m a sloppy typer…

1 Like

Oh man I needed this as well. I was wondering why there were two “ice” kanjis…it was accepting “ice” for “rice” :confused:

2 Likes
Subtractem said... Oh man I needed this as well. I was wondering why there were two "ice" kanjis...it was accepting "ice" for "rice" :/

That's hilarious!
Eating ice for dinner? Throwing ice at weddings?

Glad you find it useful.

Since I named it after that saying I keep imagining the crabigator trying to hand out cigars and myself slapping them out of his claws.

“No!”

Every party needs a pooper. :stuck_out_tongue:

2 Likes

bug to report. if you accidently try to enter an incorrectly spelled answer twice, this shows up



and then, the “did you know this item has multiple possible readings” thing sticks around until i do the next item.

ShotgunLagoon said... bug to report. if you accidently try to enter an incorrectly spelled answer twice, this shows up



and then, the “did you know this item has multiple possible readings” thing sticks around until i do the next item.


 I was aware of this, but it was a cosmetic problem that I figured I would fix later when I had time to learn about mutation observers.
That time is now. 0.5 uses the recommended mutation observers, rather than the depreciated mutation events, which seemed to have problems capturing the exception and changing the text (from “WaniKani is looking for…”).

I even cleaned up the lingering notices, however note that this part is a bug in the website, not my script. Enter the unwanted reading on a Kanji review multiple times (spam the enter key) and you will observe the same effect.

Technical explanation:
When WK adds a div with id=“answer-exception” (“WK is looking for…” and “Did you know this item…”), it does so without checking if there is already one with that id on the page, it only removes one of the these divs at a time (probably with getElementById or querySelector) under certain circumstances which include (but may not be limited to) opening the item info window, and moving the next review. Do one of these enough times (spam the ‘F’ key), and the divs with that id will eventually all be removed.

1 Like
:P

            var highLanders = document.querySelectorAll("#answer-exception");
            if (highLanders.length > 1){ // There can be only one!!!
                for (hL=1; hL<highLanders.length; hL++){
                    highLanders[hL].parentNode.removeChild(highLanders[hL])
                }
            }

I even cleaned up the lingering notices, however note that this part is a bug in the website, not my script. Enter the unwanted reading on a Kanji review multiple times (spam the enter key) and you will observe the same effect.
Send in a patch to Koichi for the multiple divs problem

"Your answer was a bit off" script
I'd really like this to be a native option in WaniKani.

I've been contemplating enhancing the answer matcher with a negative list. (i.e. if it's one of these answers it fails).
But really what I just need is to disallow being close enough.




I’ve been using this and I love it. However, I would make a soft suggestion to match http*:// instead of https. I had to add it locally to mine to get it to work for the most recent session. It seems that the site still isn’t always consistent with its security handling.

Inserio said... I've been using this and I love it. However, I would make a soft suggestion to match http*:// instead of https. I had to add it locally to mine to get it to work for the most recent session. It seems that the site still isn't always consistent with its security handling.
 Noted, will do.

One of my other userscripts was having some sort of trouble (I don't remember) under the http protocol so I wrote in a forced redirect to https. since then I've just been using https.

I'm glad you like it. :)

This sounds great, but could I get some assistance installing the script? Using Firefox I get the following error.

Could not parse script error.
Specifically "Ignoring @ match pattern http*://www.wanikani.com/review/session* because: Error: @ match: Could not parse the pattern., Ignoring @match