Skip to content

Commit

Permalink
Merge pull request #421 from pi-hole/fix/disablepermanently
Browse files Browse the repository at this point in the history
Start count down only if there is something to count down
PromoFaux authored Mar 2, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents e310acd + 7729eea commit 3647df7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/pi-hole/js/footer.js
Original file line number Diff line number Diff line change
@@ -91,8 +91,11 @@ function piholeChange(action, duration)
if(data.status === "disabled") {
btnStatus.html("");
piholeChanged("disabled");
enaT.html(new Date().getTime() + duration * 1000);
setTimeout(countDown,100);
if(duration > 0)
{
enaT.html(new Date().getTime() + duration * 1000);
setTimeout(countDown,100);
}
}
});
break;

0 comments on commit 3647df7

Please sign in to comment.