Narrow the scoping, so to speak (??)

This commit is contained in:
swaggboi 2024-06-25 17:37:57 -04:00
parent f5f15d7d11
commit 04ff49c932

View File

@ -1,23 +1,25 @@
const bodyStyle = document.body.style; (function () {
const bodyStyle = document.body.style;
function setImage(url) { function setImage(url) {
bodyStyle.backgroundImage = "url('" + url + "')"; bodyStyle.backgroundImage = "url('" + url + "')";
} }
switch (new Date().getMonth()) { switch (new Date().getMonth()) {
case 0: case 0:
setImage('/images/jwsfp1.gif'); setImage('/images/jwsfp1.gif');
break; break;
case 3: case 3:
setImage('/images/background2.gif'); setImage('/images/background2.gif');
break; break;
case 9: case 9:
setImage('/images/halloween_background_1.gif'); setImage('/images/halloween_background_1.gif');
break; break;
case 10: case 10:
setImage('/images/topwwbackground.gif'); setImage('/images/topwwbackground.gif');
break; break;
case 11: case 11:
setImage('/images/christmas.gif'); setImage('/images/christmas.gif');
break; break;
} }
})();