Bunpro: Toggle Furigana of Review Sentence

Toggle review sentence furigana with ArrowUp Key while answer input field is focused.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Bunpro: Toggle Furigana of Review Sentence
// @namespace    http://tampermonkey.net/
// @version      1.0.0
// @description  Toggle review sentence furigana with ArrowUp Key while answer input field is focused.
// @author       alamin
// @match        *bunpro.jp/*
// @grant        none
// @require      https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012
// ==/UserScript==
 
(function() {
    'use strict';
 
    waitForKeyElements(".study-question-japanese", function (e) {
        $("#study-answer-input").on("keyup", function (event) {
            if (event.key === "ArrowUp") {
                $(e[0]).find("rt").toggleClass("hide-furigana");
            }
        });
    });
})();