Add a function for easily testing the background timing
This commit is contained in:
parent
b05337e1ca
commit
9a66a9c101
|
@ -45,3 +45,12 @@ function setBackground(num) {
|
||||||
$(".navbar-toggler").removeClass("toggler-bg-light btn-light").addClass("toggler-bg-dark btn-dark");
|
$(".navbar-toggler").removeClass("toggler-bg-light btn-light").addClass("toggler-bg-dark btn-dark");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setBackgroundByTime(hours, mins) {
|
||||||
|
var total = (hours * 60) + mins;
|
||||||
|
|
||||||
|
var period = (24 / backgroundList.length) * 60; // in minutes
|
||||||
|
|
||||||
|
var index = Math.floor(total / period);
|
||||||
|
setBackground(index);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue