Kotu.io Audio Replay

Press "r" to replay audio on kotu.io tests

// ==UserScript==
// @name         Kotu.io Audio Replay
// @namespace    kotu-replay
// @author       Takemi
// @version      1.0
// @description  Press "r" to replay audio on kotu.io tests
// @match        https://kotu.io/tests/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    document.addEventListener("keydown", e => {
        if (e.code === "KeyR" && !e.repeat) {
            const audio = document.querySelector("audio");
            if (audio) {
                audio.currentTime = 0;
                audio.play();
            }
        }
    });
})();