[Userscript] Show context sentence once reviewed

What does this script do?

Shows one of the context sentences for vocabulary once both reading and meaning have been answered. If sentence is clicked on also shows the English translation. Picture below.

The new update broke the context sentence script I was using before so I had to spend half my day coding this up instead of doing the actual reviews.



Over on GreasyFork: WaniKani Review Context Sentences

Feature requests and bugs

This script is very much tailored to my opinions and preferences so I don’t really feel like adding any fancy features to it. Please do report any bugs and I’ll take a look if I have time.


Currently, the extension hides the English translated context unless you click on the context bar.

I’ve created an updated version that has a settings menu toggle to determine whether the English translated context should be shown by default or not.


(The menu will show “Hide/Show English Context” depending on whether you have the setting enabled or not. It will refresh the page after selection.)

For me this script doesn’t work anymore.
I have to replace line 6 with

const wasPassed = e.detail.results.action === "pass";