Skip to content
Snippets Groups Projects
Commit de8ebbbc authored by Rsge's avatar Rsge
Browse files

Added support for Surfmail & fixed login.uni-hamburg

parent b47ec2d4
No related branches found
No related tags found
No related merge requests found
# Uni Hamburg Auto Logins
Automatically logs you in to a few different Uni Hamburg sites, given the login data is provided automatically or input manually.
---
Loggt Dich automatisch in verschiedene Seiten der Uni Hamburg ein, gegeben, dass die Login-Daten automatisch ausgefüllt oder manuell eingegeben werden.
---
### Supported Sites / Unterstützte Seiten
* Moodle
* OpenOlat
* STiNE
* Surfmail (Uni-Mail)
\ No newline at end of file
......@@ -5,7 +5,7 @@
// @description Automatically logs you in to a few different Uni Hamburg sites, given automated password filling.
// @description:de Loggt Dich automatisch in verschiedene Seiten der Uni Hamburg ein, gegeben, dass die Login-Daten automatisch ausgefüllt werden.
// @version 2.1.2
// @version 2.2.0
// @copyright 2023+, Jan G. (Rsge)
// @license Mozilla Public License 2.0
// @icon https://www.uni-hamburg.de/favicon.ico
......@@ -14,7 +14,7 @@
// @homepageURL https://github.com/Rsge/Uni-Hamburg-Auto-Login
// @supportURL https://github.com/Rsge/Uni-Hamburg-Auto-Login/issues
// @downloadURL https://update.greasyfork.org/scripts/481691/Uni%20Hamburg%20Auto%20Logins.user.js
// @updateURL https://update.greasyfork.org/scripts/481691/Uni%20Hamburg%20Auto%20Logins.user.js
// @updateURL https://update.greasyfork.org/scripts/481691/Uni%20Hamburg%20Auto%20Logins.meta.js
// @match https://lernen.min.uni-hamburg.de/login/*
// @match https://www.openolat.uni-hamburg.de/dmz/*
......@@ -22,6 +22,7 @@
// @match https://stine.uni-hamburg.de/scripts/*
// @match https://www.stine.uni-hamburg.de/scripts/*
// @match https://cndsf.ad.uni-hamburg.de/IdentityServer/Account/*
// @match https://surfmail.rrz.uni-hamburg.de/login.php?*
// @run-at document-end
// @grant none
......@@ -43,12 +44,14 @@
// Carries out login sequence.
window.addEventListener('load', function() {
// -- Moodle --
// lernen.min.uni-hamburg.de
let lernenMINLoginButtons = document.getElementsByClassName("btn login-identityprovider-btn btn-primary btn-lg btn-block");
if (lernenMINLoginButtons.length > 0) {
lernenMINLoginButtons[0].click();
return;
}
// -- OpenOlat --
// openolat.uni-hamburg.de
let openOlatLoginButtonDivs = document.getElementsByClassName("o_block");
if (openOlatLoginButtonDivs.length > 0) {
......@@ -66,13 +69,15 @@
}, 800);
return;
}*/
// -- Moodle & OpenOlat --
// login.uni-hamburg.de
let loginLoginButtons = document.getElementsByClassName("form-element form-button");
let loginLoginButtons = document.getElementsByName("_eventId_proceed");
if (loginLoginButtons.length > 0) {
let pwdInput = document.getElementById("password");
checkPwdLogin(pwdInput, loginLoginButtons[0]);
return;
}
// -- STiNE --
// stine.uni-hamburg.de
let stineOpenLoginButton = document.getElementById("logIn_btn");
if (stineOpenLoginButton) {
......@@ -86,5 +91,13 @@
checkPwdLogin(pwdInput, campusNetLoginButtons[0]);
return;
}
// -- Uni-Mail --
// surfmail.rrz.uni-hamburg.de
let surfmailLogInLoginButton = document.getElementById("login-button");
if (surfmailLogInLoginButton) {
let pwdInput = document.getElementById("horde_pass");
checkPwdLogin(pwdInput, surfmailLogInLoginButton);
return;
}
}, false);
})();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment