From 9a6429fb85cf1a9d7fe28abd1e2b023a93a5a136 Mon Sep 17 00:00:00 2001 From: ipitio <21136719+ipitio@users.noreply.github.com> Date: Sat, 13 Apr 2024 22:13:36 -0400 Subject: [PATCH] pretty --- scripts/pi-hole/js/settings.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index be8830daf..2e0d60976 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -608,7 +608,10 @@ $(function () { const lastRun = data?.data; let lastRunText = "Latest run is unavailable"; if (lastRun) { - lastRunText = `\nLatest run:\n${lastRun.replace(/["{},]/g, "").replace(/\n\s*\n/g, "\n").replace(/^\n+|\s+$/g, "")}`; + lastRunText = `\nLatest run:\n${lastRun + .replace(/["{},]/g, "") + .replace(/\n\s*\n/g, "\n") + .replace(/^\n+|\s+$/g, "")}`; } const statusText = `Using ${speedtestVersion} CLI\nSchedule is ${scheduleStatusText}\nNext run is${triggerText}\n${lastRunText}`; @@ -829,7 +832,7 @@ $(function () { if (speedtestUninstall.attr("value")) { newClass = (didFlush && speedtestDelete.attr("value")) || - (historyExists && !speedtestDelete.attr("value")) + (historyExists && !speedtestDelete.attr("value")) ? colorClasses[1] : colorClasses[2]; } else if (speedtestDelete.attr("value")) {