From 9221d8a5e74c8c39bae44b15e8f969e7103ed3d0 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 3 Jan 2017 13:44:24 +0100 Subject: [PATCH 1/2] Avoid double " --- scripts/pi-hole/php/header.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index b5c1b66b7..cc2c87141 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -293,33 +293,33 @@ ?>
$nproc) { - echo '#FF0000'; + echo "#FF0000"; } else { - echo '#7FFF00'; + echo "#7FFF00"; } - echo '""> Load:  ' . $loaddata[0] . '  ' . $loaddata[1] . '  '. $loaddata[2] . ''; + echo "\"> Load:  " . $loaddata[0] . "  " . $loaddata[1] . "  ". $loaddata[2] . ""; ?>
0.75 || $memory_usage < 0.0) { - echo '#FF0000'; + echo "#FF0000"; } else { - echo '#7FFF00'; + echo "#7FFF00"; } if($memory_usage > 0.0) { - echo '""> Memory usage:  ' . sprintf("%.1f",100.0*$memory_usage) . '%'; + echo "\"> Memory usage:  " . sprintf("%.1f",100.0*$memory_usage) . "%"; } else { - echo '""> Memory usage:   N/A'; + echo "\"> Memory usage:   N/A"; } ?> From 5d0da1a8eb30b6bc39c9e93ebbc61a50bdbe82ef Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 3 Jan 2017 13:48:02 +0100 Subject: [PATCH 2/2] Fix JS inconsistency that is tolerated by FF and Chrome but not IE --- scripts/pi-hole/js/footer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index e59beed3f..ce6401551 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -40,7 +40,7 @@ function piholeChange(action, duration) case "enable": btnStatus = $("#flip-status-enable"); btnStatus.html(" "); - $.getJSON("api.php?enable&token=" + token, (data) => { + $.getJSON("api.php?enable&token=" + token, function(data) { if(data.status === "enabled") { btnStatus.html(""); piholeChanged("enabled"); @@ -51,7 +51,7 @@ function piholeChange(action, duration) case "disable": btnStatus = $("#flip-status-disable"); btnStatus.html(" "); - $.getJSON("api.php?disable=" + duration + "&token=" + token, (data) => { + $.getJSON("api.php?disable=" + duration + "&token=" + token, function(data) { if(data.status === "disabled") { btnStatus.html(""); piholeChanged("disabled");