-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
110 lines (98 loc) · 2.52 KB
/
main.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
function SetElementText(element, text) {
document.getElementById(element);
element.innerText = text;
}
function SetElementHTML(element, text) {
document.getElementById(element);
element.innerHTML = text;
}
function SetPageTitle(title) {
document.title = title;
}
function SetElementColor(element, color) {
element.style.color = color;
}
function GetElementText(element) {
return element.innerText;
}
function GetElementHTML(element) {
return element.innerHTML;
}
function GetElementByID(element) {
return document.getElementById(element.id);
}
function GetElementColor(element) {
return element.style.color;
}
function LGBT(element) {
setTimeout(function()
{
element.style.color = "rgb(255, 0, 24)";
}, 200);
setTimeout(function()
{
element.style.color = "rgb(255, 165, 44)";
}, 400);
setTimeout(function()
{
element.style.color = "rgb(255, 255, 65)";
}, 600);
setTimeout(function()
{
element.style.color = "rgb(0, 128, 24)";
}, 800);
setTimeout(function()
{
element.style.color = "rgb(0, 0, 249)";
}, 1000);
setTimeout(function()
{
element.style.color = "rgb(134, 0, 125)";
}, 1200);
setTimeout(function()
{
setTimeout(function()
{
element.style.color = "rgb(255, 0, 24)";
}, 200);
setTimeout(function()
{
element.style.color = "rgb(255, 165, 44)";
}, 400);
setTimeout(function()
{
element.style.color = "rgb(255, 255, 65)";
}, 600);
setTimeout(function()
{
element.style.color = "rgb(0, 128, 24)";
}, 800);
setTimeout(function()
{
element.style.color = "rgb(0, 0, 249)";
}, 1000);
setTimeout(function()
{
element.style.color = "rgb(134, 0, 125)";
}, 1200);
LGBT(element);
}, 1200);
}
function CreateText(name, parent, text) {
if (arguments == 2) //It not work, lepiej nie uĹźywaÄ tylko z dwona argumentami. Too bad.
{
var helo = document.createElement(name);
helo.innerText = "domyĹlny tekst";
document.getElementById(parent).appendChild(helo);
}
else
{
var helo = document.createElement(name);
helo.innerText = text;
document.getElementById(parent).appendChild(helo);
}
return helo;
}
function SelectRandom(arr = []) {
return arr[Math.floor(Math.random() * arr.length)];
}