-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
76 lines (70 loc) · 2.16 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
var rjomba_idet = "net";
document.getElementById("sanya_rjomba").innerHTML = "<audio id=\"rjomba\"></audio>";
roflan = document.getElementById('rjomba');
//fucking safari
var last_rjomba;
var Sanya = {
init_rjomba: function(d) {
var rofl = d.getAttribute("data-rjaka");
if (rjomba_idet == "net") {
Sanya.start_rjomba(rofl, true);
last_rjomba = rofl;
rjomba_idet = "da";
} else {
if (last_rjomba == rofl) {
roflan.pause();
rjomba_idet = "net"
} else {
Sanya.start_rjomba(rofl, true);
last_rjomba = rofl;
}
}
},
start_rjomba: function(rofl, loop) {
roflan.src = "sanya_cool_man/" + rofl + ".mp3";
roflan.play();
roflan.loop = loop;
roflan.id = "kek";
},
random_rjomba: function() {
if (rjomba_idet == "net") {
//Ïîëó÷èì âñå ðæîìáû ñî ñòðàíèöû, ÷òîáû íå õàðäêîäèòü èõ êàæäûé ðàç â js
var rjombs = [];
var dick = document.getElementsByClassName('Button');
for (var whore = 0; whore < dick.length - 1; whore++) {
rjombs.push(dick[whore].getAttribute('data-rjaka'));
}
roflan.src = "sanya_cool_man/" + rjombs[Math.floor(Math.random() * rjombs.length)] + ".mp3";
roflan.loop = true;
roflan.play();
rjomba_idet = "da";
} else {
roflan.pause();
rjomba_idet = "net";
}
}
};
//Âûøå ïèñàë, ÷òî íå õî÷ó õàðäêîäèòü è âñå ðàâíî õàðäêîä. Ìäà.
addEventListener("keydown", function(e) {
switch (e.keyCode) {
case 49:
case 32:
roflan.src = "sanya_cool_man/odin.mp3";
roflan.loop = false;
roflan.play();
break;
case 50:
case 91:
roflan.src = "sanya_cool_man/dva.mp3";
roflan.loop = false;
roflan.play();
break;
case 51:
case 18:
roflan.src = "sanya_cool_man/tri.mp3";
roflan.loop = false;
roflan.play();
break;
}
});
//Çà÷åì ÿ æèâó