help
This commit is contained in:
parent
748abddde9
commit
055fb8a9af
10
index.html
10
index.html
@ -407,11 +407,11 @@
|
|||||||
Amogus
|
Amogus
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var myVar = setInterval(function() {myTimer();}, 10);
|
var myVar2 = setInterval(function() {myTimer();}, 10);
|
||||||
var previousValue;
|
var previousValue2;
|
||||||
function myTimer() {
|
function myTimer() {
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
if(Math.floor(d.getMilliseconds() + 1000 * (d.getSeconds() % 2)/400) != previousValue){
|
if(Math.floor(d.getMilliseconds() + 1000 * (d.getSeconds() % 2)/400) != previousValue2){
|
||||||
if(document.getElementById("negclock").isCringe == false){
|
if(document.getElementById("negclock").isCringe == false){
|
||||||
document.getElementById("negclock").isCringe = true;
|
document.getElementById("negclock").isCringe = true;
|
||||||
document.getElementById("negclock").style.color = "#ff0000";
|
document.getElementById("negclock").style.color = "#ff0000";
|
||||||
@ -422,8 +422,8 @@
|
|||||||
document.getElementById("negclock").style.backgroundColor = "#ff0000";
|
document.getElementById("negclock").style.backgroundColor = "#ff0000";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
previousValue = Math.floor(d.getMilliseconds() + 1000 * (d.getSeconds() % 2)/400);
|
previousValue2 = Math.floor(d.getMilliseconds() + 1000 * (d.getSeconds() % 2)/400);
|
||||||
document.getElementById("negclock").innerHTML = (365 - d.getDays().toString().padStart(3, '0')) + " - " + d.getHours().toString().padStart(2, '0') + ":" + d.getMinutes().toString().padStart(2, '0') + ":" + d.getSeconds().toString().padStart(2, '0') + "." + d.getMilliseconds().toString().padStart(3, '0');
|
document.getElementById("negclock").innerHTML = (365 - d.getDays()).toString().padStart(3, '0') + " - " + d.getHours().toString().padStart(2, '0') + ":" + d.getMinutes().toString().padStart(2, '0') + ":" + d.getSeconds().toString().padStart(2, '0') + "." + d.getMilliseconds().toString().padStart(3, '0');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user