From a30d23c210517304c6ff18074c151acc3d95453a Mon Sep 17 00:00:00 2001 From: Fullperm Alpha Date: Mon, 23 Sep 2024 15:23:36 +0200 Subject: [PATCH] Update online.html --- online.html | 56 ++++++++++++++++------------------------------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/online.html b/online.html index 3b1b011..ea16bdc 100644 --- a/online.html +++ b/online.html @@ -1,40 +1,18 @@ - - - - - - Online Count - - - -
Loading...
+ - - + fetch(proxyUrl + targetUrl) + .then(response => response.text()) + .then(data => { + const lines = data.split('\n'); + const lastLine = lines[lines.length - 1].trim(); + const parts = lastLine.split(' '); + const count = parts[1]; // The second part should be the number + document.getElementById('count').textContent = `People online: ${count}`; + }) + .catch(error => { + document.getElementById('count').textContent = 'Error loading data'; + console.error('Error fetching data:', error); + }); +