Skip to content
Snippets Groups Projects
Unverified Commit 7a41d5af authored by jmir1's avatar jmir1
Browse files

fix: Prevent issues with other scripts and wait for autofill

parent 6d429ae6
Branches
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// @description Automatically logs you in to the Uni Hamburg Moodle, given automated password filling. // @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. // @description:de Loggt Dich automatisch in das Moodle der Uni Hamburg ein, gegeben, dass die Login-Daten automatisch ausgefüllt werden.
// @version 1.0.3 // @version 1.0.4
// @copyright 2023+, Jan G. (Rsge) // @copyright 2023+, Jan G. (Rsge)
// @license Mozilla Public License 2.0 // @license Mozilla Public License 2.0
// @icon https://lernen.min.uni-hamburg.de/theme/image.php/uhh/theme/1698645195/favicon // @icon https://lernen.min.uni-hamburg.de/theme/image.php/uhh/theme/1698645195/favicon
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// @match https://lernen.min.uni-hamburg.de/login/* // @match https://lernen.min.uni-hamburg.de/login/*
// @match https://login.uni-hamburg.de/idp/* // @match https://login.uni-hamburg.de/idp/*
// @run-at document-idle // @run-at document-end
// @grant none // @grant none
// ==/UserScript== // ==/UserScript==
...@@ -34,7 +34,10 @@ ...@@ -34,7 +34,10 @@
} }
let secondLoginButtonElements = document.getElementsByClassName("form-element form-button"); let secondLoginButtonElements = document.getElementsByClassName("form-element form-button");
if (secondLoginButtonElements.length > 0) { if (secondLoginButtonElements.length > 0) {
let passwordInput = document.getElementById("password");
passwordInput.addEventListener("input", function() {
secondLoginButtonElements[0].click(); secondLoginButtonElements[0].click();
});
} }
}, false); }, false);
})(); })();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment