Skip to content

Instantly share code, notes, and snippets.

@jamesinc
Last active June 5, 2022 22:36
Show Gist options
  • Save jamesinc/9bec28bac4f57743c3bdb4f1e531a0d9 to your computer and use it in GitHub Desktop.
Save jamesinc/9bec28bac4f57743c3bdb4f1e531a0d9 to your computer and use it in GitHub Desktop.
A Tampermonkey script to replace various AWS console service names with acronyms, so they take up less space in the shortcuts bar.
// ==UserScript==
// @name AWS UI scrubber
// @namespace https://github.com/jamesinc
// @version 1.5
// @description Make AWS Console shortcuts take up less space
// @author James Ducker
// @match https://*.console.aws.amazon.com/*
// @match https://phd.aws.amazon.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
var replaceLabel = function ( item ) {
switch (item.innerHTML) {
case "AWS Glue":
item.innerHTML = "Glue";
break;
case "CloudFormation":
item.innerHTML = "CFN";
break;
case "Elastic Container Service":
item.innerHTML = "ECS";
break;
case "Database Migration Service":
item.innerHTML = "DMS";
break;
case "Relational Database Service":
item.innerHTML = "RDS";
break;
case "Route 53":
item.innerHTML = "R53";
break;
case "Simple Email Service":
item.innerHTML = "SES";
break;
case "Simple Notification Service":
item.innerHTML = "SNS";
break;
case "Simple Queue Service":
item.innerHTML = "SQS";
break;
case "Lambda":
item.innerHTML = "λ";
break;
case "Certificate Manager":
item.innerHTML = "ACM";
break;
case "Systems Manager":
item.innerHTML = "SSM";
break;
}
};
var updateStyles = function ( ) {
var css = [
"#h #awsgnav #nav-home-link { display: none }",
"#h #awsgnav #nav-menubar { zoom: 0.85 }",
"#h #awsgnav #nav-menu-right { padding-right: 0 }",
"#awsgnav #resourceGroupsMenuContent { left: 125px }"
],
styleEl = document.createElement("style");
styleEl.type = "text/css";
if ( styleEl.styleSheet ) {
styleEl.styleSheet.cssText = css.join("\n");
} else {
styleEl.appendChild(document.createTextNode(css.join("\n")));
}
document.body.appendChild( styleEl );
};
updateStyles();
document.querySelectorAll(".service-label").forEach( replaceLabel );
window.dispatchEvent( new Event("resize") );
})();
@jamesinc
Copy link
Author

jamesinc commented Feb 8, 2018

@mwarkentin thanks, I added them in

@felipe1982
Copy link

I just found a page where the Scubber does not scrub. I think the domain is phd.aws.amazon.com

image

@jamesinc
Copy link
Author

jamesinc commented Aug 8, 2019

I just found a page where the Scubber does not scrub. I think the domain is phd.aws.amazon.com

image

Thanks, I have added a match directive for https://phd.aws.amazon.com/* in v1.5

@dfang
Copy link

dfang commented Jul 13, 2020

try this: http://github.com/dfang/aws-launcher
with alfred, you can access any service fast.

i'm looking for shortcuts like gmail, ? show help, u go to list,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment