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

ruipgpinheiro said...It'd be great if someone else could pick up the script and support it (or write a similar one from scratch), but in case nobody volunteers I would hate to leave you guys without override functionality, so if for some reason the script breaks and there's no fix after a day or so, post something on the script's userscripts.org forum, I'll get e-mailed automatically and before the end of the day should be able to find some time to try and figure out the problem. Probably.
Thank you! Most of this (and KunOn script) is now inside WKN too, so if something breaks the code shared between the two, of course, I'll take care of it. 



Too bad this wasn’t for you :frowning:
Thank you so much for updating this userscript for so long :smiley:
it has been really helpful

s84606 said...
ruipgpinheiro said...It'd be great if someone else could pick up the script and support it (or write a similar one from scratch), but in case nobody volunteers I would hate to leave you guys without override functionality, so if for some reason the script breaks and there's no fix after a day or so, post something on the script's userscripts.org forum, I'll get e-mailed automatically and before the end of the day should be able to find some time to try and figure out the problem. Probably.
Thank you! Most of this (and KunOn script) is now inside WKN too, so if something breaks the code shared between the two, of course, I'll take care of it.
 Thank you! Now I'm much less worried :)

お疲れ様でした。

Strangely enough, it seems to have started working again, haha. Best wishes in your studies!

PS. Any chance you could share your Anki "super"deck? I’ve been trying to use the program for a while to no success.

I’ve been using a heavily modified version of this deck for vocabulary and a random (don’t remember the name) heavily customized kanji deck containing all the most important 2k kanji and heisig keywords. I then wrote a python script to suspend all kanji that aren’t on the JLPT and sorted the deck according to stroke count. Whenever a new Kanji appears, I search the book Key to Kanji and the internet for good mnemonics for the meaning (mainly etymological ones, as I find real mnemonics, even if slightly harder to memorize at first, are more of the sort of thing my brain likes, where the Kanji actually starts making sense historically), or make my own. I also cross-check with jisho for multiple meanings. I use the Anki Stroke Order add-on to add stroke order diagrams for all Kanji.

I have 2 card types on the Kanji deck - one where it gives me the kanji and I must remember all keywords, and one where it gives me all the keywords and I must be able to draw the Kanji with the correct stroke order. Writing the Kanji down is the key for me, the muscle memory really makes me remember the Kanji easier.

The vocab deck has 2 card types, too. The first one shows me the vocabulary using Kanji only (or hiragana/katakana when it’s a non-Kanji vocab), and I’m supposed to know the reading and meaning. The second one gives me the Meaning, and I’m supposed to know how to write the vocabulary and the reading.
I use a custom-built python script to un-suspend only vocab from the vocab deck that use only Kanji that I’ve already matured in the Kanji deck.

I don’t think me sharing the exact decks will help you, though, since they have tons of side-notes and a few mnemonics in my native language. The scripts are also so badly coded (since I never planned to release them, I really just programmed them as fast as possible to get it over with) that anything is enough to get them to break (for example, different deck/card names) so they probably won’t be very useful for others.

That’s basically it, hope it helps.

Link to a mirror someone? Would really appreciate it. Thank you :slight_smile:

https://greasyfork.org/scripts/701-wanikani-override Found a mirror for you, babaleh. Enjoy!

I found that the hotkey (~) to activate this didn’t work for me. If I clicked the button it works, but no bueno for the hotkey. I tried to have a look round in the code to see if I could figure out what was wrong. I have pretty much zero idea what I’m doing in this regards so take the following with a grain of salt but it seems to work for me.

First find out what keycode (~) is using. For example on linux using Firefox Nightly I had to change it to 192. You can use http://jsbin.com/ojoku3. to find out which number you need. Then you can verify that the correct code is being checked for around line 252~ (depending on which browser you’re using).

With that out of the way I was still receiving an type error stating that event.stopPropagation() and event.preventDefault aren’t functions. I tried to look around a bit using google and checking out the function definitions but I couldn’t get it to work. It seemed like it should work to me, but it didn’t.  For some reason event was of type keydown.

