Last active
May 18, 2023 17:22
-
-
Save Whitecx/d9c3019998137f61575f959f4c59ed56 to your computer and use it in GitHub Desktop.
A chrome snippet for auto-refreshing cloudformation stacks (only for a specific stack, not the list of stacks)
This file contains 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
//Returns a promise that resolves after a setTimeout wait period of "seconds" | |
const wait = async (seconds = 1)=> { | |
seconds *= 1000; | |
return new Promise((resolve, reject) => { setTimeout(resolve, seconds)}); | |
} | |
//Targets the second stacks refresh button (the one when a stack is being viewed) and clicks it on a loop | |
const runStackRefresh = async () =>{ | |
const stackRefreshBtn = document.getElementsByClassName("stacks-refresh-button")[1]; | |
while(true){ | |
stackRefreshBtn.click(); | |
await wait(); | |
} | |
} | |
runStackRefresh(); | |
/* | |
Could refactor to be more dynamic of any useful refresh button | |
Would work better as a chrome extension for automatically running when in cloudformation via the console | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment