[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.

18 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

not working… :frowning: it downloads data from my API but nothing from any site gets changed. I even downloaded a furigana extension to see if that would change but no… what do I do?

It works for me, what browser are you on, Chrome based, or Firefox? I use the extension on both browsers without problem. Could you share a screenshot?

I’ve tried in both and it doesn’t work. I put the correct API and it loaded but whenever I go to any japanese websites there are no furigana

but whenever I go to any japanese websites there are no furigana

I think you either made a typo, or misunderstood this add-on. Furikani REMOVES furigana from websites based on Kanji you already know (by using your WK API key), it doesn’t add furigana.


Furiganize or Furigana on the Firefox add-on store might be what you’re looking for, although I’ve never used furigana add-ons.

Chrome probably has plenty too.

Does the extension still work? I used it a couple of months ago on Firefox but now it doesn’t seem to work. Also it cannot be installed through Chrome anymore, probably due to the change from Chrome Manifest V2 to V3

Hi, I’m the dev.

I pushed an update a couple weeks ago which fixed an issue with non-static websites. I thought it worked pretty well but if you have issues could you elaborate further on whats not working?

Regarding chrome: I can definitely install it (using Vivaldi, I don’t know about Google Chrome), but there might be some Manifest v3 shenanigans going on preventing it from working on Google Chrome. I tried migrating to v3 but that caused issues with the firefox version, and I don’t want to maintain two separate versions of the extension.

I strongly discourage people from using Google Chrome anyways.

1 Like

Hey, unfortunately no furigana is being removed at all. I’ve tried multiple websites but it doesn’t seem like any furigana for kanji that I’ve already passed are being removed. However, it does seem like the connection with the token still works, because the add-on recognizes that I’m level 10. I also tried installing it on Edge, which still runs on Chromium v2 apparently. Also tried it on the Zen Browser, which is a fork of Firefox. On both of these browsers it also doesn’t seem to work. Thanks for maintaining this awesome add-on though, I hope I can get it running again somehow :smiley:

Edit:
An example website I’ve tried is 米の値段 東京では去年より90%ぐらい上がった | NHKやさしいことばニュース | NEWS WEB EASY, where the furigana for words like 米、上がる、色、物、今、高い etc. should be removed according to my level

I reviewed the issue and found the problem. A new version with the fix (0.7.2) should be released soon.

3 Likes

Is the front page formatted differently since it doesn’t seem to work there? (articles seem to work at least)