Created
September 13, 2016 11:04
-
-
Save ryotarai/45d2f7b7ecf4ffb0b610782bd3f4a422 to your computer and use it in GitHub Desktop.
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 Console Header Color | |
// @namespace http://ryotarai.info/ | |
// @version 0.1 | |
// @description Change color of header | |
// @author Ryota Arai | |
// @match https://*.console.aws.amazon.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var role = document.querySelector(".awsc-switched-role-username-wrapper .nav-elt-label"); | |
if (!role) { | |
var background = "#a00"; | |
document.querySelector("#nav-menubar").style.background = background; | |
var e = document.querySelectorAll(".nav-menu"); | |
for (var i = 0; i < e.length; i++) { | |
e[i].style.background = background; | |
} | |
} else { | |
// role.title == "ROLE @ ACCOUNT" | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment