Skip to content

Instantly share code, notes, and snippets.

@ryotarai
Created September 13, 2016 11:04
Show Gist options
  • Save ryotarai/45d2f7b7ecf4ffb0b610782bd3f4a422 to your computer and use it in GitHub Desktop.
Save ryotarai/45d2f7b7ecf4ffb0b610782bd3f4a422 to your computer and use it in GitHub Desktop.
// ==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