[Userscript] Wanikani Item Inspector

Version 1.23.0 is out - Download at the link in the top post.

The version adds support of comma separators for Item List Export.

@Akashelia here is the procedure I promised you. It is long because a) I provide you options and this takes space and b) this is touching several of the more advanced features of Item Inspector and I explained in details what they are for and why you need them. Fear not, most of the steps are one time configuration steps. You won’t need to redo them every time you use Item Inspector.

I assume you run Windows. If not you will need to adapt some Windows specific steps to your Mac or Linux.

Overview of Tables

It helps if you know the concept of tables as implemented in Item Inspector. Here is an overview.

A table is a list of items displayed on the Wanikani dashboard. If you move the mouse over an item a popup displays some information about the item. For example Item Inspector provides several tables by default. You can choose which table you display with the table selector dropdown on the left hand side of the Item Inspector toolbar.

selector

Tables a designed to support studying. You can go over your items and recite meaning and reading aloud. Then you move the mouse over the item to reveal the answer in the popup. On you can study them in Self Study Quiz by clicking one of the two Self-Study buttons.

ssquiz

**The Leech Training Simulation Button

You can add similar item to an existing table with the Leech Training Simulation button.

LeechTraining

I suggest you try it on the Failed Last Review table. Perhaps this simple procedure will suit your need.

Important Note: The Leech Training Simulation button freezes the contents of the table. If you do some reviews and fail some of them the Failed Last Review table will not be updated until you unclick the Leech Simulation button. Then the table is updated with recent data and you can click the button again to inject new similar items.

There are settings you can use to customize the effect of the Leech Training Simulation button. You must

  • Go in the Tables tab in the Item Inspector Settings menu
  • Select the Failed Last Review table.
  • Select the Contents tab
  • Scroll all the way down to the Leech Training Emulation section

The second step of selecting the table is important. These settings are specific to each table and you need to customize the table for which you use the button.

TablesSettings
__

LeechTraining

I suggest you experiment with the similarity settings to find out which values work best for you. You can move the mouse over the settings to obtain a help popup that describes the purpose of the setting.

The Explicit List Filter

You have expressed a desire to select the similar items before a session. The Failed Last Review table doesn’t let you do this. Here is another method. It is based on the Explicit List Filter.

A filter is how you select the items that goes in the table. For example the Failed Last Review table uses a filter that selects the items for which you have failed the last review. The Explicit List filter requires to type in the items you want in the table and display exactly these items.

The explicit list filter is an optional filter which means it doesn’t show up in the settings unless you expressly indicate that you want it. Here is the procedure.

  • Go to the settings tab of the Item Inspector settings.
  • Scroll down until you find the Optional Filter settings
  • Select the KanjiDic2/Traditional Radicals option
  • Click on the Save button
  • Refresh your browser - The Optional filters won’t show up until you do.

Settings
__

OptionalFilters

To activate your filter you need to create a table for it.

  • Go to the Tables tab of the Item Inspector Settings menu
  • Click on the new button – This will create a new table named
  • Type in “Explicit List” in the Edit Table Name field and press enter to give the table a significant name

Add New Table

  • Select the Filter tab while the Explicit List table is selected. This will show a list of filters you can use. The Explicit List filter is the one before last all the way down the list.

filters

__

filters2

By default the filters are disabled. To enable then you click on the checkbox just before the filter name. This ungrey the filter text and show up a user interface widget to configure your filter.

filter

To configure the filter click on the button. The User Interface for the filter will show up.

You should see four text areas for radicals, kanji etc. You can type in the items you need in Japanese (Kanji, hiragana etc) with an IME. You also have the possibility to export your data to a file and recover the data from that file at a later time.

Next Step

This is a lot of material for now. I have in reserve a procedure to export items from a table into the explicit list filter but I won’t post it here for now. If you want it ask for it and I will give it to you.

1 Like

Thank you so much @prouleau !!
I was close to get it work when I tried I can see, I had made a new table but didn’t know how to add data to it! So now I’m going through your instructions for The Explicit List Filter step by step. I am on Windows indeed. But when I get to the step to open the Explicit List, I get an error when I click the button and the UI doesn’t show.
It’s this step:

The error:

(index):6 Uncaught TypeError: Cannot read properties of undefined (reading 'active_ipreset')
    at eval (eval at get_value (www.wanikani.com/:290:48), <anonymous>:1:29)
    at get_value (<anonymous>:290:48)
    at pe.Event.explicitListDialog (<anonymous>:1711:63)
    at setting_button_clicked (<anonymous>:338:19)
    at HTMLButtonElement.dispatch (application-71d56d2bca6058364c27dc2a55fd7b25845232fe935e0e17679a621e8fc484fe.js:2:21485)
    at g.handle (application-71d56d2bca6058364c27dc2a55fd7b25845232fe935e0e17679a621e8fc484fe.js:2:18179)
    at HTMLButtonElement.nrWrapper ((index):6:29851)

Any idea?

1 Like

It sounds like something is not initialized properly. If my assumption is right either the table or the filter is not saved in the settings. I mean if you go look at your settings one of these elements is missing.

Let’s try this:

  • Go to Item inspector settings
  • Select your explicit list table - If the table doesn’t show create it again
  • Verify that your Explicit List filter is still enabled (the checkbox is clicked) - if not enable it
  • Save your settings - This should initialize stuff properly.

