diff --git a/Website/js/favicon+urlpretty.js b/Website/js/favicon.js similarity index 62% rename from Website/js/favicon+urlpretty.js rename to Website/js/favicon.js index 2990d64..1cabec2 100644 --- a/Website/js/favicon+urlpretty.js +++ b/Website/js/favicon.js @@ -9,6 +9,16 @@ function updateFavicon() { } } +document.addEventListener('DOMContentLoaded', function () { + const currentUrl = window.location.href; + const urlPath = window.location.pathname; + + if (currentUrl.includes('wesmun.com') && !urlPath.endsWith('.html')) { + window.location.href = currentUrl.replace('.html', ''); + } +}); + + // Initial check updateFavicon(); diff --git a/Website/js/timer.index.js b/Website/js/timer.index.js index 87a0b0d..e68a1cf 100644 --- a/Website/js/timer.index.js +++ b/Website/js/timer.index.js @@ -1,27 +1,25 @@ -const themeRevealDate = new Date("December 1, 2024 00:00:00").getTime(); -const hackathonStartDate = new Date("December 13, 2024 00:00:00").getTime(); -const hackathonEndDate = new Date("December 15, 2024 00:00:00").getTime(); +const RegisterDate = new Date("December 1, 2024 00:00:00").getTime(); +const StartDate = new Date("December 13, 2024 00:00:00").getTime(); +const EndDate = new Date("December 15, 2024 00:00:00").getTime(); const countdownTimer = setInterval(() => { const now = Date.now(); let message; let extraMessage = ""; - if (now < themeRevealDate) { - const timeLeft = themeRevealDate - now; - message = `Theme reveal in ${Math.floor(timeLeft / (1000 * 60 * 60 * 24))} days, ${Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))} hours, ${Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))} minutes, and ${Math.floor((timeLeft % (1000 * 60)) / 1000)} seconds.`; - } else if (now < hackathonStartDate) { - const timeLeft = hackathonStartDate - now; - - message = `The theme is NAHHH! Start Practicing 🤗!`; - extraMessage = `Competition in ${Math.floor(timeLeft / (1000 * 60 * 60 * 24))} days, ${Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))} hours, ${Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))} minutes, and ${Math.floor((timeLeft % (1000 * 60)) / 1000)} seconds.

Very important, DO NOT finish the project! You won't be allowed to enter the competition if you do. You are allowed to finish the project up to 60% - This will be decided by the organisers.`; - } else if (now <= hackathonEndDate) { - message = "The Official Wesgreen Hackathon has begun!"; + if (now < RegisterDate) { + const timeLeft = RegisterDate - now; + message = `WesMun Registration Start in ${Math.floor(timeLeft / (1000 * 60 * 60 * 24))} days, ${Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))} hours, ${Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))} minutes, and ${Math.floor((timeLeft % (1000 * 60)) / 1000)} seconds.`; + } else if (now < StartDate) { + const timeLeft = StartDate - now; + message = `WesMun Start in ${Math.floor(timeLeft / (1000 * 60 * 60 * 24))} days, ${Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))} hours, ${Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))} minutes, and ${Math.floor((timeLeft % (1000 * 60)) / 1000)} seconds.`; + } else if (now <= EndDate) { + message = "The Official WesMun has begun!"; } else { - message = "The Official Wesgreen Hackathon has ended."; + message = "The Official WesMun has ended."; } document.getElementById("countdown").innerHTML = message + (extraMessage ? `
${extraMessage}` : ""); - if (now > hackathonEndDate) clearInterval(countdownTimer); + if (now > EndDate) clearInterval(countdownTimer); }, 1000); \ No newline at end of file diff --git a/committees.html b/committees.html index 6636e3c..7c8a166 100644 --- a/committees.html +++ b/committees.html @@ -10,7 +10,7 @@ - + WesMun - Committees diff --git a/index.html b/index.html index 50ca832..90e1cfb 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - + WesMun Home Page diff --git a/rules.html b/rules.html index e93be1d..2f4821c 100644 --- a/rules.html +++ b/rules.html @@ -10,7 +10,7 @@ - + WesMun - Rules diff --git a/team.html b/team.html index 3c265d2..6a9285f 100644 --- a/team.html +++ b/team.html @@ -9,7 +9,7 @@ - + Meet the Team diff --git a/venue.html b/venue.html index 88e68b7..d748a03 100644 --- a/venue.html +++ b/venue.html @@ -10,7 +10,7 @@ - +