Skip to content

Instantly share code, notes, and snippets.

@arthurlockman
Created August 15, 2025 21:43
Show Gist options
  • Save arthurlockman/f17b6fbc841fae70a4b82ed8096523ce to your computer and use it in GitHub Desktop.
Save arthurlockman/f17b6fbc841fae70a4b82ed8096523ce to your computer and use it in GitHub Desktop.
Auto-click GitHub SSO
// ==UserScript==
// @name Auto-click GitHub SSO
// @namespace github-sso-auto
// @version 1.0
// @description Automatically click "Single sign-on" and "Continue" buttons on GitHub
// @author You
// @match https://*.github.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Auto-click "Single sign-on" link
const links = document.getElementsByTagName('a');
for (let i = 0; i < links.length; i++) {
if (links[i].textContent.includes('Single sign-on')) {
links[i].click();
break;
}
}
// Auto-click "Continue" button
const buttons = document.getElementsByTagName('button');
for (let i = 0; i < buttons.length; i++) {
const isPrimaryButton = (
(buttons[i].classList.contains('Button--primary') && buttons[i].classList.contains('Button')) ||
(buttons[i].classList.contains('btn-primary') && buttons[i].classList.contains('btn') && buttons[i].classList.contains('btn-block'))
);
if (isPrimaryButton && buttons[i].textContent.includes('Continue')) {
buttons[i].click();
break;
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment