Skip to content

Commit

Permalink
Fix successful temperature notification (#2537)
Browse files Browse the repository at this point in the history
  • Loading branch information
yubiuser authored Feb 26, 2023
2 parents 59e1a6f + 60883eb commit 4f0c309
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/pi-hole/js/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Please see LICENSE file for your rights under this license. */

/* global utils:false */

//The following functions allow us to display time until pi-hole is enabled after disabling.
//Works between all pages

Expand Down Expand Up @@ -185,8 +186,9 @@ function initCPUtemp() {
var token = encodeURIComponent($("#token").text());
$.getJSON("api.php?setTempUnit=" + unit + "&token=" + token, function (data) {
if (showmsg === true) {
utils.showAlert("info", "", "Setting temperature unit...");
if ("result" in data && data.result === "success") {
utils.showAlert("success", "", "Temperature unit set to " + unit, "");
utils.showAlert("success", "far fa-check-circle", "Temperature unit set to " + unit, "");
} else {
utils.showAlert("error", "", "", "Temperature unit not set");
}
Expand Down

0 comments on commit 4f0c309

Please sign in to comment.