Skip to content

Instantly share code, notes, and snippets.

@bvanskiver
Last active January 9, 2023 16:36
Embed
What would you like to do?
// ==UserScript==
// @name AWS Console - Open All SSO Accounts
// @match https://*.awsapps.com/start*
// @grant none
// @version 1.0
// @author Bernd VanSkiver
// @description Open all accounts and roles on AWS Console SSO screen used by AWS IAM Identity Center.
// @homepage https://gist.github.com/bvanskiver/3093ded045b4c2db01fdc1601ef498ef
// ==/UserScript==
(function() {
'use strict';
let intv = setInterval(function() {
// Make sure the tags have loaded
if (document.getElementsByTagName("portal-application").length < 1) {
return false;
}
// Stop checking
clearInterval(intv);
// Open
document.getElementsByTagName("portal-application")[0].click();
Array.from(document.getElementsByClassName("instance-block")).forEach(x => x.click());
}, 100);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment