// JS file for random Xeno images + pride Xeno! var imageArray = [ "siteimg/xeno/deioxpk-b2e38b76-f126-4d2c-bf24-91713dbfa3d0smol2.png", "siteimg/xeno/xenopan_50pcrop.png", "siteimg/xeno/kittyrosiefull%20(Medium).png", "siteimg/xeno/jhayarr1_smol.png", "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 == 5) { // June - LGBTQ+ Pride console.log("Month is June - LGBTQ+ Pride!"); 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"); xenoId.width = "550"; xenoId.src = xenoXmasImg; xenoId.title = "Have festive hors. - Art by LimeDazzle"; } else { xenoId.title = "Have hors."; xenoId.width = "550"; var chosennum = num; console.log("Chosen num is " + chosennum + " - " + imageArray[chosennum]); xenoId.src = imageArray[chosennum]; // xenoId.src = imageArray[num]; if (chosennum == 0) { xenoId.title += " - Art by LimeDazzle"; } else if (chosennum == 1) { xenoId.title += " - Art by Vivian Reed VA"; xenoId.width = "600"; } else if (chosennum == 2) { xenoId.title += " - Art by KittyRosie"; } else if (chosennum == 3) { xenoId.title += " - Art by CrescendCinnamon"; xenoId.width = "400"; } else if (chosennum == 4) { xenoId.title = "I wub my wubhons! - Art by CrescendCinnamon"; xenoId.width = "450"; } else if (chosennum == 5) { xenoId.title += " - Art by Beatlinked"; } }