KaBoot

Allows you to press 1234 keys to trigger Kahoot answer buttons

当前为 2022-02-10 提交的版本,查看 最新版本

// ==UserScript==
// @name         KaBoot
// @namespace    https://tampermonkey.net
// @version      0.3
// @description  Allows you to press 1234 keys to trigger Kahoot answer buttons
// @author       AshKmo
// @match        https://kahoot.it/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
document.addEventListener('keydown', e => {
    if (e.keyCode < 53 && e.keyCode > 48) {
        var button = document.querySelectorAll('[role="button"]')[e.keyCode-49];
        if (button != null) {
            button.click();
        }
    }
});
})();