Created
February 7, 2022 03:11
-
-
Save tkanarsky/b02d706f7972d3ae96bd899b039ec416 to your computer and use it in GitHub Desktop.
Overwrites gradescope login button to take you directly to university's SAML page instead of login modal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Gradescope UCLA Login | |
// @version 1 | |
// @grant none | |
// @include https://www.gradescope.com/ | |
// ==/UserScript== | |
window.addEventListener('load', function() { | |
let button = document.getElementsByClassName("js-logInButton")[0]; | |
button.replaceWith(button.cloneNode(true)); // get rid of existing event handlers | |
let newButton = document.getElementsByClassName("js-logInButton")[0]; | |
newButton.onclick = function() { location.href = 'https://www.gradescope.com/auth/saml/ucla'; } | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment