1
0

Some JS changes, some alts, fallback img, no <center>

This commit is contained in:
2025-07-20 19:33:52 -05:00
parent 353bccc2b6
commit 6d4bf60247
3 changed files with 56 additions and 56 deletions

41
xeno.js
View File

@@ -8,43 +8,44 @@ var imageArray = [
"siteimg/xeno/jhayarr6%20(Medium).png",
"siteimg/xeno/beatlinked1%20(Medium).png"
]
const xenoId = document.getElementById('xeno') // Moved to using DOM Element IDs.
var xenoPrideImg = "siteimg/xeno/xenopan_50pcrop.png";
var xenoXmasImg = "siteimg/xeno/deioxpk-xmas1_smol.png"
var num = Math.floor(Math.random() * (imageArray.length));
const month = new Date().getMonth();
if (month == 6) { // June - LGBTQ+ Pride
if (month == 5) { // June - LGBTQ+ Pride
console.log("Month is June - LGBTQ+ Pride!");
document.xeno.width = "550";
document.xeno.src = xenoPrideImg;
document.xeno.title = "Have proud pansexual hors. - Art by Vivian Reed VA";
xenoId.width = "550";
xenoId.src = xenoPrideImg;
xenoId.title = "Have proud pansexual hors. - Art by Vivian Reed VA";
} else if (month == 12) { // December
console.log("Month is December - Crimmis");
document.xeno.width = "550";
document.xeno.src = xenoXmasImg;
document.xeno.title = "Have festive hors. - Art by LimeDazzle";
xenoId.width = "550";
xenoId.src = xenoXmasImg;
xenoId.title = "Have festive hors. - Art by LimeDazzle";
} else {
document.xeno.title = "Have hors.";
document.xeno.width = "550";
xenoId.title = "Have hors.";
xenoId.width = "550";
var chosennum = num;
console.log("Chosen num is " + chosennum + " - " + imageArray[chosennum]);
document.xeno.src = imageArray[chosennum];
// document.xeno.src = imageArray[num];
xenoId.src = imageArray[chosennum];
// xenoId.src = imageArray[num];
if (chosennum == 0) {
document.xeno.title += " - Art by LimeDazzle";
xenoId.title += " - Art by LimeDazzle";
} else if (chosennum == 1) {
document.xeno.title += " - Art by Vivian Reed VA";
document.xeno.width = "600";
xenoId.title += " - Art by Vivian Reed VA";
xenoId.width = "600";
} else if (chosennum == 2) {
document.xeno.title += " - Art by KittyRosie";
xenoId.title += " - Art by KittyRosie";
} else if (chosennum == 3) {
document.xeno.title += " - Art by CrescendCinnamon";
document.xeno.width = "400";
xenoId.title += " - Art by CrescendCinnamon";
xenoId.width = "400";
} else if (chosennum == 4) {
document.xeno.title = "I wub my wubhons! - Art by CrescendCinnamon";
document.xeno.width = "450";
xenoId.title = "I wub my wubhons! - Art by CrescendCinnamon";
xenoId.width = "450";
} else if (chosennum == 5) {
document.xeno.title += " - Art by Beatlinked";
xenoId.title += " - Art by Beatlinked";
}
}