Only portrait mode is currently supported - please rotate your device.
Page History
...
HTML |
---|
<script> const showPastWatchIndicators = () => { let pastEvents = document.getElementById('scroll-section-3'); let pastCards = Array.from(pastEvents.getElementsByClassName('eventcard')); for (let i = 0; i < pastCards.length; i++) { let currCard = pastCards[i]; let liveEl = document.createElement("div"); liveEl.classList.add('watch-indicator'); liveEl.innerText = "WATCH EVENTRECORDED"; currCard.insertAdjacentElement('afterbegin', liveEl); } } const getMinutesUntilEventStart = (startDate) => { let nowDate = new Date(); let eventStartDate = new Date(startDate); let diffMilliseconds = eventStartDate.getTime() - nowDate.getTime(); let diffMinutes = (diffMilliseconds / 60000); return diffMinutes; } window.addEventListener('load', () => { let upcomingEvents = document.getElementById('scroll-section-1'); let upcomingCards = Array.from(upcomingEvents.getElementsByClassName('eventcard')); for (let i = 0; i < upcomingCards.length; i++) { let currCard = upcomingCards[i]; let currCardStart = currCard.dataset.startdate; let minsTilStart = getMinutesUntilEventStart(currCardStart); if (minsTilStart <= 0) { let liveEl = document.createElement("div"); liveEl.classList.add('live-circle'); liveEl.innerText = "LIVE"; currCard.insertAdjacentElement('afterbegin', liveEl); } } if (AJS.params.remoteUser == "alex@gsvlabs.com") { showPastWatchIndicators() } }); </script> <style> .live-circle { font-size: 13px; padding: 3px 13px; text-transform: uppercase; font-weight: bold; background-color: #cc1f1f; color: white; position: absolute; z-index: 2; margin: 8px 8px; box-shadow: 1px 1px 5px #00000054; } </style> <script> if (AJS.params.remoteUser == "alex@gsvlabs.com") { // #7ac1b6 } </script> <style> .watch-indicator { font-size: 13px; padding: 3px 13px; text-transform: uppercase; font-weight: bold; background-color: #7ac1b6; color: white; position: absolute; z-index: 2; margin: 8px 8px; box-shadow: 1px 1px 5px #00000054; border-radius: 3px; } </style> |