mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
unicorn/no-lonely-if
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
@@ -106,10 +106,11 @@ function updateQueriesOverTime() {
|
||||
}
|
||||
|
||||
for (hour in data.ads_over_time[0]) {
|
||||
if (Object.prototype.hasOwnProperty.call(data.ads_over_time[0], hour)) {
|
||||
if (dates.indexOf(parseInt(data.ads_over_time[0][hour], 10)) === -1) {
|
||||
dates.push(parseInt(data.ads_over_time[0][hour], 10));
|
||||
}
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(data.ads_over_time[0], hour) &&
|
||||
dates.indexOf(parseInt(data.ads_over_time[0][hour], 10)) === -1
|
||||
) {
|
||||
dates.push(parseInt(data.ads_over_time[0][hour], 10));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function countDown() {
|
||||
var ena = $("#enableLabel");
|
||||
var enaT = $("#enableTimer");
|
||||
var target = new Date(parseInt(enaT.html(), 10));
|
||||
var seconds = Math.round((target.getTime() - Date.now() / 1000);
|
||||
var seconds = Math.round((target.getTime() - Date.now()) / 1000);
|
||||
|
||||
if (seconds > 0) {
|
||||
setTimeout(countDown, 1000);
|
||||
|
||||
@@ -31,7 +31,6 @@ function handleAjaxError(xhr, textStatus) {
|
||||
}
|
||||
|
||||
function getTimestamp() {
|
||||
|
||||
return Math.floor(Date.now() / 1000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user