[Extension] FuriKani. An extension for a better reading experience

FuriKani

This is a chrome extension that automatically removes furigana from websites based on your WaniKani level.

Chances are that if you’re learning Japanese you might use resources like NHK Easy Web to improve reading comprehension, and because you use WaniKani you turn furigana off. But if you are like me you might get frustrated from having to look up the pronounciation of unknown words, so ideally you’d want to remove furigana from vocabulary you know, and leave them for Kanji you’ve never seen before. This is exactly what this browser extension does.

By doing this you hopefully strike a balance between being forced to recall vocabulary from memory and being able to read words you don’t know at all.


Installation

Download it from the Chrome Web Store

Download it from the Firefox Add-On Store


How to use

Click the extension icon in your extension bar and enter a WaniKani API Token into the field, and click the checkmark on the right. This will set the token and download the necessary data from WaniKani. If you don’t know where your token is, read the following section.

You are presented with the following dashboard

dashboard_small

The extension uses your vocabulary and kanji list from WaniKani to decide if it needs to remove a furigana. You can toggle the usage of either list (or both lists). The reason I’m not just using the vocabulary list is because that wasn’t nearly aggressive enough. Words that consist of kanji and kana didn’t get filtered at all, so by including your known kanji in the filter that should hopefully be fixed.


Where is my WaniKani API token?

You can create a token by logging into WaniKani, clicking your profile icon and navigating to Settings > API Tokens.

Here you click “Generate a new token” and give it a name.

Do not select any of the checkboxes on this page

The extension will still work if you do, but it poses a security risk. Depending on which checkboxes you select, people who have your token can modify your WaniKani reviews. If you don’t select any checkbox a read-only token will be created.

Your API token will not be stored externally. After entering it into the extension it will be stored locally in your browser and will no be visible anywhere.


What does it do exactly?

The extension downloads a list of vocabulary and kanji from WaniKani depending on your level. It will fetch all subjects that are below your user level. So if you are level 4, then it will download the subjects for levels 1, 2 and 3.

Whenever you load a webpage it will grab all <ruby> tags. These are the ones responsible for displaing furigana. It extracts the kanji in the tag and if it can find the word in its internal list, it will add a custom class to the furigana, which is styled to make it invisble.

The cached data is synced everytime you start your browser (in a non-bandwidth-demanding way, keep reading)


Complying with WaniKani API best practices

In order to not send needlessly many requests to the WaniKani API, all data is cached locally. The only scenario where requests are made is when you start your browser or manually request a sync.

When a sync is performed, the extension will fetch user data from the API and do two things:

  • Check if the users level is within the users max allowed level. This is to respect WaniKani subscription restrictions.

  • Check if the users level is different from the locally stored level

If any of the two conditions above are not met, then the sync ends here; no further requests are made.

If both conditions are met, then the extension will request the missing data from WaniKani in case of a level-up. However if the user reset his level, then the data is re-downloaded and re-cached completely.

In short: heavy, bandwidth-extensive requests are only made when the user leveled up or down.


Does this extension collect data?

No. The only web requests made by this extensions are the ones to the WaniKani API. Everything is stored locally on your machine. No data is sent anywhere else.


Support

The source code can be found here

Any help with making the extension work or look better is greatly appreciated. I’m a programmer, not a web designer but I think I did a pretty good job on the extension.

This is also my first web extension and my first proper JavaScipt project. Please submit issues and pull requests to make the extension work better.

The extension is licensed under GPL3, meaning that you can download, use and modify the extension however you want. You can also redistribute this extension with any modifications you made to it.

13 Likes

So the extension removed itself? :wink:

In seriousness, it’s a great thing to see an open-source project released!

2 Likes

Good catch, fixed it :smile:

And yes! I love open-source because people can look at the software and learn from it, and most importantly people who are better at coding than me can fix my mistakes. It’s a win-win! Just do whatever you want with the software ^^

3 Likes

Installed your extension on my browser (Microsoft Edge, so it will be interesting to see if there are any incompatibilities), and I’m excited to start using it. I already jumped over to NHK easy and it’s making me very happy. I’m only level 7 so I still had the furigana on (oops) and seeing it disappear for the kanji I’m supposed to know is a bit of magic.
Already I can see it will help with

  • finding sentences quickly to practice with
  • gaining mastery over vocabulary
  • finding nuances of vocabulary use that I may not have remembered or encountered in the WaniKani lessons
  • giving me courage to visit these sites more often.
    My brain is not equipped to easily separate all the kanji I’m supposed to know vs the (at this point) large unknown set. So thank you thank you!

what websites do you recommend for reading? Most of news articles in japanese are paid.

I only use nhk easy news with the nhk easy practice script already.

It would be nice to have a Firefox port.
I tried to simply import it as it is but was unable to do so. Firefox doesn’t support manifest v3 so far, and service_worker is not working in v2 for me. Although I have no experience in doing anything with browser addons at all, it’s all unknown territories for me.

If you just want to dabble with it, you could use the Waterfox browser (a fork of Firefox)

I started reading articles off of MATCHA - やさしい日本語 (matcha-jp.com) as well.

I expected this would happen someday. Guess I’ll get to work then :slight_smile:

1 Like

I finished porting the extension to Firefox and submitted it to the add-on store for review. I expect it to be available here in 1-3 days :slight_smile:

1 Like

Glad to hear you like it :smile: I relate to the “courage to visit those sites more often”. The amount of articles I’ve read since I wrote this thing has skyrocketed, and I feel a lot more confident in my vocabulary. I don’t think there should be any issues with Edge since it’s just a chrome browser. But if you notice anything weird feel free to report it to me either here or on GitHub!

3 Likes