Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Uni-Hamburg-Auto-Logins
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gohrbandt, Jan
Uni-Hamburg-Auto-Logins
Commits
c101c0c7
Unverified
Commit
c101c0c7
authored
1 year ago
by
Jan
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Added new site & changed script name
parent
9ab4f4e2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Uni Hamburg Moodle Auto Login.user.js
+33
-13
33 additions, 13 deletions
Uni Hamburg Moodle Auto Login.user.js
with
33 additions
and
13 deletions
Uni Hamburg Moodle Auto Login.user.js
+
33
−
13
View file @
c101c0c7
// ==UserScript==
// @name Uni Hamburg
Moodle
Auto Login
// @name:de Uni
-
Hamburg
-Moodle
Auto-Login
// @name Uni Hamburg Auto Login
s
// @name:de Uni
Hamburg Auto-Login
s
// @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 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
1
.0.
6
// @version
2
.0.
0
// @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
// @icon https://
www
.uni-hamburg.de/favicon
.ico
// @namespace https://github.com/Rsge
// @homepageURL https://github.com/Rsge/Uni-Hamburg-Moodle-Auto-Login
...
...
@@ -17,6 +17,7 @@
// @updateURL https://update.greasyfork.org/scripts/479165/Uni%20Hamburg%20Moodle%20Auto%20Login.user.js
// @match https://lernen.min.uni-hamburg.de/login/*
// @match https://www.openolat.uni-hamburg.de/dmz/*
// @match https://login.uni-hamburg.de/idp/*
// @run-at document-end
...
...
@@ -27,19 +28,38 @@
'
use strict
'
;
window
.
addEventListener
(
'
load
'
,
function
()
{
let
firstLoginButtonElements
=
document
.
getElementsByClassName
(
"
btn login-identityprovider-btn btn-primary btn-lg btn-block
"
);
if
(
firstLoginButtonElements
.
length
>
0
)
{
firstLoginButtonElements
[
0
].
click
();
// 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
;
}
let
secondLoginButtonElements
=
document
.
getElementsByClassName
(
"
form-element form-button
"
);
if
(
secondLoginButtonElements
.
length
>
0
)
{
// openolat.uni-hamburg.de
let
openOlatLoginButtonDivs
=
document
.
getElementsByClassName
(
"
o_block
"
);
if
(
openOlatLoginButtonDivs
.
length
>
0
)
{
let
openOlatLoginButton
=
openOlatLoginButtonDivs
[
0
].
firstElementChild
;
openOlatLoginButton
.
click
();
return
;
}
/*
let openOlatLoginVariantButton = document.getElementById("o_col_ShibGeneric");
if (openOlatLoginVariantButton) {
openOlatLoginVariantButton.click();
setTimeout(function() {
XXX
}
}, 800);
return;
}*/
// login.uni-hamburg.de
let
loginLoginButtons
=
document
.
getElementsByClassName
(
"
form-element form-button
"
);
if
(
loginLoginButtons
.
length
>
0
)
{
let
passwordInput
=
document
.
getElementById
(
"
password
"
);
if
(
passwordInput
?.
value
.
length
>
0
)
{
second
LoginButton
Element
s
[
0
].
click
();
login
LoginButtons
[
0
].
click
();
}
else
{
passwordInput
.
addEventListener
(
"
input
"
,
function
()
{
second
LoginButton
Element
s
[
0
].
click
();
login
LoginButtons
[
0
].
click
();
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment