mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Address more codacy complaints
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user