-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscript.min.js
More file actions
1 lines (1 loc) · 1.83 KB
/
Copy pathscript.min.js
File metadata and controls
1 lines (1 loc) · 1.83 KB
1
(() => { let e, t = new Date(2023, 0, 27, 21); function l() { e = window.innerHeight } function n() { let e = Math.floor((t - Date.now()) / 1e3), l = Math.floor(e / 60), n = Math.floor(l / 60), o = Math.floor(n / 24); return n -= 24 * o, l = l - 1440 * o - 60 * n, e = e - 86400 * o - 3600 * n - 60 * l, { days: o, hours: n, minutes: l, seconds: e } } l(); let o = document.getElementById("about_scroll"); o.addEventListener("click", () => { document.getElementById("schedule").scrollIntoView() }); let r = null, a = document.getElementById("start_content").offsetTop + document.getElementById("start_content").scrollHeight / 2 - e / 2, y = document.getElementById("start_sponsor").offsetTop + document.getElementById("start_sponsor").scrollHeight / 2 - e, s = !1, d = new Vivus("bg-0", { type: "delayed", duration: 200, start: "manual" }), $ = new Vivus("bg-1", { type: "delayed", duration: 200, start: "manual" }), i = new Vivus("bg-2", { type: "delayed", duration: 200, start: "manual" });[...document.querySelectorAll("svg")].forEach(e => { e.style.opacity = 1 }); let u = document.getElementById("bg-half-transparent"); document.getElementById("cdown_days"), document.getElementById("cdown_hours"), document.getElementById("cdown_minutes"), document.getElementById("cdown_seconds"), setInterval(() => { let t = scrollY; if (u.style.opacity = t / e, o.style.opacity = t <= 0 ? 1 : 1 / t * 30, !s) { if (t < a) { if (r !== d) { if (null == r) { d.play(1, () => { s = !1 }), r = d; return } s = !0, r.play(-4, () => { s = !1 }), r = null } return } if (t > y) { if (r !== i) { if (null == r) { i.play(1, () => { s = !1 }), r = i; return } s = !0, r.play(-4, () => { s = !1 }), r = null } return } if (r !== $) { if (null == r) { $.play(1, () => { s = !1 }), r = $; return } s = !0, r.play(-4, () => { s = !1 }), r = null } } }, 100), window.onresize = () => { l() } })();