Now retry clicking on the button and let me know if it worked.

1 Like

Everything looks as you described but the error is still here.




However I have two tables on my dashboard, could that be a hint to what the issue is?

1 Like

There should be only one table on the dashboard. If there are two it means Item Inspector is loading twice. The settings of the two instances will conflict and unpredictable things will happen. We should fix that before going further.

I don’t know why Item Inspector is loading twice. Do yo see strange things in the Tampermonkey dashboard? Like having Item Inspector defined twice?

1 Like

I think it looks okay?

Here's how it looks:

1 Like

The additional filters script should be at no 2 position just after the open framework. But I don’t think this causes the problem.

If you disable Item Inspector what happens? Does both tables disappear or only one of them?

1 Like

I recall having seen someone else with the same problem on installing Item Inspector twice. This was caused by some corruption of Tampermonkey data. Here is the problem report. Scroll down for the solution.

This problem could cause the click problem with Explicit List. I expect it to go away if we fix the two tables problem.

1 Like

Hurrah, I got it fixed :smiley:
I disabled all the scripts, turn on only the Item Inspector and then turned on one by one the other scripts that it needed. Now I can open the UI for the Explicit list and set it up. It works great! I have found how to add radicals, kanji and vocabs and how to self study it. It’s perfect!!
However I couldn’t get the import to work?
For example I export this file with the “Download Configured Items” button:

file

radicals
ground
kanji
䜕,今
vocabulary
今,ć‡șる
traditional radicals
fire

Then I choose the file, and click on “Click” next to “Set Items From Selected File”, but nothing happens, no error either. Do you know what can be the reason?

1 Like

Great. I am glad to know you got it fixed.

For the import I am stumped. I can’t reproduce your symptoms on my computer. Everything works fine here.

The only thing I can think of is this: Did you modify the contents of the filter before doing the import? Because if you import content that is identical to what is already in the filter you will see no apparent effect because it will just write over identical contents.

Also what do you see in the Javascript console?

1 Like

Seems like it’s something like that happening. The weird thing is that if I change only some words it doesn’t work, but if I change all the words the import works fine. I’ll test a bit more tomorrow and let know when I have narrowed down the issue :slight_smile: thanks again!

1 Like

I have made some test. For me if I change only some words the import will revert them to how they were before the change, The words I didn’t change stay the same because they are written over with identical data,

1 Like

Works pretty well here, too, I can’t complain! Thanks for the support :smiley:

1 Like

I have in reserve a procedure to export items from a table into the explicit list filter. Do you want it? I will post it if you ask for it.

1 Like

Yes please, I want it :smiley:

1 Like

Here is the promised procedure.

  • First you must make sure you have Item Inspector version 1.23.0, the latest. The version of scripts is displayed in the Tampermonkey dashboard.

  • In the Settings tab go to the Items Export Options. Make sure the Comma Separated checkbox is checked. This is required because the Explicit List filter wants items to be separated by commas.

CommaSeparated

Then you create a table called PreSelection or whatever name you like. This table is used to selects the items you want to bring in the Explicit List filter.

Then you need to setup filters to match which items you want to export. For the sake of making an example I will export all kanji and vocabulary that have been learned at the current level. This requires two exports. One for the kanji and one for the vocabulary. The reason is that the Explicit list filter can’t tell kanji apart from vocabulary unless they are typed in separate text area. You will need one export for each text area.

  • Make sure you select the PreSelection table.
  • Enable the Item Type filter. Select the Kanji item type.
  • Enable the Level filter. Type in +0. A value of zero preceded by a + sign always refers to you current level no matter which level it is. Then you don’t need to change the filter when you level up.
  • Enable the SRS Level filter. Click on all SRS levels except Unlocked and Initiate. This will select all items which have been learned, That excludes locks items and those items that are unlocked but their lesson has not been taken yet.

Enabling multiple filters requires an item to pass all filters to be displayed. This collection of filters will select (1) all kanji (2) of the current level (3) that have been learned. This is only an example of what you can do. Feel free to explore the filters available.

filters1
filters2

  • Save your settings and exit the settings menu
  • On the Item Inspector toolbar click on the Export Items button, the one with a cloud icon.

export

  • Three buttons are dropping down the toolbar. Click on Download.

export2

  • Open the downloaded file in Notepad.

  • Copy and Paste the items in the Explicit List filter. You have the choice of copying the whole thing or copying a small set of items to keep the size of your studies manageable. Then you may copy paste another set of items the next day and so on so forth.

  • To copy vocabulary items change the Item Type filter select to vocabulary and repeat the export part of the procedure.

Of course you may export radicals as well, but for your purpose there is no point because there is no visually similar data for radicals.

1 Like

Wow thanks a lot! I love following those procedures, I really learn a lot about what the Item Inspector can do.
Pretty cool with the level options too.
You should consider copying those procedure in the first post or link to them? Probably very useful for other than me too.

And now, it wouldn’t really be me posting if I wasn’t saying that something is off again :wink:
So here it is. I applied the filters as you mentionned (I upgraded first to version 1.23 and refreshed and restarted the browser), but the result items are not the kanjis of my current level (13):

Any idea why?

1 Like

I made an error in the procedure. You should use +0 for the current level. A plain 0 without the + sign won’t do. Sorry about that.

1 Like

Ah, mystery solved, thanks:D

1 Like