When I’m doing new vocabulary lessons, I like to try to read the context sentences aloud to test my comprehension and practice any words that show up in them. Problem was, though, the English translations right below the sentences were hard to keep my eyes off, and I had a hard time reading the Japanese without, like, spoiling myself on the answer as I was reading.
So I put together this userscript to blur the English translations, and reveal them only when you hover over them. That way I can still check my work, but the answer isn’t just staring me in the face as I’m trying to read. I figured I should share this on the community page, in case anyone else has wanted the same thing.
// ==UserScript==
// @name Wanikani Reibun Answer Spoiler
// @namespace mailto:benedictide@gmail.com
// @version 0.1
// @description Blurs the English translations of context sentences white so they can't be seen unless hovered over or highlighted.
// @author Benedict Ide
// @match https://www.wanikani.com/lesson/session
// @grant none
// ==/UserScript==
(function() {
'use strict';
let css = '.context-sentence-group>p:nth-child(2){color: transparent;text-shadow: 0 0 9px rgba(0,0,0,0.5);border: 1px solid #666666;border-radius: 5px;padding: 2px !important;padding-left:10px !important}.context-sentence-group>p:nth-child(2):hover{color: black;text-shadow: none;}';
let style = document.createElement('style');
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
document.getElementsByTagName('head')[0].appendChild(style);
})();
I run it on Chrome through Tampermonkey, but if you have a userscript plugin for some other browser it should work more or less the same way- just have it run on https://www.wanikani.com/lesson/session, and it should put a box around the translations, like so: