-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
118 lines (114 loc) · 5.52 KB
/
index.html
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
115
116
117
118
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<!-- Tartu Tänavad Roleplay Loading Screen -->
<script>
window.onload = function() { var context = new AudioContext(); }
</script>
<meta charset="UTF-8" />
<title>Tartu Tänavad Roleplay</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="keks.css" />
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<script type='text/javascript' src='jquery.particleground.js'></script>
<script type='text/javascript' src='demo.js'></script>
</head>
<body onload="startTime()">
<div id="particles">
<div id="intro">
<div><img src='Logo.png' style='width:300px;heigth:300px'></div>
<div> <font face='Montserrat' size='15px'>Tartu Tänavad Roleplay</font></div>
<div id="loadingEffect" style="margin-top:-10px; margin-bottom:-15px;">
<p class='loading'><font face='Montserrat'> Ühendan sind serveriga</p></font></div>
<div id="currentSong" style="font-size: 190%;"><font face='Montserrat'> Oih! Laulu nime ei saa kuvada.</div>
<div id="pressspacebar" style="font-weight: bold;"><font face='Montserrat' size='3px'> Vajuta
<span id="changeColor" style="color: green;">SPACEBAR'i</span>
, et muusika vaigistada.</div>
<div id="discordImage" style="margin-top:420px;"><img src='Discord.png' style='width:70px;height:17px'></div>
<div><font face='Montserrat' size="3px">discord.gg/C3mH4ZR</font></div>
<div id="kellaAeg" style="margin-top:10px; font-weight: bold;"> Kellaaega ei saa kuvada.</div>
<div>
<audio id="leson"></audio>
<script type="text/javascript"> // random song [nigol]
var player = document.getElementById("leson");
player.autoplay = true;
var lastSong = null;
var selection = null;
var laulud = ['seevaikeneiu', 'tulipunasedroosid', 'seitseinglit', 'silmad', 'elbayon', 'etoleksrahu', 'jambalaya', 'lilleois', 'korraksvaid', 'tantsinii', 'unelmatemaacalifornia', 'avavalss', 'viiskastiolut'];
player.addEventListener("ended", selectRandom);
function selectRandom() {
while(selection == lastSong) {
selection = Math.floor(Math.random() * laulud.length);
}
lastSong = selection;
for (let i = 0; i < 100; i++) { selection = Math.floor(Math.random() * laulud.length); } // warmup (nigol)
player.src = laulud[selection] + ".mp3";
}
selectRandom();
player.play();
</script>
<script type="text/javascript"> // skript laulu vaigistamiseks [modifitseeris nigol]
var play = true;
var myAudio = document.getElementById("leson");
var keyPressed = document.getElementById("changeColor");
myAudio.volume = 0.1;
function onKeyDown(event) {
switch (event.keyCode) {
case 32:
if (play) {
myAudio.pause();
play = false;
keyPressed.style.color = "red";
} else {
myAudio.play();
play = true;
keyPressed.style.color = "green";
}
break;
}
return false;
}
window.addEventListener("keydown", onKeyDown, false); // laulu muutmise skript [nigol]
function onKeyDown2(event) {
switch (event.keyCode) {
case 65:
if (play) {
selectRandom();
document.getElementById("currentSong").innerHTML = "Laulu nimi: " + lauluNimed[selection];
} else {
var x = x;
}
break;
}
}
window.addEventListener("keydown", onKeyDown2, true);
</script>
<script type="text/javascript"> // laulu nimi [nigol]
var lauluNimed = ["Mati Nuude - See Väike Neiu", "Mati Nuude - Tulipunased Roosid", "Mati Nuude - Seitse Inglit", "Mati Nuude - Silmad", "Mati Nuude - El Bayon", "Mati Nuude - Et Oleks Rahu", "Mati Nuude - Jambalaya", "Mati Nuude - Lilleõis", "Mati Nuude - Korraks Vaid", "Mati Nuude - Tantsi Nii", "Mati Nuude - Unelmate Maa California", "Mati Nuude - Avavalss", "Mati Nuude - Viis Kasti Õlut"];
document.getElementById("currentSong").innerHTML = "Laulu nimi: " + lauluNimed[selection];
</script>
<script> // - kellaaja skript [nigol]
function startTime() {
var monthNames = ["jaanuar", "veebruar", "märts", "aprill", "mai", "juuni", "juuli,","august", "september", "oktoober","november", "detsember"];
// kellaaeg
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
// aasta ja kuupäev
var year = today.getFullYear(); // pole tarvis antud ajahetkel
var monthIndex = today.getMonth();
var day = today.getDate();
document.getElementById("kellaAeg").innerHTML = h+":"+m+":"+s+" | "+day+". "+monthNames[monthIndex];
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
if (i < 10) {i = "0" + i};
return i;
}
</script>
</div>
</body>
</html>