lefuturiste
9002086180
fix: home nav icon spacing fix: various typos correction fix: right email texts
1 line
No EOL
908 B
JavaScript
1 line
No EOL
908 B
JavaScript
const countdown=document.getElementById("countdown"),counter=document.getElementById("counter"),daysContainer=document.getElementById("days"),hoursContainer=document.getElementById("hours"),minutesContainer=document.getElementById("minutes"),secondsContainer=document.getElementById("seconds");let shown=!1;const enableReload=-1===window.location.pathname.indexOf("c");function render(){let e=new Date,n=openDate-e;var t=Math.floor(n/864e5),o=Math.floor(n%864e5/36e5),a=Math.floor(n%36e5/6e4),d=Math.floor(n%6e4/1e3);t=String(t).length>=2?t:"0"+t,o=String(o).length>=2?o:"0"+o,a=String(a).length>=2?a:"0"+a,d=String(d).length>=2?d:"0"+d,openDate<=e&&enableReload?window.location.reload(!1):(daysContainer.textContent=t,hoursContainer.textContent=o,minutesContainer.textContent=a,secondsContainer.textContent=d),shown||setTimeout(()=>{countdown.style.opacity=1,shown=!0},300)}render(),setInterval(render,1e3); |