Address more codacy complaints

This commit is contained in:
Promofaux
2017-02-18 01:04:10 +00:00
parent b38808b76a
commit a6439d8165

View File

@@ -63,13 +63,7 @@ function piholeChange(action, duration)
//The following three functions allow us to display time until pi-hole is enabled after disabling.
//Works between all pages
$( document ).ready(function() {
var countDownTarget = localStorage.getItem("countDownTarget");
if (countDownTarget != null)
{
setTimeout(countDown,1000);
}
});
function setCountdownTarget(seconds){
var target = new Date();
@@ -98,10 +92,18 @@ function countDown(){
{
ena.text("Enable");
piholeChanged("enabled");
localStorage.removeItem("countDownTarget")
localStorage.removeItem("countDownTarget");
}
}
$( document ).ready(function() {
var countDownTarget = localStorage.getItem("countDownTarget");
if (countDownTarget != null)
{
setTimeout(countDown,1000);
}
});
// Handle Enable/Disable
$("#pihole-enable").on("click", function(e){
e.preventDefault();