I created this script as I like reading news on NHK easy, but I wanted a way to be able hide the furigana for kanji and vocabulary I already know. Currently anything with a Guru I level or higher will have its furigana hidden. It is way to easy for me to read the furigana unintentionally. This script was inspired by the way Bunpro does the same thing for their grammar exercises.
Here is an example with my current WaniKani level:
Userscript Download Location: https://github.com/entropyofchaos/NHK-Easy-Practice-With-WaniKani/raw/main/NhkEasyPracticeWithWaniKani.user.js
I don’t have a GUI yet to set your WaniKani API token, so here are some directions. Please enjoy my skill with Microsoft Paint as to used to create screenshots for you.
If you have trouble or questions, please ask.
Here are some basic instructions to get this script working:
- [ General Script Installation instructions ] You’ll need a script host plugin like TamperMonkey
- [Install the Userscript] This link will install the userscript into your script manager.
[Create a Personal Access Token] Generate a read only Personal Access Token
2.1 The webpage should look something like the image below. Click on the “Generate a new token” button to create your Personal Access Token
2.2. Give your token a description and leave all the checkboxes unchecked. My script just needs to be able to read your stats, I don’t need to change anything.
2.3 Copy the token you created with the description you gave in the previous step. It will be listed under the “Token” header.
Edit User Script With Your Personal Token
3.1 These directions are for TamperMonkey in Chrome for now as this is what I use and tested with. You will need to open the TamperMonkey dashboard by clicking the icon on the top right of your browser. Then click the Dashboard button.
3.2 You should see the following dashboard screen. Click on the edit button which I highlighted in the red box.
3.3 Replace the text put-your-api-token-here with your copied WaniKani token. Make sure to leave the quotation marks.
3.4 Save your changes. You can do this by using “ctrl + s” on the keyboard or clicking “File → Save” on the Tampermonkey dashboard menu.
- [ Open NHK Easy ] It’s time to start reading!
Future Planned Features:
- A user interface to update your WaniKani API Key.
- Be able to click on a vocab word to toggle furigana on and off (same way Bunpro does it).
- A way to cache your data from WaniKani so the script doesn’t have to download all your progress every time you load the page.
- A way to set which WaniKani level to use when hiding furigana.
- A way to filter kanji by JLPT level.
- A way to add extra kanji you may know to be filtered.
- A way to hover over a word and see the WK level. Maybe even give a link too the vocab word.
Other Cool Feature:
It so happens my script seems to work with the website https://hiragana.jp/en/. This site lets you give it a link and it attempts to add furigana. If you run my script with the website as well, it will attempt to remove the furigana for your known kanji and vocabulary that was added by this website.
As a note though, it appears the way it adds furigana isn’t always perfect. So, sometimes, it will split the furigana in weird ways causing partial furigana for words.
This script will work with any site that uses the ruby and rt tags. If you know of any websites that are Japanese and use these tags for furigana, please feel free to suggest them being added to the script’s list of sites to be activated on.
Also, anyone who wants to contribute to making the script better is free to submit pull requests. I have the source setup on GitHub [GitHub - entropyofchaos/NHK-Easy-Practice-With-WaniKani]. So, as long as the changes make sense for the script, I am very likely to be willing to accept your changes.