However I found http://stackoverflow.com/questions/1357118/event-preventdefault-vs-return-false/1357151#1357151 which states that when using jQuery event handlers return false is effectively the same as calling both e.preventDefault and e.stopPropagation on the passed jQuery.Event object. So I removed lines 254 and 255. After that it appears to work fine. I’m still mystified as to why it doesn’t work for me in its original form but I don’t understand enough (or anything) about this sort of stuff to know.

TL;DR remove lines 254, 255 to make hotkey work? use at your own risk.




Since today gives me, both in HTTP and HTTPS sessions.

WKO Error: Error
    Message: Permission denied to access property ‘handler’

I fixed this issue for me here:
https://gist.github.com/Beanow/9ea55a4d73d6156f01c9
Only tested on Firefox 31.0a2 (Linux x64; Aurora)

Beanow said... I fixed this issue for me here:
https://gist.github.com/Beanow/9ea55a4d73d6156f01c9
Only tested on Firefox 31.0a2 (Linux x64; Aurora)
 I had the same issue about a week ago. Coincidently with the same browser version and on the same OS. I found https://blog.mozilla.org/addons/2014/04/10/changes-to-unsafewindow-for-the-add-on-sdk/ which seemed to explain the error you posted above.

I see in your fixed version you've used the new methods discussed in that post. I instead used http://wiki.greasespot.net/@grant#Compatibility_Layer to fix it as I didn't understand how to implement what the article was talking about.

However I think yours is the better fix so I will switch over now! Thank you for your fix! Also thanks for your HTTPS everywhere ruleset, making good use of that to stop wanikani randomly not enforcing HTTPS.


Thanks Beanow :slight_smile:

quiv said.However I think yours is the better fix so I will switch over now! Thank you for your fix! Also thanks for your HTTPS everywhere ruleset, making good use of that to stop wanikani randomly not enforcing HTTPS.
Nice to know you're using them :]

Windows 7 Pro, Chrome Dev (38.0.2101.0 dev-m)

Currently generating the following error from Beanow update:
Uncaught ReferenceError: exportFunction is not defined

In chrome stack trace, 

  • script.js:248 (anonymous function)
When I open it up in dev tools, at line 248 it says:
Uncaught ReferenceError: exportFunction is not defined

Gizmotech said... Windows 7 Pro, Chrome Dev (38.0.2101.0 dev-m)

Currently generating the following error from Beanow update:
Uncaught ReferenceError: exportFunction is not defined

In chrome stack trace, 
  • script.js:248 (anonymous function)
When I open it up in dev tools, at line 248 it says:
Uncaught ReferenceError: exportFunction is not defined
 Hmm, that makes sense since the changes apply to firefox's add-on sandboxing. Let me see if I can add a fallback method for you.

I’m getting this on Firefox 34.0a1 (Nightly)

WKO Error: TypeError
    Message: $.jStorage is undefined
    Stack: WKO_ignoreAnswer@file:///C:/Users//AppData/Roaming/Mozilla/Firefox/Profiles//gm_scripts/Wanikani_Override/wko.user.js:153:7
onclick@https://www.wanikani.com/review/session:1:1

I tried tinkering around with the code for a while but I’m clueless with userscripts. @require-ing jStorage doesn’t seem to do anything but make the userscript not load.

This is using Beanow’s version.

Anyone else finding the orignal greasemonkey script unresponsive? The ignore button still exists but I get nothing when I attempt to click it.  I’m using vanilla firefox latest version on Windows 7 Pro.   Is the original version officially dead? Is Beannow’s the best workaround?  If so how do I go about using it?  I have very limited experience working with code - so I apologize for my ignorance, but would I simply have to copy all of Beanow’s code over the existing greasemonkey? 

It stopped working for me on firefox 31.0 on OSX, but Beanow’s version made it work again. Just saved it as user.js file and opened it in a browser I think. Greasemonkey did the rest.

Yes Beanow’s version has worked for me, I didn’t see the “Raw” button there, and so I was trying to figure out how to get the script into like my firefox profile or something.  No need - clicking on that button did the trick.  Thanks!