-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.js
114 lines (95 loc) · 2.97 KB
/
scripts.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
function timeupdate(){ //updates time in upper right upper corner
const days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var today = new Date();
var hrs="";
var part="";
if((today.getHours())>12){
hrs= ((today.getHours()) - 12);
part="PM";
}
else if((today.getHours())==0){
hrs = "12";
part="AM";
}
else if((today.getHours())<12){
hrs = (today.getHours());
part="AM";
}
else if((today.getHours())==12){
hrs = 12;
part="PM"
}
var time = "Aug " + today.getDate() + ", " + hrs + ":" + ('0'+today.getMinutes()).slice(-2) + part;
document.getElementById('dateandtime').innerHTML=time;
setTimeout("timeupdate()",100);
}
function boot(){ //for showing the loading page and hiding it
document.getElementById('loaded').style.display="block";
document.addEventListener("click",function disp(){
(document.getElementById('boot')).style.display="none";
(document.getElementById('os')).style.display="block";
var audio = new Audio('images/bg_music.ogg');
audio.loop=true;
audio.playbackRate=0.8;
audio.volume=0.5;
audio.play();
});
document.addEventListener("keypress",function disp(){
(document.getElementById('boot')).style.display="none";
(document.getElementById('os')).style.display="block";
var audio = new Audio('images/bg_music.ogg');
audio.loop=true;
audio.playbackRate=0.8;
audio.volume=0.5;
audio.play();
});
}
setTimeout('boot()',4000);
function buttonoff(hid){
document.getElementById(hid).style.visibility="hidden";
}
function buttonon(vis){
document.getElementById(vis+"mod").style.visibility="visible";
}
function abouton(){
document.getElementById("about").style.visibility="visible";
}
var ful = document.documentElement;
function openFullscreen() {
if (ful.requestFullscreen) {
ful.requestFullscreen();
}
else if (ful.msRequestFullscreen) {
ful.msRequestFullscreen();
}
else if (ful.webkitRequestFullscreen) {
ful.webkitRequestFullscreen();
}
}
function restart(){
location.reload();
}
function f1(){
document.getElementById('homework').style.display="block";
}
$( function() {
$( "#about" ).draggable({handle: ".header" });
} );
$( function() {
$( "#readmemod" ).draggable({handle: ".header" });
} );
$( function() {
$( "#youtubemod" ).draggable({handle: ".header" });
} );
$( function() {
$( "#gamemod" ).draggable({handle: ".header" });
} );
$( function() {
$( "#achievemod" ).draggable({handle: ".header" });
} );
function homework(){
document.getElementById("homeworkmod").style.display="block";
setTimeout(function(){
document.getElementById("homeworkmod").style.display="none";
},2000);
}