26 lines
No EOL
797 B
JavaScript
26 lines
No EOL
797 B
JavaScript
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();
|
|
} |