Some JS changes, some alts, fallback img, no <center>
This commit is contained in:
41
xeno.js
41
xeno.js
@@ -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";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user