Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • 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