Last active
April 16, 2025 13:23
-
-
Save affix/0f37f44a82488ec4137de9a9a62c14c7 to your computer and use it in GitHub Desktop.
A greesemonkey/tampermonkey/*monkey script to automatically login to github orgs using SSO
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 Github Auto SSO | |
// @namespace Violentmonkey Scripts | |
// @match https://github.com/* | |
// @grant none | |
// @version 1.0.2 | |
// @author Keiran Smith <[email protected]> | |
// @description 26/07/2021, 09:05:17 | |
// ==/UserScript== | |
var isSSOPage = window.location.href.indexOf("sso") > 0 | |
document.querySelectorAll("a").forEach((d)=>{ | |
if(/orgs\/.*\/sso/g.test(d.href) && !isSSOPage) { | |
window.location.href = d.href; | |
} | |
}) | |
if(isSSOPage) { | |
document.querySelector(".btn-primary").click(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment