all repos — retro-website @ e5f7129132734a0f589c02a177367d9d9f215e90

fix resource loading problem
Marco Andronaco andronacomarco@gmail.com
Mon, 19 Sep 2022 02:12:08 +0200
commit

e5f7129132734a0f589c02a177367d9d9f215e90

parent

795abdf30f703bcc6cb6bef1a8daedeb73260295

2 files changed, 6 insertions(+), 6 deletions(-)

jump to
M index.htmlindex.html

@@ -11,7 +11,7 @@ <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2280%22>🥭</text></svg>">

</head> <body style='background-image: url("res/img/background.jpg"); height: 100%;'> - <div id="overlay" onclick="start()"> + <div id="overlay"> <div style="margin:auto;"> Click here to enter. </div>
M res/slow_load.jsres/slow_load.js

@@ -1,8 +1,8 @@

const loadAudio = [ - new Audio(url="../res/sfx/os/loadelement1.ogg"), - new Audio(url="../res/sfx/os/loadelement2.ogg"), - new Audio(url="../res/sfx/os/loadelement3.ogg"), - new Audio(url="../res/sfx/os/loadelement4.ogg") + new Audio(url = window.location.origin + "/res/sfx/os/loadelement1.ogg"), + new Audio(url = window.location.origin + "/res/sfx/os/loadelement2.ogg"), + new Audio(url = window.location.origin + "/res/sfx/os/loadelement3.ogg"), + new Audio(url = window.location.origin + "/res/sfx/os/loadelement4.ogg") ] const not_allowed = ["AUDIO", "META", "TITLE", "LINK", "SOURCE", "SCRIPT", "BR"];

@@ -21,7 +21,7 @@ const all = document.getElementsByTagName("*");

let total = 0; function hide_all() { - + for (i in all) { const node = all[i]; if((node.childElementCount == 0) && (not_allowed.indexOf(node.tagName) === -1) && node.style){