preload arrows

This commit is contained in:
idkwh 2025-06-20 21:57:01 +02:00
parent 3f2f65bdb7
commit b12cb46a15
3 changed files with 15 additions and 2 deletions

View File

@ -19,7 +19,7 @@
<style>button {font-family:'Shop',sans-serif;padding: 5px; border:none;outline:2px solid orange; color:black;background-color:white;border-radius: 5px;background-color:#f6fdff;filter: drop-shadow(1px 1px 3.4px #bbbbbb);box-shadow:inset 1px 1px 12px #53360015;}button:hover {border:none;outline:3px solid orange;cursor: pointer;filter: drop-shadow(1px 1px 3.4px #edb2347c);box-shadow:inset 1px 1px 12px #57310015;}button:active {box-shadow: none}</style>
<!--testing...first gitlab commit-->
</head>
<body onload="loadafterwednesdaycheck();">
<body onload="loadafterwednesdaycheck();preloadArrows();">
<div id="bgmplayer">
<h2>BGM player</h2>
<a href="javascript:playBGM();" id="shopbgmselector"><button id="shopbgm">Play</button></a>

View File

@ -28,7 +28,7 @@
<nav><a href="install" class="btn">Install</a> <a href="support" class="btn">Support</a> <a href="errors" class="btn">Errors</a> <a href="branding" class="btn">Branding</a> <a href="specials" class="btn">Specials</a> <a href="credits" class="btn">Credits</a></nav>
<script>function WiiMartWednesday() {const today = new Date(); const dayOfWeek = today.getDay();if (dayOfWeek === 3) {const wednesdayDiv = document.getElementById('wednesdaytitles'); if (wednesdayDiv) {wednesdayDiv.style.display = 'block';} }}; function whatiswmw() {const wswbox = document.getElementById("whatiswsw"); wswbox.style.display="block"; } function whatiswmwclose() { const wswbox = document.getElementById("whatiswsw"); wswbox.style.display="none";} window.onload = WiiMartWednesday(); loadafterwednesdaycheck(); function whatiswmw() {const wswbox = document.getElementById("whatiswsw");wswbox.style.display="block";} function whatiswmwclose() { const wswbox = document.getElementById("whatiswsw"); wswbox.style.display="none";}</script>
<script>function WiiMartWednesday() {const today = new Date(); const dayOfWeek = today.getDay();if (dayOfWeek === 3) {const wednesdayDiv = document.getElementById('wednesdaytitles'); if (wednesdayDiv) {wednesdayDiv.style.display = 'block';} }}; function whatiswmw() {const wswbox = document.getElementById("whatiswsw"); wswbox.style.display="block"; } function whatiswmwclose() { const wswbox = document.getElementById("whatiswsw"); wswbox.style.display="none";} window.onload = WiiMartWednesday(); preloadArrows(); loadafterwednesdaycheck(); function whatiswmw() {const wswbox = document.getElementById("whatiswsw");wswbox.style.display="block";} function whatiswmwclose() { const wswbox = document.getElementById("whatiswsw"); wswbox.style.display="none";}</script>
<div id="wednesdaytitles" style="display:none"><img loading="lazy" src="meta/NEW_en.gif" alt="NEW" style="margin-right:5px;">It's WiiMart Wednesday, The catalog has been updated with new games! <br><a href="javascript:whatiswmw();" style="font-size:11px; font-style:italic; cursor:help;" id="helpwed">What is WiiMart Wednesday?</a></div><div id="whatiswsw" style="display:none;"><h3>What is Wii Shop/WiiMart Wednesday?</h3><hr><p>"Update Day" also known as "Wii Shop Wednesday is a song that Nirvana The Band The Show made. <br> it was a song about the latest games added to the shop channel on that wednesday as they sang to the titles on the catalog pages. We decided to bring it back and now every wednesday, new games are added to the WiiMart catalog. <a href="https://www.youtube.com/watch?v=XQ0lnz1iv3k&t=0s" target="_blank">Visit this link to watch the Update day video</a></p><br><button onclick="whatiswmwclose();">Close</button></div>
<div style="padding: 0;">

View File

@ -1,3 +1,16 @@
function preloadArrows() {
function preloadImages() {//v1.0
var doc = document, args = arguments; if (!doc.img) doc.img = new Array();
for (var i = 0; i < args.length; i++) { doc.img[i] = new Image; doc.img[i].src = args[i]; }
}
preloadImages(
"/meta/arrow-right-hover.png",
"/meta/arrow-left-hover.png",
"/meta/arrow-right-pressed.png",
"/meta/arrow-left-pressed.png"
);
}
const galleries = document.querySelectorAll('.gallery');
galleries.forEach(gallery => {