Skip to content

Instantly share code, notes, and snippets.

@AdrianAcala
Created February 15, 2019 00:17
Show Gist options
  • Save AdrianAcala/f6f32a0e9e0cab7d1220e41ad84dd494 to your computer and use it in GitHub Desktop.
Save AdrianAcala/f6f32a0e9e0cab7d1220e41ad84dd494 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Auto Click Through AWS SAML
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Cause laziness runs the world.
// @author aacala
// @match https://signin.aws.amazon.com/saml
// @grant none
// @require http://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==
(function() {
'use strict';
$('input[type="radio"]').click(function(){
if ($(this).is(':checked'))
{
document.getElementById("signin_button").click();
}
});
})();
@AdrianAcala
Copy link
Author

Do you really need jquery for this? Isn't this all supported with Vanilla.JS... ( aka the built in part of JS in all browsers )

parody site here: http://vanilla-js.com/

Dax, you're right. I could have optimized it. I don't write Javascript every day or even every month so I didn't know off the top of my head how to get this going so I had to look it up. This worked great and for this use case, I believe done is better than good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment