-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcauldron.js
28 lines (26 loc) · 840 Bytes
/
cauldron.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Find the right method, call on correct element
function launchIntoFullscreen(element) {
if(element.requestFullscreen) {
element.requestFullscreen();
} else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if(element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
} else if(element.msRequestFullscreen) {
element.msRequestFullscreen();
}
}
// Launch fullscreen for browsers that support it!
launchIntoFullscreen(document.documentElement); // the whole page
function yellow(){
document.getElementById('body').style.background = 'yellow';
setTimeout(orange, 5000);
}
function orange(){
document.getElementById('body').style.background = 'orange';
setTimeout(green, 5000);
}
function green(){
document.getElementById('body').style.background = 'green';
setTimeout(yellow, 5000);
}