From adb197a0e588b316f0a92938a63506ea181a3b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=A4ume?= Date: Thu, 23 May 2024 19:48:43 +0200 Subject: [PATCH] Cleanup --- README.md | 4 ++-- src/main.user.js | 4 +--- types/Answer.d.js | 5 ++--- types/GM_xmlhttpRequest.d.js | 17 ++++++++--------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index af857e5..87707e2 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ A Userscript for autofilling the Answers on the **CCNA**. inspired by [Merlinfuchs/ccna-extension](https://github.com/merlinfuchs/ccna-extension). ## Installation -Use a userscript client like [ViolentMonkey](https://violentmonkey.github.io/), [Tampermonkey](https://www.tampermonkey.net/). +Use a userscript client like [Violentmonkey](https://violentmonkey.github.io/), [Tampermonkey](https://www.tampermonkey.net/). -[![Install USerscript](https://img.shields.io/badge/Install_Userscript-Install_Userscript?style=for-the-badge&logo=tampermonkey&logoColor=brown&color=lightgray)](https://git.euph.dev/SZUT-Dominik/CCNA_Autofill_Userscript/raw/branch/main/src/main.user.js) +[![Install USerscript](https://img.shields.io/badge/Install_Userscript-Install_Userscript?style=for-the-badge&logo=greasyfork&logoColor=black&color=brown)](https://git.euph.dev/SZUT-Dominik/CCNA_Autofill_Userscript/raw/branch/main/src/main.user.js) ## Status diff --git a/src/main.user.js b/src/main.user.js index 32dbf22..ac4c3ae 100644 --- a/src/main.user.js +++ b/src/main.user.js @@ -1,10 +1,8 @@ // ==UserScript== // @name CCNA Autofill -// @namespace Violentmonkey Scripts +// @namespace https://git.euph.dev/Snoweuph // @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/src/fetch.js // @require https://git.euph.dev/SZUT-Dominik/CCNA_Autofill_Userscript/raw/branch/main/src/answer.js // @grant GM_setValue diff --git a/types/Answer.d.js b/types/Answer.d.js index d6d11c0..ac3db36 100644 --- a/types/Answer.d.js +++ b/types/Answer.d.js @@ -1,6 +1,5 @@ /** - * Object representing a question with answers. * @typedef {Object} Answer - * @property {string} question - The question. - * @property {Array} answers - An array of answers. + * @property {string} question + * @property {Array} answers */ diff --git a/types/GM_xmlhttpRequest.d.js b/types/GM_xmlhttpRequest.d.js index b2382da..9d09b8f 100644 --- a/types/GM_xmlhttpRequest.d.js +++ b/types/GM_xmlhttpRequest.d.js @@ -1,14 +1,13 @@ /** - * Makes an HTTP request using GM.xmlHttpRequest. - * @param {Object} details - Details of the HTTP request. - * @param {string} details.method - The HTTP request method (e.g., 'GET', 'POST'). - * @param {string} details.url - The URL to send the request to. - * @param {Object} [details.headers] - Additional headers to include in the request. - * @param {function(GMXMLHttpRequestResponse):void} [details.onload] - Optional. Will be called when the request has completed successfully. Passed one argument, the Response Object. - * @param {Function} [details.onerror] - Optional. Will be called if an error occurs while processing the request. Passed one argument, the Response Object. - * @returns {undefined} + * @param {Object} request + * @param {string} request.method + * @param {string} request.url + * @param {Object} [request.headers] + * @param {function(GMXMLHttpRequestResponse):void} [request.onload] + * @param {Function} [request.onerror] + * @returns {void} */ -function GM_xmlhttpRequest(details) {} +function GM_xmlhttpRequest(request) {} /** * Response object for the HTTP request.