random loading messages!
This commit is contained in:
parent
74a13cb80b
commit
ed4c221f95
3 changed files with 33 additions and 5 deletions
|
|
@ -158,22 +158,23 @@ main {
|
|||
}
|
||||
|
||||
.loading > p:first-child {
|
||||
animation: 1s 1 linear appear;
|
||||
animation: 0.9s 1 linear appear;
|
||||
animation-fill-mode: forwards;
|
||||
animation-delay: 0.2s;
|
||||
visibility: hidden;
|
||||
position: fixed
|
||||
}
|
||||
|
||||
.loading > p:not(:first-child):not(:last-child) {
|
||||
animation: 1s 1 linear appear;
|
||||
animation-delay: 1s;
|
||||
animation: 0.9s 1 linear appear;
|
||||
animation-delay: 1.1s;
|
||||
animation-fill-mode: forwards;
|
||||
visibility: hidden;
|
||||
position: fixed
|
||||
}
|
||||
|
||||
.loading > p:last-child {
|
||||
animation: 1s 1 linear appear;
|
||||
animation: 0.9s 1 linear appear;
|
||||
animation-delay: 2s;
|
||||
animation-fill-mode: forwards;
|
||||
visibility: hidden;
|
||||
|
|
|
|||
11
assets/loading.txt
Normal file
11
assets/loading.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Kissing the server
|
||||
Downloading more ram
|
||||
Deleting Windows
|
||||
Removing the french language pack
|
||||
Compiling kernel
|
||||
Powering up Robotgirls
|
||||
Converting Windows users
|
||||
Pushing straight to prod
|
||||
Speedrunning Celeste
|
||||
Meowing cutely
|
||||
Injecting estrogen
|
||||
|
|
@ -9,6 +9,7 @@ window.addEventListener("load", () => {
|
|||
document.body.appendChild(skipNode);
|
||||
});
|
||||
|
||||
// skip animations and shit
|
||||
function skipAnimation() {
|
||||
for (let node of document.getElementsByClassName("skip")) {
|
||||
const animations = node.getAnimations();
|
||||
|
|
@ -23,4 +24,19 @@ function skipAnimation() {
|
|||
}
|
||||
}
|
||||
document.getElementsByClassName("skip-animation")[0].remove();
|
||||
}
|
||||
}
|
||||
|
||||
// this randomizes the loading messages
|
||||
function Load (text) {
|
||||
const loadArray = text.split("\n")
|
||||
const loading = document.getElementsByClassName("loading")[0]
|
||||
|
||||
const r = Math.floor(Math.random() * loadArray.length)
|
||||
const loadText = loadArray[r]
|
||||
|
||||
loading.innerHTML = `<p class="skip">${loadText}.</p><p class="skip">${loadText}..</p><p class="skip">${loadText}...</p>`
|
||||
}
|
||||
|
||||
fetch("/assets/loading.txt")
|
||||
.then(r => r.text())
|
||||
.then(t => Load(t))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue