[Userscript] Wanikani Lesson Tab Transmutation

Ever did lessons and thought “Hmm, something is out of order here… Maybe the tabs?”, then this script is for you!

I’m pleased to announce the latest in WK Alchemy Research Applications: THE LESSON TAB TRANSMUTATION

By default, this script will move the examples tab for kanji. It will now show up as “radicals -> examples -> meaning -> reading”.
But you also have two other options:
For kanji:
  - radical -> reading -> meaning -> examples
  - radical -> examples -> reading -> meaning
For vocab:
  - breakdown -> reading -> meaning


You can change options by changing the var at the top of the script to either true or false.
The default option is

var kanReorderExamplesOption = true; 
All other options work very similar.

  - radical -> reading -> meaning -> examples (kanReorderReadingOption)
  - radical -> examples -> reading -> meaning (kanReorderExamplesReadingOption)
  - breakdown -> reading -> meaning
(vocReorderReadingOption)

New: Settings!
Easily switch options by clicking on the button at the bottom of the lessons page and selecting a new one. Changes might only appear when starting the next lesson though! To get rid of the settings, click anywhere on the faded part of the page…

Features :
- Change the order of lesson tabs for kanji and vocab!
- Easily switch between different options!

If you don’t know how to install/edit user scripts, but really want this piece of alchemical wonder:
 - Visual Guide on How To Install A Userscript: /t/Visual-Guide-on-How-To-Install-A-Userscript/12136/1

How to install:
- Make sure you have the Greasemonkey (Firefox) or Tampermonkey (other browsers) add-on installed, so you can enjoy user scripts.
- Go to https://greasyfork.org/en/scripts/17050-wanikani-lesson-tab-transmutation
- Click the green button
- BOOM, DONE!

Change log:

v1.2
 - added button with settings

v1.1
 - added fourth option for reordering (  radical -> examples -> reading -> meaning )

v1.0
 - initial release

Note: this has been developed and tested with <3 for Firefox. Let me know if other browsers have difficulties.

2 Likes

Great! Gonna install it asap. :slight_smile:

Just tested it in Firefox 43.0.4, works like a charm. Nice code to boot - I am mostly a C++ / Python programmer, but I have no trouble understanding your script. Learned a bit about JS and Grease Monkey in the process. Thank you so much!
 
Do you have a Paypal, Gratipay, or similar account? I have a little something I’d like to send your way. =D

bbucommander said... Just tested it in Firefox 43.0.4, works like a charm. Nice code to boot - I am mostly a C++ / Python programmer, but I have no trouble understanding your script. Learned a bit about JS and Grease Monkey in the process. Thank you so much!
 
Do you have a Paypal, Gratipay, or similar account? I have a little something I'd like to send your way. =D
 I have, but I'd feel a bit uneasy by it. I do this to help others and educate myself. But I greatly appreciate the gesture!

@Mempo,
Great work!  Reordering the tab contents seems to be the key.

I still had my old script (which didn’t work), so I dusted it off and updated it with your discovery.  If you’re interested in comparing notes, I posted it to my greasyfork account as a private script (here).  I was only able to test it on Radicals so far (had to create a Guppy account to even do that).  Anyway, I discovered that you only need to rearrange the tab content once (at page-load), because WK’s javascript uses the <div> IDs to update content.  Also, I noticed that WK’s code triggers ‘listenKeyChange’ twice per lesson change, so I added code to keep it from redrawing the screen twice… not that you could even notice the difference since it happens so fast.

1 Like

v1.1 - silly Mempo adds fourth option combining the first two options for kanji BECAUSE WHY NOT BOTH???

This is pretty cool, Mempo! I’m always jumping ahead to readings of jukugo to check and see if I guessed correctly!

I’m looking forward to the update that makes it easier to rearrange tabs myself/pick the order I like. :smiley: I’ll download and test this tomorrow, I’ve got plenty of new lessons to see how it works! (And whether or not it interacts with my lesson reordering script by xMunch.)

AnimeCanuck said... This is pretty cool, Mempo! I'm always jumping ahead to readings of jukugo to check and see if I guessed correctly!

I'm looking forward to the update that makes it easier to rearrange tabs myself/pick the order I like. :D I'll download and test this tomorrow, I've got plenty of new lessons to see how it works! (And whether or not it interacts with my lesson reordering script by xMunch.)
Don't expect anything fancy like drag-'n-drop though! I was merely thinking about adding another colourful button to the bottom of the page ;p
All the obvious reorderings are already present, so you won't be able to pick new ones yourself. But if you want something wacky like examples -> meaning -> radical -> reading I can put it in for you ;p

And it works fine with lesson reorder scripts.

Switching around meaning and reading is not a good idea since many mnemonics use stories that begin in the meaning tab and continue in the reading tab. If you switch them you face a half done story you don’t understand. 
Putting examples first is nice though. Thanks!

Perfect! I always skip to the reading to see if I get it right on vocabulary, even just to learn how to read it before meaning anyway since I feel using the reading when learning the meaning is better than just using English to learn the meaning,  especially when they use the word in the meaning example.

1 Like
JacobW said... Perfect! I always skip to the reading to see if I get it right on vocabulary, even just to learn how to read it before meaning anyway since I feel using the reading when learning the meaning is better than just using English to learn the meaning,  especially when they use the word in the meaning example.
[reading that 1 sentence super fast]

 ![|250x194](upload://jLAoSBYjInpA3VXWj5Kazab1wL5.gif)

Ok, I think I get it... ;p

Thank you! This is something I do on my own when I’m doing lessons, so this is certainly helpful

Thank you so much! I’ve been looking for a way to reverse the ‘reading’ and ‘meaning’ tabs!

Thanks! I’ve wanted this since starting WK.

It works on Safari as long as I turn off “Wanikani Naia Similar Kanji” Script. If I leave the Similar Kanji script running, then Similar Kanji gets its own tab called “Readings,” the “Meanings” tab is actually readings, the “Readings” tab is Meanings, and there are no Examples.

And a small bug is the title of the “Examples” tab is called “Readings” as well even when the script is working great.

This doesn’t seem to be working- kanji lessons are skipped entirely. Any chance this is still being maintained? Or does anybody know of a similar script?