diff --git a/docker/standalone.php b/docker/standalone.php
index e4367ffb7..ccde3cd28 100755
--- a/docker/standalone.php
+++ b/docker/standalone.php
@@ -46,6 +46,7 @@ function I(i) { return document.getElementById(i); }
Close apps that you don't need, as they can slow down your connection.
Make sure no one else is using the internet while you're testing. Things like watching/ video streaming will slow down the connection.
`;
+ let tempObserver;
function mbpsToAmount(s) {
return 1 - 1 / Math.pow(1.3, Math.sqrt(s));
@@ -187,6 +188,8 @@ function updateJitterColor(value) {
//UI CODE
var uiData = null;
+
+
function startStop() {
flag = false;
flag2 = false;
@@ -237,6 +240,7 @@ function startStop() {
I("resultsURL").value = shareURL;
I("testId").innerHTML = testId;
I("shareArea").style.display = "";
+
}
} catch (e) { }
}
@@ -301,14 +305,10 @@ function initUI() {
I("pingText").textContent = "";
I("jitText").textContent = "";
}
-
function ToShowStatus() {
-
-
I("statusMessage").classList.remove("Loader");
-
message = "";
-
+ observeResults();
if (uiData?.dlStatus < 1 && uiData?.ulStatus < 1) {
message =
"Upload and download speeds are below the recommended threshold";
@@ -317,7 +317,7 @@ function ToShowStatus() {
message = "Your Download Speed is less than recommended threshold";
flag2 = true;
} else if (uiData?.ulStatus < 1) {
- message = " Your Upload Speed is less than recommended threshold";
+ message = "Your Upload Speed is less than recommended threshold";
flag2 = true;
}
@@ -377,14 +377,31 @@ function ToShowStatus() {
if (flag) I("statusMessage").classList.add("success");
if (!flag) I("statusMessage").classList.add("alert-danger");
- }
+ }
function clearmessage() {
-
-
I("statusMessage").innerHTML = "";
I("statusMessage").classList.remove("alert-danger");
}
+
+ function observeResults() {
+ const Section = document.getElementById("startStopBtn");
+ if (!Section) return;
+
+ let bodyElement = document.body;
+ tempObserver = new ResizeObserver(() => {
+
+ Section.scrollIntoView({ behavior: "smooth" });
+
+ tempObserver.disconnect();
+ tempObserver = null;
+ });
+ tempObserver.observe(bodyElement);
+
+ }
+
+
+