From 9d728263daa6c44244a47c1ab9711c8692581ec0 Mon Sep 17 00:00:00 2001
From: kollucharan <132676020+kollucharan@users.noreply.github.com>
Date: Fri, 28 Feb 2025 18:09:09 +0530
Subject: [PATCH 1/2] worked on scroll bar ,reduced height of header
---
docker/standalone.php | 274 ++++++++++++++++++++++++------------------
index.html | 90 ++++++++++----
2 files changed, 219 insertions(+), 145 deletions(-)
diff --git a/docker/standalone.php b/docker/standalone.php
index e4367ffb7..bfe5c550b 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));
@@ -186,6 +187,8 @@ function updateJitterColor(value) {
//UI CODE
var uiData = null;
+
+
function startStop() {
flag = false;
@@ -237,6 +240,7 @@ function startStop() {
I("resultsURL").value = shareURL;
I("testId").innerHTML = testId;
I("shareArea").style.display = "";
+
}
} catch (e) { }
}
@@ -301,14 +305,11 @@ 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 +318,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,38 +378,58 @@ 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);
+
+ }
+
+
+
Talview Speedtest
@@ -798,7 +833,7 @@ function clearmessage() {
-
+
Share results
@@ -871,6 +906,7 @@ function clearmessage() {
setTimeout(function () {
initUI();
}, 100);
+