Skip to content

Instantly share code, notes, and snippets.

@haman29
Last active July 9, 2019 09:59
Show Gist options
  • Save haman29/4a6c0cb40679a6dfc6f7c2482ac3bb0c to your computer and use it in GitHub Desktop.
Save haman29/4a6c0cb40679a6dfc6f7c2482ac3bb0c to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hide danger buttons on AWS OpsWorks
// @namespace http://tampermonkey.net/
// @version 0.1
// @description OpsWorks の Start/StopAllInstances ボタンを隠す
// @author Kyohei Hamada
// @match https://console.aws.amazon.com/opsworks/home*
// @grant none
// ==/UserScript==
$(document).ready(function(){
'use strict';
var hide = function(){
var $start = $('button[data-action="StartAllInstances"]');
var $stop = $('button[data-action="StopAllInstances"]');
if ( $start.is(':visible') || $stop.is(':visible') ) {
$start.hide();
$stop.hide();
} else {
setTimeout(hide, 1000);
}
};
hide();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment