-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
81 lines (64 loc) · 1.64 KB
/
script.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//For footer
let year = new Date().getFullYear()
let month = new Date().getMonth() + 1
let day = new Date().getDate()
window.onload = function() {
document.getElementById("home").play();
}
//Audio Files
let AudioStorm = new Audio('audio/Storm.mp3');
let AudioNight = new Audio('audio/Night.mp3');
let AudioRain = new Audio('audio/Rain.mp3');
let AudioGame = new Audio('audio/Game.mp3');
let AudioForest = new Audio('audio/Forest.mp3');
let AudioSea = new Audio('audio/Sea.mp3');
//let AudioHome = new Audio('audio/Home.mp3');
//Stop Audios
function stopAll(){
AudioForest.pause();
AudioGame.pause();
AudioRain.pause();
AudioNight.pause();
AudioSea.pause();
AudioStorm.pause();
//AudioHome.pause();
}
/*
function home(){
stopAll();
AudioHome.play();
document.querySelector('input[name="theme"]:checked').checked = false;
document.getElementById('page_body').className="body";
}
*/
//OnClick Imgs
function night(){
stopAll();
AudioNight.play();
document.getElementById('page_body').className="night";
}
function rain(){
stopAll();
AudioRain.play();
document.getElementById('page_body').className="rain";
}
function storm(){
stopAll();
AudioStorm.play();
document.getElementById('page_body').className="storm";
}
function game(){
stopAll();
AudioGame.play();
document.getElementById('page_body').className="game";
}
function forest(){
stopAll();
AudioForest.play();
document.getElementById('page_body').className="forest";
}
function sea(){
stopAll();
AudioSea.play();
document.getElementById('page_body').className="sea";
}