jensechu/kanji — pull request #18 by jensechu (2014-09-16 17:06:20+00:00)
Title: Support Subcategories in Kanji Categories

Now a kanji can have a `subCategory` property which is a string.

When adding kanji to the selection box, it will check if the subCategory already exists in the DOM, if not, it will add it and move on to adding the kanji to that category.

If it the subcategory is already in the DOM it will just move along and add that kanji to the specified subcategory.

Categories can have the same subCategory and kanji will populate the correct subCategory.

In order to get around the fact the WaniKani's API does **not** return kanji in order via level, I wrote a function that takes the user's level and adds that many subCategory elements to the WaniKani category. Then it passes the kanji off to the Kanji selection updater, which sees these subCategories have already been added, and knows to not update the DOM.