Skip to content

Instantly share code, notes, and snippets.

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 hjdarnel/ef8417a63d2d5fb9e381e0301dc4ac02 to your computer and use it in GitHub Desktop.
Save hjdarnel/ef8417a63d2d5fb9e381e0301dc4ac02 to your computer and use it in GitHub Desktop.
GreaseMonkey/TamperMonkey script to put input focus on the Allow button for AWS CLI SSO login
// ==UserScript==
// @name AWS SSO Focus Allow button
// @version 1.0.5
// @description Focus authorize allow button when confirming AWS CLI SSO login
// @downloadURL https://gist.github.com/hjdarnel/ef8417a63d2d5fb9e381e0301dc4ac02/raw/focus-aws-sso-authorize-allow.user.js
// @updateURL https://gist.github.com/hjdarnel/ef8417a63d2d5fb9e381e0301dc4ac02/raw/focus-aws-sso-authorize-allow.user.js
// @author Gregory Seidman @gregory-seidman
// @match https://*.awsapps.com/start/*
// @icon https://www.google.com/s2/favicons?domain=awsapps.com
// @grant none
// ==/UserScript==
(function () {
"use strict";
var func;
func = function () {
const btn = document.getElementById("cli_login_button");
if (btn) {
btn.focus();
} else {
setTimeout(func, 300);
}
};
func();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment