Trying to fix JS on Randomizer

This commit is contained in:
LogolicusZ 2024-04-12 13:19:28 +02:00
parent 45ceecee0a
commit fe752192ff
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@
}
onMount(() => {
document.getElementById('banner').src = document.getElementById('banner').src.replace("pic0", `pic${rand(1,10)}`);
document.getElementById('banner').src = document.getElementById('banner').src.replace("pic0.png", `pic${rand(1,10)}.png`);
console.log(document.getElementById('banner').src);
})
@ -26,7 +26,7 @@
</div>
<!-- svelte-ignore a11y-img-redundant-alt -->
<a href="/gallery" class="banner" data-tooltip="See more..."><img src="assets/images/gallery/pic0.png" id="banner" alt="Random picture from the gallery."></a>
<a href="/gallery" class="banner" data-tooltip="See more..."><img src="http://localhost:3001/pic0.png" id="banner" alt="Random picture from the gallery."></a>
<style>
a.banner {