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.
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.
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!
@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.
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.
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.
If you have trouble or questions, please ask.
Here are some basic instructions to get this script working:
[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.
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?