KaBoot

A tiny script that maps the 1234 keys on your keyboard to the answer buttons on Kahoot

目前為 2022-08-11 提交的版本,檢視 最新版本

// ==UserScript==
// @name         KaBoot
// @namespace    https://tampermonkey.net
// @version      0.4
// @description  A tiny script that maps the 1234 keys on your keyboard to the answer buttons on Kahoot
// @author       AshKmo
// @match        https://kahoot.it/*
// @grant        none
// @license      MIT
// ==/UserScript==

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