Skip to content

Instantly share code, notes, and snippets.

@FloStar3000
Last active August 14, 2022 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FloStar3000/621d09ba5027bc846024f26c823187d9 to your computer and use it in GitHub Desktop.
Save FloStar3000/621d09ba5027bc846024f26c823187d9 to your computer and use it in GitHub Desktop.
TH Bingen (Olat) Auto-click on sign in button

Use the Tampermonkey Plugin: https://www.tampermonkey.net Firefox: https://addons.mozilla.org/de/firefox/addon/tampermonkey/

For the olat.vcrp.de page, on the first page visit the script will not work because you have to select your school. For the Password Prompt: A password manager (like LastPass or Bitwarden) is needed that auto-fills the password on page load.

On the OLAT front page

// ==UserScript==
// @name         Auto-Click Olat Front Page
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://olat.vcrp.de/dmz/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=vcrp.de
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
     setTimeout(()=>{
         const button = document.querySelector('#idpSelectListButton')
         button.click()
     },500)
})();

On the TH Bingen Password Prompt:

// ==UserScript==
// @name         Auto Click TH Bingen Login
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://login.th-bingen.de/idp/profile/SAML2/Redirect/SSO*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=th-bingen.de
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    setInterval(()=>{
        const passwordInput = document.querySelector('#password');
        if(passwordInput.value.length > 0){
            const button = document.querySelector('button.form-element');
            button.click()
        }
    },1000)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment