Having to come back and update this script reminded me I had made a couple changes a long time ago but forgot to ever share them here so they could maybe be included by default.
- The hotkey says it can both show and collapse the guesses but it currently only shows them, pressing the key again does not hide the guesses. Easily fixed by adding the following into the event listener in the init function, right after the declaration of
collapsed
if (!collapsed) { hideGuesses(); return; }
- The css still contains the old variables that were used for the now unmaintained Breeze Dark userstyle. As both Wanikani and more recently maintained userstyles such as Breeze Dark 2 and Light Theme make use of official variables, the css in this script should be changed to support them:
"#guesses > a.radical { --ic: var(--color-radical, --radical-color, #00AAFF); }" +
"#guesses > a.kanji { --ic: var(--color-kanji, --kanji-color, #FF00AA); }" +
"#guesses > a.vocabulary { --ic: var(--color-vocabulary, --vocabulary-color, #AA00FF); }" +
...
"#confusionGuesserOverlay > div > label { position: absolute; top: 0; right: 25px; background-color: var(--color-wk-panel-content-background, --page-background, white); width: 1.4rem; line-height: 1.4rem; text-align: center; border-radius: 0.3rem; font-weight: bold; cursor: pointer; font-size: large; }" +
...
"#confusionGuesserOverlay.noOverlay > button::before { top: 7px; right: initial; border-right-color: transparent; border-top-color: var(--color-text, --text-color, #a2a2a2); }" +
...
" #confusionGuesserOverlay > button::before { top: 7px; right: initial; border-right-color: transparent; border-top-color: var(--color-text, --text-color, #a2a2a2); }" +