Skip to content
Snippets Groups Projects
Unverified Commit 695b6cd0 authored by Jan's avatar Jan Committed by GitHub
Browse files

Added check if pwd already input before wait

Last version didn't work for me, my FF inserted the password earlier than the script was running
parent ceaf063b
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
// @description Automatically logs you in to the Uni Hamburg Moodle, given automated password filling.
// @description:de Loggt Dich automatisch in das Moodle der Uni Hamburg ein, gegeben, dass die Login-Daten automatisch ausgefüllt werden.
// @version 1.0.4
// @version 1.0.5
// @copyright 2023+, Jan G. (Rsge)
// @license Mozilla Public License 2.0
// @icon https://lernen.min.uni-hamburg.de/theme/image.php/uhh/theme/1698645195/favicon
......@@ -13,8 +13,8 @@
// @namespace https://github.com/Rsge
// @homepageURL https://github.com/Rsge/Uni-Hamburg-Moodle-Auto-Login
// @supportURL https://github.com/Rsge/Uni-Hamburg-Moodle-Auto-Login/issues
// @updateURL https://greasyfork.org/scripts/479165-uni-hamburg-moodle-auto-login/code/Uni%20Hamburg%20Moodle%20Auto%20Login.user.js
// @downloadURL https://greasyfork.org/scripts/479165-uni-hamburg-moodle-auto-login/code/Uni%20Hamburg%20Moodle%20Auto%20Login.user.js
// @downloadURL https://update.greasyfork.org/scripts/479165/Uni%20Hamburg%20Moodle%20Auto%20Login.user.js
// @updateURL https://update.greasyfork.org/scripts/479165/Uni%20Hamburg%20Moodle%20Auto%20Login.meta.js
// @match https://lernen.min.uni-hamburg.de/login/*
// @match https://login.uni-hamburg.de/idp/*
......@@ -35,9 +35,13 @@
let secondLoginButtonElements = document.getElementsByClassName("form-element form-button");
if (secondLoginButtonElements.length > 0) {
let passwordInput = document.getElementById("password");
if (passwordInput?.value.length > 0) {
secondLoginButtonElements[0].click();
} else {
passwordInput.addEventListener("input", function() {
secondLoginButtonElements[0].click();
});
}
}
}, false);
})();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment