[Userscript] WaniKani hide mnemonics

I have created a Userscript that allows you to hide the reading and meaning mnemonics on the site. The mnemonics are displayed by default and a link is added that can be clicked that will hide the mnemonic until it is made visible again. If you have added a user note the mnemonic will be automatically hidden.

Current version: 1.8
Download link: http://userscripts-mirror.org/scripts/show/184925
Git hub: https://github.com/nibarius/wkhidem
Known issues: https://github.com/nibarius/wkhidem/issues?state=open
Licence: MIT Licence
Changelog:
1.8: Removed http support, fixed script so it works on radicals that are images, fixed script so it works on learning part of lessons, Got rid of waitForKeyElements in favor for MutationObservers (that is faster script that reacts when changes happens instead of looking for changes on a fixed interval).
1.7: Updated to support the SSL version of WaniKani. Also fixes autohide problems while doing reviews.
1.6: The mnemonic visibility is now updated as soon as a note is added or removed. Also fixes some other auto hide bugs.
1.5: Mnemonics is automatically hidden if there is a user note present.
1.4: Fixed so the script isn’t enabled on locked items with same or lower level than you have.
1.3: Add support for hiding mnemonics when looking up radicals/kanji/vocab on the normal site.
1.2: Add complete support for lessons (it now works outside the quiz).  Also fixes so radicals can be hidden properly.
1.1: Use different localStorage keys for radical/kanji/vocab so they can be hidden individually. Warning items hidden in version 1.0 must be re-hidden after upgrade as the localStorage keys have changed.

So far I’ve only tested in Chrome with Tampermonkey so I have no idea if it works in other setups, but I hope it will.

1 Like

Very cool of you to do that.

I have a perfect way for you to make your own study mnemonics  without any nasty stuff, its called ANKI and its glorious.

(I’ll use this script maybe later when I go for kanji, thanks!)

Apraxas said... I have a perfect way for you to make your own study mnemonics  without any nasty stuff, its called ANKI and its glorious.
 The down side is you're using Anki.
1 Like
Apraxas said... I have a perfect way for you to make your own study mnemonics  without any nasty stuff, its called ANKI and its glorious.

(I'll use this script maybe later when I go for kanji, thanks!)
 I hate Anki with a passion

Thanks :slight_smile:

Is there a straightforward way to have the localStorage content persist across systems? (I’m not a web developer, so I don’t have a good intuition as to the feasibility of simple bits here :))

If I remember correctly, stuff like Firefox sync does sync localStorage, but I could be wrong.

Other than that, or possibly Firefox add-ons that add the functionality (the Chrome add-on engine wouldn’t support it), you’re out of luck.

I mean, you could always just manually copy the localStorage using something like Firebug, send it by some other means (like e-mail), and paste it back onto a different browser session, but that isn’t exactly straightforward.

Updated to version 1.1 where I fixed the problem with storing information for kanjis, radicals and vocabulary using the same key. This means that hiding radical 一 would also hide the kanji and vocabulary 一.

With this update you unfortunately have to manually re-hide items you previously hid with version 1.0

Updated to version 1.2 where hiding mnemonics in all parts of the lessons now finally works. It also fixes problems with hiding radicals as that didn’t really work in the previous versions.

Updated to version 1.3. Now it’s possible to hide mnemonics when looking up vocabulary, kanji and radicals on the main site (that is when not doing lessons or reviews) as well.

If you are looking up items with higher level than you have the script will not be enabled as it is not possible to add user mnemonics or synonyms on locked items.

Of course I found a bug just after I released the previous version. Script updated again so it’s not enabled on locked items with the same or lower level that you have (this may happen if you haven’t done all your lessons yet).

New version released: 1.5

Now the script will automatically hide the official mnemonics if you have any user note present. This means that the script will be much more useful if you use WaniKani on several different computers.

Could someone post a link that explains how to install and use userscripts for WK?

This will be the first one I’m adding as it seems to be a very minor script, and I don’t want to muck things up.

I use Firefox if that matters.

I tried searching for something, but the words are too common to produce any meaningful results.

Aikibujin said... Could someone post a link that explains how to install and use userscripts for WK?

This will be the first one I'm adding as it seems to be a very minor script, and I don't want to muck things up.

I use Firefox if that matters.
 You have to install Tampermonkey/Greasemonkey and after that simply download and install the script from the link posted in the OP.

From the bits I have read it seems Tampermonkey is for chrome. Is Greasemonkey the FF equivalent?

Aikibujin said... From the bits I have read it seems Tampermonkey is for chrome. Is Greasemonkey the FF equivalent?
 Yeah :)

Starts looking stuff up

Thankee-sai. :slight_smile:

Alright. Think I’m ready to do this. Let’s see how I go…

Success!

Does the monkey dance

I’ve released version 1.6 with some bugfixes to the “auto hide when note is present” feature.  The script now also automatically update the visibility of the mnemonics as soon as a note is added/removed. 

Does it auto-update or do we need to reinstall?