From 8f6fc2b722419fb791782a5ae236129c392b954d Mon Sep 17 00:00:00 2001 From: HeNine <> Date: Mon, 15 Nov 2021 13:52:13 +0100 Subject: [PATCH] hotkeys --- professor/hotkeys.min.js | 2 ++ professor/professor.html | 2 ++ professor/script.js | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 professor/hotkeys.min.js diff --git a/professor/hotkeys.min.js b/professor/hotkeys.min.js new file mode 100644 index 0000000..4453fe2 --- /dev/null +++ b/professor/hotkeys.min.js @@ -0,0 +1,2 @@ +/*! hotkeys-js v3.8.7 | MIT (c) 2021 kenny wong | http://jaywcjlove.github.io/hotkeys */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).hotkeys=t()}(this,function(){"use strict";var e="undefined"!=typeof navigator&&0 + + diff --git a/professor/script.js b/professor/script.js index 48e1c26..216cc2c 100644 --- a/professor/script.js +++ b/professor/script.js @@ -41,6 +41,13 @@ function pageReady() { handleLoginState(); } + +hotkeys('ctrl+enter', function (event, handler){ + console.log(event); + document.getElementById("submit_button").click(); +}); + + function handleLoginState() { if (document.cookie.split('; ').find(row => row.startsWith('credentials='))) { document.getElementById("logout").style.display = "";