blob: dad6ec4d8403fa50eca1066c8a83f5f2d33396ad (
plain)
- (function() {
- // UTC milliseconds since 1970
- // Example conversion: date --date 2017-05-16T17:00Z+2 +%s000
- var SHOWTIME = new Date(1494946800000),
- DEMO_PAST = 'Last FREE Live Webinar began',
- DEMO_CURRENT = 'FREE Live Webinar began',
- DEMO_FUTURE = 'Next FREE Live Webinar begins';
- function update() {
- var ts = countdown(SHOWTIME, null);
- var counter = document.getElementById('counter'),
- msg = ts.toHTML('strong', null);
- msg = (ts.value > 0) ?
- DEMO_PAST+' '+msg+' ago!' :
- DEMO_FUTURE+' in '+msg+'!';
- counter.innerHTML = msg;
- requestAnimationFrame(update, counter.parentNode);
- }
- update();
- })();
|