Wanikani Override Userscript 1.1.2 ("Ignore Answer" Button) [No longer supported]

legendofleo said... Is it just me or has this userscript stopped working? I'm using it on the latest Firefox with Greasemonkey but whenever I press Ignore Answer nothing happens...
 It worked for me a few minutes ago. Firefox 23.0.1, Greasemonkey 1.12, Script 1.0.4

legendofleo said... Is it just me or has this userscript stopped working? I'm using it on the latest Firefox with Greasemonkey but whenever I press Ignore Answer nothing happens...
 It's working for me on Firefox 24.0 and Greasemonkey 1.12, just tested it. Maybe another Userscript you're using is conflicting with this? Try disabling others Wanikani user scripts and see if you can track down the problem.

Videovillain said... This should be added to the Chrome store, lol.
Since it works perfectly on Tampermonkey and I don't use Chrome myself (I have it installed only for testing this Userscript) there's no real reason to.
On top of that, I'm a very lazy person ;)

Is there a possibility to overwrite “correctly” answered items, too? Sometimes I type in the wrong answer accidentally but WaniKani still accepts the answer as a right one (direct/indirect for example). In cases like these I would like to overwrite the answer and type in a wrong meaning to fix the SRS. I don’t want these incorrectly answered questions to level up. :confused:

just installed it and tested it out. got some things that i should be burning wrong because of stupid synonyms (flower viewing is wrong? really? pretty sure it doesn’t have to be CHERRY BLOSSOM viewing specific.  I’M HATING ON YOU CRABIGATOR) and thankfully i was testing out this lovely ignore button.

i’m gonna break personal forum rules for this:

THANK YOU!!!


Though, really, after all the strife an add on wouldn’t be needed at this stage of the game :confused:
Arkascha said...I have experienced the same problem but have noticed that if I first click on "need help with the correct answer?" and then hit "ignore answer" button it works just fine. For a moment I actually thought the userscript had been changed so that we would have to at least look at the correct meaning/reading before being able to move on ;)
 I haven't been able to reproduce it myself. It'd really help if you guys could figure out a way to reproduce the problem so I can see if I can manage a fix.

You're both using Firefox 24.0 and Greasemonkey 1.12, right? Any other Wanikani userscripts/add-ons installed? When you click "Ignore Answer", it has no effect at all, right, the red background that indicates a mistake does not turn yellow, and there's no indication of an error (for example, an error popup)?

Next time that happens, after clicking "Ignore Answer" and having it do nothing, could you open the javascript error console (on Firefox it's  Ctrl+Shift+K, and if it's not already selected, enable the "JS" tab) and see what shows up (if anything)?

paku said... Is there a possibility to overwrite "correctly" answered items, too? Sometimes I type in the wrong answer accidentally but WaniKani still accepts the answer as a right one (direct/indirect for example). In cases like these I would like to overwrite the answer and type in a wrong meaning to fix the SRS. I don't want these incorrectly answered questions to level up. :/
You're not the first person to request this, I have already answered why it's not supported way back on page 6:
ruipgpinheiro said... [...]
I looked into allowing users to ignore correct answers, but there's a problem with that. As soon as you answer correctly to both the meaning and reading, the WK server is immediately contacted. This means that ignoring the answer is no longer possible if you're answering the second (as in, you're answering the meaning but have already answered the reading or vice-versa).

It is possible to edit the Wanikani script in order to make it wait until you press enter a second time to skip to the next question instead of auto-submitting, but that'd require a lot of work and would make the script pretty easy to break with the simplest Wanikani update, so it'd require a ton of work to get working at first, and a ton of maintenance later.

I don't think that is an important enough feature to justify all that work and make the script easier to break.
I hope you understand my position, as much as I'd like to add those features, I don't really have enough time to add and maintain them, seeing as they'd break any time Wanikani were updated even slightly.
Sorry to disappoint :(
ruipgpinheiro said...I hope you understand my position, as much as I'd like to add those features, I don't really have enough time to add and maintain them, seeing as they'd break any time Wanikani were updated even slightly.
Sorry to disappoint :(
 Of course I understand your position. Thanks anyways ;)

Hey ruipgpinheiro, with the new user notes, shortcuts need to be removed when the notes are being written. I was writing a note with a question mark in it, and the incorrect answer was overwritten.

nqthqn said... Hey ruipgpinheiro, with the new user notes, shortcuts need to be removed when the notes are being written. I was writing a note with a question mark in it, and the incorrect answer was overwritten.
Right, hadn't thought of that. Thanks for the bug report, it should be a straightforward fix. Still, I'm really (really!) busy until Wednesday, so I doubt I'll be able to fix this before then (I haven't even been doing reviews). Sorry about that!

PS: A question mark? Isn't it supposed to be '~'? Or is your keyboard different and '?' also works?
ruipgpinheiro said...
nqthqn said... Hey ruipgpinheiro, with the new user notes, shortcuts need to be removed when the notes are being written. I was writing a note with a question mark in it, and the incorrect answer was overwritten.
Right, hadn't thought of that. Thanks for the bug report, it should be a straightforward fix. Still, I'm really (really!) busy until Wednesday, so I doubt I'll be able to fix this before then (I haven't even been doing reviews). Sorry about that!

