window.addEventListener('load', () => { const getElement = function(cn) { return document.getElementsByClassName(cn.replace(/^\./, ''))[0]; } var spinner = document.getElementById('spinner'); if (spinner && spinner.style) { spinner.style.display = "none" } /* Loading *********************************************/ const delay = (ms) => { if (!window.Promise) { return { then(fn) { fn && fn(); } }; } return new window.Promise(resolve => setTimeout(resolve, ms)) }; const makeVisible = (selector) => { const el = getElement(selector); if (el) { el.className = `${el.className} is-visible`; } if (!window.Promise) { return { then(fn) { fn && fn(); } }; } }; delay(800) .then(() => makeVisible('.mv__bg')) .then(() => delay(400)) .then(() => makeVisible('.mv__title')) .then(() => delay(400)) .then(() => makeVisible('.mv__trophy')) .then(() => delay(400)) .then(() => makeVisible('.mv__copy')) .then(() => delay(400)) .then(() => makeVisible('.mv__chara--1')) });