[Userscript] Item List Filter (for Self-Study Quiz)

Item List Filter (for Self-Study Quiz)

A filter for creating a list of specific items to quiz on.

:point_right: [ “Item List Filter” script ]

Other things you need:

[ General Script Installation instructions ]
[ Open Framework Installation ]
[ Self-Study Quiz ]


NOTE: When setting up a list of items to quiz on, it is important to understand how these filters work, because they have a slightly non-intuitive behavior:

Suppose you want to quiz on a set of vocabulary. When you enable the [Vocabulary List] and specify your vocab items, it will remove all vocabulary except the ones you specified. (Duh, right?). But… it DOES NOT remove any kanji or radicals from the quiz, so you will still have all kanji and radicals in your quiz unless you also check “Vocabulary” in the [Item Type] filter.

Essentially, the filters do this:

  • Radical List - If the item is a radical and it’s not in the specified list of radicals, remove it.
  • Kanji List - If the item is a kanji and it’s not in the specified list of kanji, remove it.
  • Vocabulary List - If the item is vocabulary and it’s not in the specified list of vocabulary, remove it.

So, suppose you want to quiz yourself on:

  • Vocab: 大きい and 小さい
  • Kanji: 大 and 小
  • Radicals: -none-

Then you would:

  • Enable the [Vocabulary List] filter and add the two vocab words.
  • Enable the [Kanji List] filter and add the two kanji.
  • Enable the [Item Type] filter and check both Kanji and Vocabulary (and leave Radicals unchecked).

The anticipation is palpable!


1 Like

Great script, recommend it to everyone!


A custom implementation of vacation mode, perhaps.

Or a way to keep your review session open when you close the browser.

The possibilities are endless…

Oops… I fixed the link to the script in the top-post.


@rfindley this is a bug report.

I have tested this script with Item Inspector.

The new filter shows in the Item Inspector settings and I can configure it. Item Inspector uses this filter but it seems that there is a bug. Not all items in the list show up in the table. I tried the same configuration with Self-Study Quiz and I have the same bug there too. So it seems to be a problem with the filter itself.

The problematic configuration:

Only the radicals ground and gambler and the kanji 一 are shown in the table or used in a quiz. The other two kanji and the vocabulary items don’t show up.

For testing purposes I find that Item Inspector is more convenient than Self-Study Quiz because it displays all items at once on the dashboard. You can see at a glance if something is missing instead of having to run through a quiz.

I have just started using the Self Study Quiz app and it all works fine except for the audio. I have toggled the speaker icon to the different colours and nothing. I am using Safari on a Mac. Any ideas. Thanks.

First, note that you only get audio on Vocabulary.
Second… just to be 100% sure everything else about your audio is set up correctly, try playing some audio from an item page (such as [here]) by clicking on the speaker icon:


Third, open the Javascript console (you’ll have to google how to do that on Mac since I can never remember the process) and see if any errors related to audio files are reported.

I have looked at the code and found the bug reported in the post I am replying to. The regex handling the white spaces doesn’t do its job. White spaces are breaking the script. If you replace the split_list function with this one it will be OK.

function split_list(str) {return str.trim().replace(/\s*,\s*/g, ',').split(',').filter(function(name) {return (name.length > 0);});}

Just fyi, I saw your message, but it’s going to be about a week before I can look at this.
Thanks for the heads-up!


Maybe this is due to your lack of time but I noticed this script hasn’t been updated on greasyfork with the new split_list() yet.

I had it updated on my PC, but missed pushing the update to Greasyfork. It’s updated now.

1 Like

I confirm. i have the new version on my end. Japanese commas work fine.