-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
264 lines (242 loc) · 8.83 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://kit.fontawesome.com/44bca1acc7.js" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="style.css" />
<title>Aidenify</title>
</head>
<body>
<div class="container">
<div class="header-container">
<h1 class="header">Aidenify</h1>
<div class="switch-container">
<i class="fas fa-sun switch" onclick="darkMode(this)"></i>
</div>
</div>
<div class="banner-container">
<div class="banner">
<h1>Aiden
<br>
Translator
</h1>
</div>
</div>
<div class="lang-container">
<p class="left-lang lang">Normal</p>
<i class="fas fa-exchange-alt"></i>
<p class="right-lang lang">Aiden</p>
</div>
<div class="input-container">
<textarea class="input" id="input" rows="5" cols="40" placeholder="Masukkan teks yang mau diubah"></textarea>
</div>
<div class="result-container">
<textarea class="result" id="result" rows="5" cols="40" placeholder="Bahasa rahasia Aiden akan muncul disini" onclick="this.focus();this.select()" readonly="readonly"></textarea>
</div>
<div class="tutorial-container">
<textarea id="tutorial" cols="40" rows="5" class="tutorial" onclick="this.focus();this.select()" readonly="readonly">Cara kerja bahasa Aiden:
- Huruf A = aiden
- Huruf E = eiden
- Huruf I = isfir
- Huruf U = usfur
- Huruf O = osfor
- Kalau ada huruf mati yang tidak
diikuti huruf vokal tambahkan "es"
setelahnya.
contoh: Tes, Pes, Mes, dst.
- Kalau ada "ng" yang tidak diikuti
huruf vokal, ubah menjadi "streng"
- Contoh keseluruhan:
"Tendang Bola"
te = teiden
n = nes
da = daiden
ng = streng
bo = bosfor
la = laiden
tendang bola = teidennesdaidenstreng
bosforlaiden
</textarea>
<a class="link" href="https://vt.tiktok.com/ZSeHCbSk5/">Untuk lebih lengkap, cek <u>Video</u> ini</a>
<div class="footer-container">
<p class="footer">Made by NavdPlay with <i class="fas fa-heart"></i></p>
</div>
</div>
</div>
<script>
function aidenify(str) {
var str = str.toLowerCase().split('');
var newStr = [];
for (var i = 0; i < str.length; i++) {
if (str[i] == 'a') {
newStr.push('aiden');
} else if (str[i] == 'e') {
newStr.push('eiden');
} else if (str[i] == 'i') {
newStr.push('isfir');
} else if (str[i] == 'o') {
newStr.push('osfor');
} else if (str[i] == 'u') {
newStr.push('usfur');
} else if (str[i] == ' ') {
newStr.push(' ');
} else if (/[^a-z]/.test(str[i])) {
newStr.push(str[i])
} else if (/[^aiueo ]/.test(str[i]) && str[i + 1] == ' ' && str[i - 1] + str[i] != 'ng') {
newStr.push(str[i] + 'es');
} else if (i == str.length - 1 && /[^aiueo ]/.test(str[i]) && str[i - 1] + str[i] != 'ng') {
newStr.push(str[i] + 'es');
} else if (/[^aiueo ]/.test(str[i])) {
if (str[i + 1] == 'g' && str[i] == 'n') {
newStr.push('stre' + str[i]);
} else if (/[^aiueo ]/.test(str[i + 1]) && str[i] + str[i + 1] != 'ng' && i != str.length - 1) {
newStr.push(str[i] + 'es');
} else {
newStr.push(str[i]);
}
}
}
return newStr.join('');
}
function normalize(str) {
str = str.toLowerCase().split('');
var newStr = [];
for (var i = 0; i < str.length; i++) {
if (str[i] + str[i + 1] + str[i + 2] + str[i + 3] + str[i + 4] == 'aiden') {
newStr.push('a');
i += 4;
continue;
} else if (str[i] + str[i + 1] + str[i + 2] + str[i + 3] + str[i + 4] == 'eiden') {
newStr.push('e')
i += 4;
continue;
} else if (str[i] + str[i + 1] + str[i + 2] + str[i + 3] + str[i + 4] == 'isfir') {
newStr.push('i');
i += 4;
continue;
} else if (str[i] + str[i + 1] + str[i + 2] + str[i + 3] + str[i + 4] == 'osfor') {
newStr.push('o');
i += 4;
continue;
} else if (str[i] + str[i + 1] + str[i + 2] + str[i + 3] + str[i + 4] == 'usfur') {
newStr.push('u');
i += 4;
continue;
} else if (/[^aiueo ]/.test(str[i]) && (/[aiueo]/.test(str[i + 1]) && i != str.length - 1 && str[i - 1] + str[i] != 'ng')) {
newStr.push(str[i]);
} else if (str[i] == ' ') {
newStr.push(' ');
} else if (/[^a-z]/.test(str[i])) {
newStr.push(str[i]);
} else if (str[i] + str[i + 1] + str[i + 2] + str[i + 3] + str[i + 4] + str[i + 5] == 'streng') {
newStr.push('ng');
i += 4;
continue;
} else if (/[^aiueo ]/.test(str[i]) && str[i + 1] + str[i + 2] == 'es') {
newStr.push(str[i]);
i++;
continue;
}
}
return newStr.join('');
}
var toAiden = true;
$('.fa-exchange-alt').click(function() {
var a = $('#input').val();
var b = $('#result').val();
var temp;
temp = a;
a = b;
b = temp;
$('#input').val(a);
$('#result').val(b);
if (toAiden) {
$('.left-lang').html('Aiden');
$('.right-lang').html('Normal');
$('#input').attr('placeholder', 'Masukkan teks Aiden yang mau diubah');
$('#result').attr('placeholder', 'Arti aslinya akan muncul disini');
} else {
$('.left-lang').html('Normal');
$('.right-lang').html('Aiden');
$('#input').attr('placeholder', 'Masukkan teks yang mau diubah');
$('#result').attr('placeholder', 'Bahasa rahasia Aiden akan muncul disini');
}
toAiden = !toAiden;
});
$('#input').keyup(function() {
if (toAiden) {
$('#result').val(aidenify($('#input').val()));
} else {
$('#result').val(normalize($('#input').val()));
}
});
var dark = false;
function darkMode(x) {
if (dark) {
x.classList.remove('fa-moon');
x.classList.add('fa-sun');
$('body').removeClass('dark-bg');
$('.lang').removeClass('dark-input dark-color');
$('.fa-exchange-alt').removeClass('dark-input dark-color');
$('#input').css({
'background-color': '#E5E8ED',
'color': '#000'
});
$('#result').css({
'background-color': '#E5E8ED',
'color': '#000'
});
$('#tutorial').removeClass('dark-textarea dark-color');
$('.link').removeClass('dark-textarea dark-color');
$('.footer-container').removeClass('dark-textarea dark-color');
$('.header-container').removeClass('dark-green-bg');
$('.banner').removeClass('dark-green');
$('.tutorial-container').removeClass('dark-green-bg');
$('.switch').css({
'color': '#fff'
});
$('.header').css({
'color': '#fff'
});
$('.footer-container').css({
'border-color': '#1A936F'
});
dark = false;
} else {
x.classList.remove('fa-sun');
x.classList.add('fa-moon');
$('body').addClass('dark-bg');
$('.lang').addClass('dark-input dark-color');
$('.fa-exchange-alt').addClass('dark-input dark-color');
$('#input').css({
'background-color': '#151618',
'color': '#7F7F7F'
});
$('#result').css({
'background-color': '#151618',
'color': '#7F7F7F'
});
$('#tutorial').addClass('dark-textarea dark-color');
$('.link').addClass('dark-textarea dark-color');
$('.footer-container').addClass('dark-textarea dark-color');
$('.header-container').addClass('dark-green-bg');
$('.banner').addClass('dark-green');
$('.tutorial-container').addClass('dark-green-bg');
$('.switch').css({
'color': '#151618'
});
$('.header').css({
'color': '#151618'
});
$('.footer-container').css({
'border-color': '#125843'
});
dark = true;
}
}
</script>
</body>
</html>