Created
March 12, 2024 16:11
-
-
Save hjdarnel/d014de4c9f9361ac656a441525f6b503 to your computer and use it in GitHub Desktop.
GreaseMonkey/TamperMonkey script to put input focus on the Confirm/continue button for AWS CLI SSO login
This file contains 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 AWS SSO Focus Confirm and Continue button | |
// @version 1.0.1 | |
// @description Focus authorize allow button when confirming AWS CLI SSO code | |
// @downloadURL https://gist.github.com/hjdarnel/d014de4c9f9361ac656a441525f6b503/raw/focus-aws-sso-code-confirm-allow.user.js | |
// @updateURL https://gist.github.com/hjdarnel/d014de4c9f9361ac656a441525f6b503/raw/focus-aws-sso-code-confirm-allow.user.js | |
// @author Henry Darnell @hjdarnel | |
// @match https://device.sso.us-east-1.amazonaws.com/* | |
// @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_verification_btn"); | |
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