From 9fa58e4b613c89ddbad0caf720fa42ea08f35bfb Mon Sep 17 00:00:00 2001 From: ipitio <21136719+ipitio@users.noreply.github.com> Date: Sun, 28 Apr 2024 04:18:47 -0400 Subject: [PATCH 1/3] better regex for librespeed --- scripts/pi-hole/js/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 84ce9ac93..bb3ee16da 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -617,7 +617,7 @@ $(function () { let lastRunText = "Latest run is unavailable"; if (lastRun) { lastRunText = `\nLatest run:\n${lastRun - .replaceAll(/["{},]/g, "") + .replaceAll(/[\[\]"{},]/g, "") .replaceAll(/\n\s*\n/g, "\n") .replaceAll(/^\n+|\s+$/g, "")}`; } From 03e43ae888ca9fb5f5b76a6c302d922fa520c6ca Mon Sep 17 00:00:00 2001 From: ipitio <21136719+ipitio@users.noreply.github.com> Date: Sun, 28 Apr 2024 06:28:36 -0400 Subject: [PATCH 2/3] use new lib script --- api_speedtest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_speedtest.php b/api_speedtest.php index 2edd70a45..80fcca65a 100644 --- a/api_speedtest.php +++ b/api_speedtest.php @@ -346,7 +346,7 @@ function getStatusCmd() function whichSpeedtest() { if (file_exists('/usr/bin/speedtest')) { - $officialInstalled = speedtestExecute('SKIP_MOD=true ; . /opt/pihole/speedtestmod/mod.sh ; notInstalled speedtest && echo "false" || echo "true"')['data']; + $officialInstalled = speedtestExecute('. /opt/pihole/speedtestmod/lib.sh ; notInstalled speedtest && echo "false" || echo "true"')['data']; if ($officialInstalled === 'true') { return 'official'; From ca29fc863adbc4d392512b4763b420be243729be Mon Sep 17 00:00:00 2001 From: ipitio <21136719+ipitio@users.noreply.github.com> Date: Tue, 30 Apr 2024 08:31:50 -0400 Subject: [PATCH 3/3] pretty --- scripts/pi-hole/js/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index bb3ee16da..586fb2265 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -617,7 +617,7 @@ $(function () { let lastRunText = "Latest run is unavailable"; if (lastRun) { lastRunText = `\nLatest run:\n${lastRun - .replaceAll(/[\[\]"{},]/g, "") + .replaceAll(/[[\]"{},]/g, "") .replaceAll(/\n\s*\n/g, "\n") .replaceAll(/^\n+|\s+$/g, "")}`; }