diff --git a/assets/base.css b/assets/base.css index fb98295..3a8968e 100644 --- a/assets/base.css +++ b/assets/base.css @@ -139,6 +139,16 @@ main { position: fixed } +.skip-animation { + animation: 4.5s 1 linear appear; + visibility: hidden; + position: fixed; + width: 100vw; + height: 100vh; + top: 0; + left: 0; +} + .loading > p:first-child { animation: 1s 1 linear appear; animation-fill-mode: forwards; diff --git a/assets/main.js b/assets/main.js new file mode 100644 index 0000000..54c9b7c --- /dev/null +++ b/assets/main.js @@ -0,0 +1,26 @@ +let stylesheet + +window.addEventListener("load", () => { + stylesheet = document.styleSheets[0]; + + let skipNode = document.createElement("div"); + skipNode.setAttribute("class", "skip-animation"); + skipNode.setAttribute("onclick", "skipAnimation()"); + document.body.appendChild(skipNode); +}); + +function skipAnimation() { + for (let node of document.getElementsByClassName("skip")) { + const animations = node.getAnimations(); + for (let anim of animations) { + anim.finish(); + } + } + for (let node of document.getElementsByClassName("splash")) { + const animations = node.getAnimations(); + for (let anim of animations) { + anim.finish(); + } + } + document.getElementsByClassName("skip-animation")[0].remove(); +} \ No newline at end of file diff --git a/index.html b/index.html index 688dd97..aa0a31d 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - +
@@ -10,17 +10,17 @@Connecting.
-Connecting..
-Connecting...
+Connecting.
+Connecting..
+Connecting...