Skip to content

Instantly share code, notes, and snippets.

@mtte
Last active October 13, 2022 11:17
Show Gist options
  • Select an option

  • Save mtte/1354bda93c0c8c68faff4f9ba6c5a9a5 to your computer and use it in GitHub Desktop.

Select an option

Save mtte/1354bda93c0c8c68faff4f9ba6c5a9a5 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name BFH Quick Login
// @namespace https://moodle.bfh.ch/local/bfh_dual_login/index.php
// @version 0.1
// @description Easy edu-ID login for BFH by skipping selection of university
// @author Kay Mattern <code@mtte.me>
// @match https://moodle.bfh.ch/local/bfh_dual_login/index.php*
// ==/UserScript==
(function() {
'use strict';
const organisationSelect = document.querySelector('#user_idp');
const rememberCB = document.querySelector('#wayf_remember_checkbox');
const form = document.querySelector('#IdPList');
organisationSelect.value = 'https://aai-logon.bfh.ch/idp/shibboleth';
rememberCB.checked = true;
form.submit();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment