[No Longer Working] WaniKani Lesson User Synonyms

I’m out of lessons right now but I will test once I have new unlocked items.

Thanks a lot, Kobayashi (for looking into it) and Viet (for fixing it).
This is the only user script I rely on but it’s incredibly useful.

I’ve used it in today’s lessons as well and it seems to be working all right again! Thank you so much for fixing it! :heart:

Now Working:
User Synonyms entered during lessons are now retained.
Also those entered on item pages for unlocked items (those with pending lessons).

Other Bug Fixed:
The script was not loading right on item pages in chrome for me.
Posted an updated version that fixes only this.

Still Broken:
User Synonyms and Notes on still locked items.
If you use the item page to try to add notes to a locked item you will get the red error “Error Adding Note. Retry?”.
If you use the item page to try to add synonyms to a locked item nothing seems to happen when you hit the “ADD” button.
(Strangely there are exceptions to this… Sometimes it works. But mostly it doesn’t.)

Thanks for your hard work :slight_smile: Please update if things change.

It’s working! Once again, thank you.

@kobayashi Does this script do anything with notes during lessons? I’ve had a few notes not save in the last few days and I wanted to check before reporting it to WaniKani.

Yes, it does interact with notes on the lesson page.
Mostly to extend the jStorage TTL (auto deletion time) of the locally saved copy of the note.
The default is delete after 2-hours.
Which makes sense if you assume users will only enter a note shortly before completing the lesson.

I don’t believe this script should interfere with note submission to the WK server.
But it does interact with notes somewhat, so perhaps it would be best to attempt bug replication without this script.

Not quite clear on what exactly your issue is.
Do you mean the lesson page does not actually accept the note? Like saving does nothing or gives an error?
Or do you mean it accepts the note normally and then WK ‘forgets’ about it after lesson completion?

I have disabled the script (as of yesterday) and I’ll let you know if this issue occurs with the script off.

Visually the note appears to save. However, when I go to do the lesson quiz and I check the notes, some of the notes disappeared. I always readded my missing notes during the quiz, so I don’t actually know if they would have shown up after the lesson was completed.

I think I have replicated the behavior you describe with the script enabled.

Enter meaning and reading notes for all five lesson items.
Start quiz.
Before successfully answering all parts of an item, meaning and reading notes show up fine.
After successfully answering all parts of an item, meaning and reading notes are both gone.

Checking the item pages after lesson quiz completion, meaning and reading notes are retained.
They are only missing on the quiz page.

With the script disabled the above test always shows all meaning and reading notes.

This is a logic bug in the script regarding cleanup of jStorage keys upon lesson completion.
Not sure if I ever noticed this behavior before, but the script has probably always done this.
Need to look into it a bit more, but probably fixable.

1 Like

@kobayashi Any update on whether you’ll take a look at this? To be honest, I don’t really understand why the script does anything with notes in lessons since you can edit notes then without the script.

@kobayashi This script stopped working for me recently. Neither enter nor the add button properly adds the user synonym during lessons. I used this script all the time, so I would massively appreciate it if there was a way to fix it.

Anyone else encountering the same problem?

Using Chrome 61 on Windows 10.

Yes, I have the same issue. The error in the browser console is
https://www.wanikani.com/user_synonym/create/ 404 (Not Found)

The call when adding a user synonym succesfully during reviews uses:
PUT “https://www.wanikani.com/study_materials/idhere

I’m not very familiar with the WaniKani API yet so I don’t know whether user_synonym/create was deprecated, never meant to be used or what else might be going on here.

1 Like

Things like this aren’t part of the official API. These scripts are built with the understanding that WaniKani can make breaking changes at any time without warning.

Ah thanks, I see. So they probably changed that path from user_synonym/create/ to /study_materials/idhere”.

@kobayashi hasn’t been online here for a while, not sure if he/she is planning on fixing it. Is anyone else looking into this? Otherwise I’ll give it a try.

1 Like

So using that new URL seems to work but some parts of the script have to be adjusted a bit because it expects a list of synonyms now instead of just a single string, nothing major. I’m currently travelling (to Japan, yay :slight_smile: ) so it might take a little while. But if this hasn’t been fixed when I get back online then I will post an update here with a fix as soon as I can.


Thanks for offering to take up fixing the script! Take your time, I’ll deal for now and just look forward to when the code is adjusted for the changes.

@irrelephant thank you, that would be wonderful, I also use this script a lot since I tend to put synonyms in my language instead of trying to remember what it means in English, so having it functioning would be a great deal.


@Eman527 @chofas I made some changes and it seems to work for me but please let me know if I missed anything: https://greasyfork.org/en/scripts/34839-wanikani-lesson-user-synonyms-2 I didn’t test it long and only in Chrome so… who knows :wink:

@seanblue you mentioned some issue above (to be honest, I didn’t read all the previous comments). Is that still happening? I could try and look into it eventually. For now I have to get back to my reviews, there are too many piled up right now :-/ . (edit: haha, thanks btw. for posting the "Can’t continue reviews after canceling “wrap up” thread; I was having the same issue and I did initially think I broke this with my script and had no idea how I managed to do that :wink: )

@kobayashi I hope this is OK for you. I didn’t see a way to fork or suggest changes on greasyfork. If you ever return to this thread and want to update your original script then please of course feel free to copy my changes and I will remove my forked version from greasyfork.


It’s working! Thank you very much!

1 Like

@irrelephant Thank you so much! I was also using this script to translate things into my native language and it’s way easier to add synonyms during lessons than reviews. :relaxed:

May I suggest a minor adjustment? Usually after I type in a new synonym I press enter to confirm it, instead of clicking the little “+”. When I pressed enter just now it automatically took me to the next page, the reading section. Is there a way to fix this? If not that’s cool, I’ll just have to get used to it. Cheers.