update bauchbinde
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Florian Sorg 2020-12-28 16:24:17 +01:00
parent 7a8aa6a4d7
commit c374881274
1 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,8 @@
(() => { (() => {
const scheduleUrl = 'https://schedule2.broken.equipment/everything.schedule.json'; const scheduleUrl = 'https://schedule2.broken.equipment/everything.schedule.json';
let isFirstRun = true;
let autoIntro = false;
let data = null; let data = null;
let textEl; let textEl;
let headline = null; let headline = null;
@ -69,6 +71,9 @@
if (key === 'intro') { if (key === 'intro') {
isIntro = !!parseInt(value, 10) isIntro = !!parseInt(value, 10)
} }
if (key === 'autoIntro') {
autoIntro = !!parseInt(value, 10)
}
if (key === 'hold') { if (key === 'hold') {
holdDuration = parseInt(value, 10); holdDuration = parseInt(value, 10);
} }
@ -187,7 +192,7 @@
} }
async function animate() { async function animate() {
if (isIntro) { if (autoIntro ? isFirstRun : isIntro) {
await Promise.all([ await Promise.all([
slideIn(), slideIn(),
fadeInText(), fadeInText(),
@ -297,6 +302,7 @@
} }
if (interval) { if (interval) {
setTimeout(cycle, interval * 1000); setTimeout(cycle, interval * 1000);
isFirstRun = false;
} }
} }