Skip to content

Commit

Permalink
pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Apr 14, 2024
1 parent ea66757 commit 9a6429f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/pi-hole/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")

Check failure on line 612 in scripts/pi-hole/js/settings.js

View workflow job for this annotation

GitHub Actions / Node

Prefer `String#replaceAll()` over `String#replace()`.
.replace(/\n\s*\n/g, "\n")

Check failure on line 613 in scripts/pi-hole/js/settings.js

View workflow job for this annotation

GitHub Actions / Node

Prefer `String#replaceAll()` over `String#replace()`.
.replace(/^\n+|\s+$/g, "")}`;

Check failure on line 614 in scripts/pi-hole/js/settings.js

View workflow job for this annotation

GitHub Actions / Node

Prefer `String#replaceAll()` over `String#replace()`.
}

const statusText = `Using ${speedtestVersion} CLI\nSchedule is ${scheduleStatusText}\nNext run is${triggerText}\n${lastRunText}`;
Expand Down Expand Up @@ -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")) {
Expand Down

0 comments on commit 9a6429f

Please sign in to comment.