1
1
Fork 0

Cleanup
All checks were successful
Linting / Javadoc (push) Successful in 4s

This commit is contained in:
Dominik Säume 2024-05-23 19:48:43 +02:00
parent 9c0c80902e
commit 47cb8495d5
Signed by: SZUT-Dominik
GPG key ID: 67D15BB250B41E7C
4 changed files with 24 additions and 23 deletions

View file

@ -1,19 +1,24 @@
# CCNA Autofill Userscript # CCNA Autofill UserScript
A Userscript for autofilling the Answers on the **CCNA**. A UserScript for autofilling the Answers on the **CCNA**.
inspired by [Merlinfuchs/ccna-extension](https://github.com/merlinfuchs/ccna-extension). inspired by [Merlinfuchs/ccna-extension](https://github.com/merlinfuchs/ccna-extension).
## Project Status
This UserScript is only tested with [ViolentMonkey](https://violentmonkey.github.io/) on the **CCNAv7**.
## Requirements
Use a Userscript Client/Manager like [Violentmonkey](https://violentmonkey.github.io/) or [Tampermonkey](https://www.tampermonkey.net/).
> **Info:** *[Violentmonkey](https://violentmonkey.github.io/) is highly recommended*.
## Installation ## Installation
Use a userscript client like [ViolentMonkey](https://violentmonkey.github.io/), [Tampermonkey](https://www.tampermonkey.net/). > **Info:** *If you just installed your UserScript Manager, reload this page, to enable the manager itselfe, for the install button to work*
[![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
This Userscript is only tested with [ViolentMonkey](https://violentmonkey.github.io/) on the **CCNAv7**.
## Usage ## Usage
This only works directly on the exam website.
- **p**: Paste your answer-URL from [ItexamAnswers](https://itexamanswers.net) for the **CCNAv7** use [these](https://itexamanswers.net/ccna-1-v7-modules-1-3-basic-network-connectivity-and-communications-exam-answers.html). - **p**: Paste your answer-URL from [ItexamAnswers](https://itexamanswers.net) for the **CCNAv7** use [these](https://itexamanswers.net/ccna-1-v7-modules-1-3-basic-network-connectivity-and-communications-exam-answers.html).
- **a**: Try autofilling the current answer. There won't be any visual feedback when it fails. - **a**: Try autofilling the current answer. There won't be any visual feedback when it fails.
- **n**: Go to the next Question. - **n**: Go to the next Question.

View file

@ -1,10 +1,8 @@
// ==UserScript== // ==UserScript==
// @name CCNA Autofill // @name CCNA Autofill
// @namespace Violentmonkey Scripts // @namespace https://git.euph.dev/Snoweuph
// @match *://assessment.netacad.net/* // @match *://assessment.netacad.net/*
// @match *://www.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/fetch.js
// @require https://git.euph.dev/SZUT-Dominik/CCNA_Autofill_Userscript/raw/branch/main/src/answer.js // @require https://git.euph.dev/SZUT-Dominik/CCNA_Autofill_Userscript/raw/branch/main/src/answer.js
// @grant GM_setValue // @grant GM_setValue

View file

@ -1,6 +1,5 @@
/** /**
* Object representing a question with answers.
* @typedef {Object} Answer * @typedef {Object} Answer
* @property {string} question - The question. * @property {string} question
* @property {Array<string>} answers - An array of answers. * @property {Array<string>} answers
*/ */

View file

@ -1,14 +1,13 @@
/** /**
* Makes an HTTP request using GM.xmlHttpRequest. * @param {Object} request
* @param {Object} details - Details of the HTTP request. * @param {string} request.method
* @param {string} details.method - The HTTP request method (e.g., 'GET', 'POST'). * @param {string} request.url
* @param {string} details.url - The URL to send the request to. * @param {Object<string, string>} [request.headers]
* @param {Object<string, string>} [details.headers] - Additional headers to include in the request. * @param {function(GMXMLHttpRequestResponse):void} [request.onload]
* @param {function(GMXMLHttpRequestResponse):void} [details.onload] - Optional. Will be called when the request has completed successfully. Passed one argument, the Response Object. * @param {Function} [request.onerror]
* @param {Function} [details.onerror] - Optional. Will be called if an error occurs while processing the request. Passed one argument, the Response Object. * @returns {void}
* @returns {undefined}
*/ */
function GM_xmlhttpRequest(details) {} function GM_xmlhttpRequest(request) {}
/** /**
* Response object for the HTTP request. * Response object for the HTTP request.