Delay manual snapshot refresh
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const SNAPSHOT_REFRESH_DELAY_MS = 2000;
|
||||
|
||||
function formatRemaining(totalSeconds) {
|
||||
const seconds = Math.max(0, Math.ceil(totalSeconds));
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
@@ -122,7 +124,9 @@ function refreshSnapshot(button) {
|
||||
button.setAttribute("aria-busy", "true");
|
||||
image.addEventListener("load", cleanup, { once: true });
|
||||
image.addEventListener("error", cleanup, { once: true });
|
||||
image.src = url.toString();
|
||||
window.setTimeout(() => {
|
||||
image.src = url.toString();
|
||||
}, SNAPSHOT_REFRESH_DELAY_MS);
|
||||
}
|
||||
|
||||
document.addEventListener("click", (event) => {
|
||||
|
||||
Reference in New Issue
Block a user