Created
August 2, 2021 19:59
-
-
Save prednaz/fdbb1e156b53986fe9c1725b38b3a786 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name htwk_english | |
// @match https://webcourses.htwk-leipzig.de/tt/index.php?* | |
// @require https://code.jquery.com/jquery-3.5.1.min.js | |
// @grant none | |
// ==/UserScript== | |
$("input[type='radio']").eq(0).trigger("focus"); | |
// https://api.jquery.com/on | |
// https://api.jquery.com/category/events/event-object | |
$(document).on( | |
"keydown", | |
(event) => | |
{ | |
if (event.which === 13) { // enter | |
$(".term #input[type='text']").val($("#trainer_head").text()); | |
$("input.button[name='solve'], #button_next").trigger("click"); | |
} | |
} | |
); | |
// $(document).on( | |
// "keydown", | |
// (event) => | |
// { | |
// if (event.which === 80) { // p | |
// $("div.mejs-playpause-button > button").trigger("click"); | |
// } | |
// } | |
// ); | |
$(document).on("keydown", (event) => {console.log(event.which);}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment