Last active
June 22, 2017 19:47
-
-
Save RichardBronosky/952fb6477969067b42dc39a5aff02787 to your computer and use it in GitHub Desktop.
This greasemonkey script changes the page title from "AWS Management Console" to "vpc - subnets" (or whatever is correct)
This file contains hidden or 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 title changer | |
// @description Change page title on AWS Management Console | |
// @namespace dev.sheile.net | |
// @include https://console.aws.amazon.com/* | |
// @include https://*.console.aws.amazon.com/* | |
// @version 1 | |
// ==/UserScript== | |
(function() { | |
setInterval(refreshTitle, 1000); | |
refreshTitle(); | |
var previous = ""; | |
function refreshTitle() { | |
if(previous == location.href) return; | |
previous = location.href; | |
var matches = location.href.match(/https:\/\/([^.]*\.)console\.aws\.amazon\.com\/([^/]+)\//); | |
if(matches.length < 3) return; | |
var service = matches[2].toLowerCase(); | |
var feature = location.hash.match(/[#&]([^:]*)/)[1].toLowerCase().split("/").pop(); | |
document.getElementsByTagName("title")[0].textContent = service + " - " + feature; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment