From b6cc48636e35d73209f1ea7ec6e27dd616b3179f Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 2 Dec 2024 01:45:36 -0800 Subject: [PATCH] Fix error when toggling Auto Refresh (#416) * Fix error when toggling Auto Refresh The clearTimeout call was using the wrong parameter, leading to the error "Uncaught ReferenceError: reload is not defined" * Update CHANGES --------- Co-authored-by: Tobias Oetiker --- CHANGES | 1 + htdocs/js/smokeping.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 44ed1392..c3484997 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,4 @@ + - fix error when toggling autorefresh @jlu5 - Support parsing IPv6 output in OpenSSHJunOSPing Plugin @zimage - Enhancement to SSHProbe allows specification of IPv4 vs IPv6 transport, #385 - InfluxDB 2.x v1 (compatibility) api doesn't set the "WWW-Authenticate" header (violating rfc7235). diff --git a/htdocs/js/smokeping.js b/htdocs/js/smokeping.js index e2fd655f..92ee7489 100644 --- a/htdocs/js/smokeping.js +++ b/htdocs/js/smokeping.js @@ -150,7 +150,7 @@ Event.observe( }, window.options.step * 1000); $('refresh-button').style.textDecoration = "line-through"; } else { - clearTimeout(reload); + clearTimeout(refresh); localStorage.setItem("noRefresh", true); $('refresh-button').style.textDecoration = "none"; }