Skip to content

Instantly share code, notes, and snippets.

@sj26
Last active October 19, 2023 00:18
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 sj26/98b65fc0409f5a681d98f403da893edf to your computer and use it in GitHub Desktop.
Save sj26/98b65fc0409f5a681d98f403da893edf to your computer and use it in GitHub Desktop.
I'm tired of clicking SSO buttons on Buildkite.com
// ==UserScript==
// @name buildkite-automatic-sso
// @description I'm tired of clicking SSO buttons on buildkite.com
// @match https://buildkite.com/*
// @run-at document-idle
// ==/UserScript==
if (document.title.match(/^Authorization Required:/)) {
document.querySelector("input[type=submit][value^='Sign in to your'], input[type=submit][value^='Continue with']").click();
}
// ==UserScript==
// @name google-buildkite-automatic-sso
// @description Automatically sign in to buildkite.com with @buildkite.com google account
// @match https://accounts.google.com/*
// @run-at document-idle
// ==/UserScript==
if (document.title.startsWith('Sign in')) {
console.log('[google-buildkite-automatic-sso] maybe I should pick an account for you?')
}
if (document.querySelector('[data-destination-info="Choosing an account will redirect you to: https://buildkite.com"]')) {
document.querySelector('[data-identifier$="@buildkite.com"]').click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment