[Userscript] WaniKani JLPT Indicator

I’ve been doing some comparisons between JLPT level, common tag, google results, etc as I go with learning vocab. Yep, sometimes I do find some weird situations… But as long as one considers this info not to be the absolute truth, it’s still very useful.

5 Likes

I’ve published v0.2.0 of WaniKani JLPT Indicator. It now removes ~ and trailing する from vocab words before checking their JLPT level.

1 Like

Vielen Dank! This is cool to have on screen!

1 Like

Thanks for the script, but I think I have a bug to report.
On the lessons page the loading sometimes go on forever, and judging from the console it’s because the l/currentLesson from the jstorage is null at that times, so I added a check for that inside handleJLPT and now the loading doesn’t hang.

function handleJLPT(currentItem) {
        if (!currentItem)
          return
...

Thank you! I think I never came across the hanging (or simply did not notice), but checking for null is definitely always a good thing ™. Will fix and release asap.

Edit: I’ve published version 0.3.0 of WaniKani JLPT Indicator.

Why does it say to use this script with caution
USE WITH CAUTION
on the list of API and Third Party Apps thread?

I did not put the label there but I think it’s because nobody knows which kanji and vocab may occur in which level, so it’s more of an informed estimate than a hard fact.

1 Like

I gotcha … thanks, Nicole
That has put my paranoia around security at rest :grinning:

1 Like

Do you know if there is any script that would show it for the different kanken levels? That would be awesome! Currently I write a notice in every kanji and assign it manually

Yes hehe there is no security risk except that it accesses my backend at Heroku to query the information :slight_smile:

1 Like

This doesn’t work for me ? Not sure if it’s only me. I tried to reinstall it a few times, or downgrade it, but nothing.

Oh I think this might no longer work due to the changes in WK. I‘m sorry, I somewhat fell out of the loop of fixing my scripts… I can (hopefully) look into this tonight ot tomorrow. Thanks for the ping!

3 Likes

Oh I didn’t realise! That would be awesome, it’s such a useful script. You’re a star :slight_smile: also, really no rush :purple_heart::sparkles:

1 Like

Hello,
Similar to @shimizukeira, I haven’t been able to make this script work, the website “JLPT Resources - Free Japanese Vocabulary lists and MP3 sound files” seems to be up and running, and I can find in the site the vocabulary from Wanikani, but all that I see in Wanikani is “…” where I expect the JLPT level to be displayed.

In the Chrome debug console, I can see an exception:

userscript.html?name=Wanikani%2520JLPT%2520Indicator.user.js&id=2e2c6164-481c-4d2f-8a97-500028155286:159 Uncaught TypeError: Cannot read properties of undefined (reading 'text')
    at setClassAndText (userscript.html?name=Wanikani%2520JLPT%2520Indicator.user.js&id=2e2c6164-481c-4d2f-8a97-500028155286:159:28)
    at setJLPTIndicator (userscript.html?name=Wanikani%2520JLPT%2520Indicator.user.js&id=2e2c6164-481c-4d2f-8a97-500028155286:150:9)
    at Object.onload (userscript.html?name=Wanikani%2520JLPT%2520Indicator.user.js&id=2e2c6164-481c-4d2f-8a97-500028155286:141:17)
    at St (<anonymous>:9:89)
    at <anonymous>:34:72
    at St (<anonymous>:9:89)
    at r (<anonymous>:22:484)
    at <anonymous>:23:112
    at <anonymous>:67:445
    at p (<anonymous>:67:464)

Thank you!

1 Like

I took a look and seems that the API endpoint that it uses is in fact down.

1 Like

Oh thanks for the ping! Of course I forgot :woman_facepalming:

Yes, that’s correct. I used a free Heroku VM but they are now charging money for everything, so that site went down. I will integrate the data into the script so that it no longer needs a call to a backend.

Working on it now :slight_smile:

2 Likes

Thanks everybody for your patience :smiling_face_with_three_hearts:
@shimizukeira @estebanrc @jhendrix13

I have updated the script to version 0.4.0 on Greasyfork. The JLPT information is now contained in the script itself, therefore the backend is no longer necessary.

If you notice something odd, please give me a shout! :bowing_woman:

2 Likes

Thank you very much @NicoleIsEnough!
The new 0.4.0 version works great :tada:!

1 Like

@NicoleIsEnough unfortunately I’m having troubles with the script since yesterday…maybe it is due to the WaniKani updates? However, thanks for the script, it was a great help! :slight_smile:

Thanks for the ping! I must admit I hadn’t looked into whether the script needs to be updated - was super busy the last two months and it’s only wearing off slowly, but will check it out soon. Thanks for your patience :bowing_woman:

3 Likes