// ==UserScript== // @name CCNA Autofill // @namespace Violentmonkey Scripts // @match *://assessment.netacad.net/* // @match *://www.assessment.netacad.net/* // @match *://www.google.com/* // @match *://www.google.de/* // @require https://git.euph.dev/SZUT-Dominik/CCNA_Autofill_Userscript/raw/branch/main/fetch.js // @require https://git.euph.dev/SZUT-Dominik/CCNA_Autofill_Userscript/raw/branch/main/awnser.js // @grant GM_setValue // @grant GM_getValue // @grant GM_xmlhttpRequest // @grant GM_log // @version 0.0.11 // @author Dominik Säume // ==/UserScript== const URL_STORAGE_KEY = "itexamanswers.net URL"; let awnserData; console.log = console.__proto__.log; window.addEventListener("keydown", async (event) => { switch(event.key){ case "p": const oldAwnsersURL = GM_getValue(URL_STORAGE_KEY); let newAwnsersURL = prompt("Please input the answer url (itexamanswers.net)", oldAwnsersURL); GM_setValue(URL_STORAGE_KEY, newAwnsersURL); awnserData = await window.fetchAwnsers(newAwnsersURL); break; case "n": document.getElementById("next").click(); break; case "a": window.awnserQuestion(awnserData); break; } });