Thoughts? NHK Easy with Hidden WaniKani Vocab

What are your guys thoughts on a userscript to hide the furigana for vocabulary words you already learned on NHK Easy?

I just started working with JavaScript at work and thought, lets see what the heck I can do. I’ve been messing around all day with the WaniKani API and JavaScript trying to see if I could make it happen for myself. So far I have a script that can hide furigana on NHK easy given a list of words to hide.

Maybe a stretch goal for myself would be the ability to click on a word to toggle its furigana like Bunpro does.

For anyone that has written a script before, is there a good practice for handling the WaniKani api token? As a developer, I definitely feel storing it in the script as plain text doesn’t feel safe.

9 Likes

Download the data you need and share the results of request (kanji/word list). Users level are public

If it’s a read only token it’s not that bad…if some one can access the plain text key you have bigger worries like cookies

1 Like

I may just do this. Although I could probably get someone’s level without a key, it looks like if I want to use the WK API, I have to use a key to make the request.

I’ve made progress. In the image below, you can see many of the kanji don’t have furigana displayed.

So far, I can hide the furigana on the main page but the pop-ups that appear when you hover look like they will be really hard to remove the furigana on since they are generated on demand.

2 Likes

Ooh, nice progress! I don’t even think it’s necessary to hide the furigana on pop-ups, because if you’ve learned a word in Wanikani, you should also know the meaning. So people would probably only try to look at the pop-up if it was a word that they hadn’t learned (and thus the furigana would be visible for anyways).

If you are able to release this as a userscript, I would definitely use it!

1 Like

I will try to do so this weekend. I still want to do more code cleanup.

@yukinet Do you know what the best way is to publish a script. I’ve never done it before. If not, I’ll probably try to do some research on my own this weekend to release a beta.

I post my script on greasyfork.org and all Wanikani scriptwriters I know of do the same. This provides hosting at no costs and it is integrated with Tampermonkey for automatic updates when you push a new version.

1 Like

never have i ever published a script. people put it on greasyfox, this way you can push updates. other alternatives in User Script Hosting - GreaseSpot Wiki

at the end of the day you just need a place to put a text file(direct download) that you can update. the extension detects the file as a script based on the content of the file and not from the url.

1 Like

Thanks, I will look into that.

1 Like

Thanks, I will take a look at the sites you mentioned.

I can’t wait to use this!

1 Like

Ok, so I just published my first beta of the script. You can find it here.

This is my first time making a JavaScript script outside of tutorials, so hopefully everything works.

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 I created screenshots for you. :laughing:

If you have trouble or questions, please ask.

Here are some basic instructions to get this script working:

  1. [ General Script Installation instructions ] :point_left: You’ll need a script host plugin like TamperMonkey
  2. [Create a Personal Access Token] :point_left: 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. :slight_smile:

    2.3 Copy the token you created with the description you gave in the previous step. It will be listed under the “Token” header.
  3. 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.
  4. [ Open NHK Easy ] :point_left: It’s time to start reading!

Do you guys think I should make a new post with the title [Userscript] NHK Easy Practice With WaniKani and my directions from above? Or is it more common for people to just rename their post?

Alright, I moved this userscript to its own page since the initial version is now released.