(function () { document.body.style.visibility = "hidden"; const loader = document.createElement("loader"), style = document.createElement("style"), img = document.createElement("img"); style.textContent = ` loader { visibility: visible; position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; text-align: center; display: flex; justify-content: center; align-items: center; flex-direction: column; } loader img { animation: rotate 4s ease-in-out 1s infinite normal both; } @media (orientation: landscape) { loader img { height: 75vh; width: 75vh; } } @media (orientation: portrait) { loader img { height: 75vw; width: 75vw; } } @keyframes rotate { from {transform: rotate(0deg);} to {transform: rotate(360deg);} } `; img.src = "favicon.svg"; loader.appendChild(img); document.head.appendChild(style); document.body.appendChild(loader); document.body.style.overflow = "hidden"; addEventListener("load", () => { loader.remove(); document.body.style.visibility = "visible"; document.body.style.overflow = ""; }); })();