I noticed that this doesn’t accept a trailing 'n' if the vocab word ends in a literal 'ん' (it already worked for words ending in kanji because it just uses /.+/ for them). If anyone else wants it, I changed answerChecker.evaluate to:
answerChecker.evaluate = function(e, t) {
var isLesson = /^http.*:\/\/www\.wanikani\.com\/lesson/.test(location.href);
var cI = $.jStorage.get(isLesson ? "l/currentQuizItem" : "currentItem");
var type = $.jStorage.get(isLesson ? "l/questionType" : "questionType");
if (cI.voc !== undefined && type === "reading" && !kanaMatches(cI.voc, t)) {
logMutations();
return { exception: true };
} else {
return oldEvaluate(e, t);
}
}
function kanaMatches(vocab, input) {
return makeRegex(vocab).test(input.replace(/n$/, "ん"));
}
I’m thinking this script could use an override or “submit anyway” function for cases where we legit don’t remember the correct answer. Without it, the script refuses to let me submit my answer, and I have to resort to looking up the correct value to continue, which defeats the purpose of the review. Perhaps if the user presses enter more than once (or twice), the script should let the answer be submitted?
Do you mean if you can’t remember the Kana?
eg. That り is ‘ri’ etc?
It should let you submit anything so long as the kana is correct. You should absolutely be able to get things wrong if you mess up the Kanji. Let me know if that’s not the case.
In my understanding this script only checks the okuriganas, that is kana explicitly present in the vocabulary word. For example in 見る the okurigana is る while み is not an okurigana.
In the example you bring I don’t expect any shake because the word doesn’t contains okurigana.
@prouleau is correct. I don’t see any benefit of second chances on the Kanji, that’s what we’re here to learn. Might as well install Never Wrong at that point.
With okurigana though, the answer is in the question.
This is the script I didn’t know I needed but I probably don’t deserve.
If you are still developing it, a feature like “only warn if the kanji part matches” would be quite nice. I usually just input something random like あ into the input box if I don’t know a word and this would help me be lazy basically.
i don’t know if you still want to maintain this script, but at least for me it’s been broken since the recent WK update. i really like this update because it strikes that sweet spot between “i don’t trust myself with the double-checker” and “that was definitely a typo”
do you think you might have a look at this?
or otherwise, does anybody know of a replacement for this script?
and, i’m really not a coder, but it seemed strange to me that it didn’t even show up in the list, so i looked at the code, and realised that this line doesn’t match up with the url which WK uses for reviews now:
i see that you refer to an url further down, in this line:
var isLesson = /^http.*:\/\/www\.wanikani\.com\/lesson/.test(location.href);
but i am totally out of my depth here.
anyway, i hope this is helpful? and thank you again for your work, WK wouldn’t be the same without all the work you and others put into the userscripts!