Here's a quick little userscript that will make the result iframe invisible until the iframe loads with the response from stacksnippets.net, which should make it quite clear when the snippet is being reloaded.
edit: made snippets in the page proper behave the same way, rather than just changing the iframe in the snippet interface
// ==UserScript==
// @name Stack Snippet Status Indicator
// @description Blanks out the snippet result's iframe while it's loading
// @author CertainPerformance
// @version 1.1
// @match https://stackoverflow.com/questions/*
// @grant none
// ==/UserScript==
const fixIframe = (iframe) => {
iframe.style.visibility = 'hidden';
iframe.addEventListener(
'load',
() => {
iframe.style.removeProperty('visibility');
},
{ once: true }
);
};
document.addEventListener('click', ({ target }) => {
// While editing a snippet in the snippet interface,
// match the blue "Run" button or its descendant:
if (target.matches('#snpte-button-run, #snpte-button-run *')) {
const iframe = document.querySelector('#snpte-box-edit-result');
fixIframe(iframe);
}
// Match the blue "Run" button outside the snippet interface:
else if (target.matches('.snippet-ctas button:not(.hideResults), .snippet-ctas button:not(.hideResults) *')) {
const iframe = target.closest('.snippet-result').querySelector('iframe');
fixIframe(iframe);
}
});
stacksnippets.net/js
response comes back. (This would be accomplishable rather easily with a userscript)console.log(Date.now())
might be enough...