Skip to content

Instantly share code, notes, and snippets.

@tkanarsky
Created February 7, 2022 03:11
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 tkanarsky/b02d706f7972d3ae96bd899b039ec416 to your computer and use it in GitHub Desktop.
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
// ==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