-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.js
More file actions
20 lines (20 loc) · 859 Bytes
/
background.js
File metadata and controls
20 lines (20 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function changeBackground( name ) {
switch(name)
{
case "bricks":
document.getElementsByTagName('body')[0].style.backgroundImage = "url(./resources/background/sand.png)";
break;
case "sand":
document.getElementsByTagName('body')[0].style.backgroundImage = "url(./resources/background/sand.png)";
break;
case "iron":
document.getElementsByTagName('body')[0].style.backgroundImage = "url(./resources/background/iron_block.png)";
break;
case "deep":
document.getElementsByTagName('body')[0].style.backgroundImage = "url(./resources/background/deepslate_top.png)";
break;
case "barrel":
document.getElementsByTagName('body')[0].style.backgroundImage = "url(./resources/background/barrel_bottom.png)";
break;
}
}