Created
December 1, 2020 16:23
-
-
Save sylwit/9dd0a8e5ff419d38d3ade321e454a7a1 to your computer and use it in GitHub Desktop.
UserScript - AWS signin SAML - Name AWS account id
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 signin SAML | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Name AWS account id | |
// @author sylwit <sylvain.witmeyer@gmail.com> | |
// @match https://signin.aws.amazon.com/saml | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const accounts = { | |
'011111111111': 'app123', | |
'022222222222': 'app456', | |
}; | |
[...document.querySelectorAll('.saml-account-name')].forEach( el => { | |
const id = el.innerHTML.split(" ").splice(-1); | |
if (accounts[id]) { | |
el.innerHTML += ` - ${accounts[id]}`; | |
}; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment