2
unknown
plain_text
4 years ago
590 B
7
Indexable
<script>
const endTime = <?=$vars['expiration_time']?>;
var countdown = setInterval(function(){
var current = Math.round(new Date().getTime()/1000);
if(current > endTime){
$("#label-time").text("00:00");
$(".timer").addClass("red_alert");
$('#time_alert_modal').modal('show');
clearInterval(countdown);
}else{
var label_time = new Date( (endTime - current) * 1000).toISOString().substr(14, 5);
$("#label-time").text(label_time);
}
},1000);
</script>Editor is loading...