Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// ==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