auto-scaling | title | theme | author | marp | class |
---|---|---|---|---|---|
true |
CDDO / Future of Cloud / Azure 2.0 |
themes/cddo |
Chris Nesbitt-Smith |
true |
lead |
George Box 1976
<script> const countdowner = function (endTime, element) { var difference = endTime - Date.now(); var minutes = Math.floor(difference / 60000); var seconds = Math.floor((difference % 60000) / 1000); var formattedDifference = minutes.toString().padStart(2, '0') + ':' + seconds.toString().padStart(2, '0'); if (Math.min(difference, 0)) { return; } element.innerHTML = formattedDifference; } var countdown; const startTimer = function(element) { const mins = parseInt(element.getAttribute('time')); const endTime = Date.now() + (mins*60*1000); clearInterval(countdown); countdown = setInterval(countdowner, 100, endTime, element) } const observer = new IntersectionObserver(function(entries, observer) { entries.forEach(function(entry) { if (entry.isIntersecting) { startTimer(entry.target); } }); }, { threshold: [0.1] }); document.querySelectorAll('.countdowntimer').forEach(function(element) { observer.observe(element); }) document.querySelectorAll('section.lava').forEach(function(element) { element.innerHTML += '
'
})
</script>