Narrow the scoping, so to speak (??)
This commit is contained in:
parent
f5f15d7d11
commit
04ff49c932
|
@ -1,10 +1,11 @@
|
|||
const bodyStyle = document.body.style;
|
||||
(function () {
|
||||
const bodyStyle = document.body.style;
|
||||
|
||||
function setImage(url) {
|
||||
function setImage(url) {
|
||||
bodyStyle.backgroundImage = "url('" + url + "')";
|
||||
}
|
||||
}
|
||||
|
||||
switch (new Date().getMonth()) {
|
||||
switch (new Date().getMonth()) {
|
||||
case 0:
|
||||
setImage('/images/jwsfp1.gif');
|
||||
break;
|
||||
|
@ -20,4 +21,5 @@ switch (new Date().getMonth()) {
|
|||
case 11:
|
||||
setImage('/images/christmas.gif');
|
||||
break;
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue