您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows AWS account name in upper right of menu bar for a quick view of current context.
// ==UserScript== // @name AWS Console - Show AWS Account Name // @match https://*.console.aws.amazon.com/* // @grant none // @version 1.1 // @description Shows AWS account name in upper right of menu bar for a quick view of current context. // @author Bernd VanSkiver // @namespace https://greasyfork.org/users/1009418 // ==/UserScript== (function() { 'use strict'; // Function to check and update the account name function updateAccountName() { let accountrolespan = document.querySelector("#awsc-navigation__more-menu--list li:last-child div button span span:first-child"); // Check if the element exists and if its title starts with "AWSReservedSSO" if (accountrolespan && accountrolespan.getAttribute("title").startsWith("AWSReservedSSO")) { accountrolespan.innerHTML += " @ " + accountrolespan.getAttribute("title").split(" @ ")[1]; clearInterval(intervalId); // Stop checking once the update is applied } } // Set an interval to check for the element every second let intervalId = setInterval(updateAccountName, 1000); })();