PS: A question mark? Isn't it supposed to be '~'? Or is your keyboard different and '?' also works?
 What does the tilde represent?
As far as I know, I just typed a question mark. Unfortunately, I just now finished my last review for a couple of hours, so I'll have to test it later.

I still want to add a way to “unignore” answers, as I have
accidentally pressed ‘~’ once or twice, but I don’t really have time
right now, so maybe in a week or two. For now, though, here’s a bug fix.

1.0.5 (7 November 2013)
- Ignores ‘~’ hotkey if pressed while editing an item’s notes.
You might be able to automatically update through Greasemonkey/Tampermonkey, if not you can download from the link in the original post.

onepartninja said... OK no problem, thanks for even trying. Others would have just said I was SOL from the jump. I wish I knew enough to troubleshoot myself.
 I just found that, after an hour or two of wondering where the hell my Greasemonkey script's syntax errors had gone to that with the new switch from an "Error Console" to separate "Web Console" (Ctrl+Shift+K) and "Browser Console" (Ctrl+Shift+J), Greasemonkey syntax errors are printed to the latter.

Assuming something similar is the case in Safari, that might be why you couldn't see any errors yet the script would work. So yeah. If you're still up to it, give it a try, maybe you can find the error and I can then fix it!

I’m on a roll today! I’ve just been feeling like programming stuff. I still have ~400 reviews to do, too. Procrastination ftw!

Anyways, here’s my fourth (and last) release for the day:

1.1.0 (24 November 2013)
- Previously ignored answers can be unignored by pressing the ‘Ignore’ button again before skipping to the next question.
- Code cleaned up, added debug functionality and better error logging (like all my other Wanikani scripts)

I’m not 100% sure about the unignore functionality, maybe I’ll end up disabling the hotkey for it (so you need to use the button on the footer) to make it harder to double-press accidentally. What do you guys this? Anyways, there is a way to easily disable unignore functionality, just edit the script source and find the line

var prefAllowUnignore = true;
Change that to
var prefAllowUnignore = false;
And it’ll go back to working as before.


Enjoy!

Can someone tell me how to get the hotkey to work?

… I knew there was still something I wanted to ask.
ruipgpinheiro, do you perhaps know where the ‘~’ hotkey would be on a QWERTZ keyboard?

I tried the key combination
 
to make a tilde on the QWERTZ keyboard but that didn’t activate the “Ignore Answer” function.

I also tried the
button (that’s where the tilde hotkey would be on a QWERTY keyboard) but that doesn’t seem to work either.


You TWERKY my heart Mayu~

Apraxas said... You TWERKY my heart Mayu~
 I see what you did there. :0
Oh, maybe I did not. :( My head made up animations of mayucchi twerking. :(
Juichiro said...
Apraxas said... You TWERKY my heart Mayu~
 I see what you did there. :0
Oh, maybe I did not. :( My head made up animations of mayucchi twerking. :(

Wanikani Override currently looks for the javascript keycodes 176 or 192. According to this page, 192 is mapped on Firefox to both ‘~’ and ‘`’ (“back-tick” or “grave accent”, ASCII 96).

The reason I look for both 176 and 192 is because on Chrome, for some reason, that’s the keycode for tilde (on my keyboard, at least). I’m probably not the only one, since a lot of people were complaining that the hotkey didn’t work on Chrome before update 1.0.4 (when I added 176)

An alternative is to change the keycodes used for the hotkey. I might be able to add a way for users to customize it without looking at the code once I have time, but for now just open the source and go to line 239, you’ll find something like:

switch (event.keyCode) {
     case 176: //Firefox ‘~’
     case 191: //Chrome ‘~’
           event.stopPropagation();
Just add the keycode you want to it, for example if you wanted ‘P’ to be your hotkey (keycode 80), you’d change those lines to:

switch (event.keyCode) {
     case 176: //Firefox ‘~’
     case 191: //Chrome ‘~’
     case 80:
           event.stopPropagation();
You should be able to use this site to look for the key you want (by choosing “keydown” and pressing the key you want on the text edit field at the top of the page), but no guarantees all keys will be supported (I almost guarantee most won’t!) since there’s no exact standard for that and all browsers end up doing it differently…

By the way, the keyboard you posted isn’t the QWERTY keyboard - there are tons of different QWERTY layouts for various countries (the one I use is also one of them, and contains the tilde).

I wanted to give the same advice but I couldn’t find the page with the keycodes. I’m using 45 - that’s Insert on Chrome.

ruipgpinheiro said... Very helpful stuff.
 Cool, thanks for the answer! I will try it out later :3