-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
394 lines (391 loc) · 9.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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<title>jbomikuji</title>
<style>
@font-face {
font-family: vertical_latin;
src : url("Vertical_Latin_Calligraphic.otf");
}
.vl {
letter-spacing: 0;
font-family : vertical_latin;
}
.v {
text-orientation: sideways;
writing-mode : tb-rl;
writing-mode : vertical-rl;
}
.sinxa {
height:160px;
border-style: dashed;
border-width: 0px 15px 0px;
}
.sinxa_vasru{
margin: 10px auto;
padding-bottom: 0px;
text-align: center;
border-bottom-style: double;
border-bottom-width: 5px;
font-size: 0.5em;
}
.sinxa_vasru p.v {
display: inline-block;
margin: auto 0px;
text-align: center;
position:relative;
}
#cmene{top:-48px;}
#detri{top:-42px;}
body {
font-size: xx-large;
}
label{font-size: small;}
.vl p {margin:0px;}
.torveki {
margin:0px auto;
display: inline-block;
text-align: justify;
padding-top: 10px;
height: 10em;
}
.torveki p {
margin: 0px 10px 0px;
}
.mutpelji {
width:300px;
border: black solid 5px;
text-align: center;
}
.mofunca{
font-size: 1.5em;
border-bottom: black solid 2px;
}
#dacru_pejgau{
font-size: small;
color: lightgray;
background: none;
border: 0px;
text-decoration: underline;
cursor: pointer;
}
.dacru{display: none;}
</style>
<div class="mutpelji" id="mutytorveki">
<div class="sinxa_vasru vl">
<p class="v" id="cmene">la jbomikuji</p>
<img class="sinxa" src="jbmkjs.svg">
<p class="v" id="detri">dehi li renopaso</p>
</div>
<div class="mofunca vl">rodyfuha</div>
<div class="v vl torveki" id="torveki_ralju">
<p>niho <span class="tertaha">lo broda brode</span> zohu: <span class="brivla">broda</span> .i<span class="mahoija">je</span> <span class="brivla">brode</span> <span class="zahumai">.i gehe cohe</span></p>
<p>niho <span class="tertaha">lo brodi brodo</span> zohu: <span class="brivla">brodi</span> .i<span class="mahoija">naje</span> <span class="brivla">brodo</span> <span class="zahumai">.i .ei suhobuha</span></p>
<p>niho <span class="tertaha">lo brodu</span> zohu: <span class="brivla">brodu</span> .i<span class="mahoija">ju</span> <span class="brivla">brodu</span> <span class="zahumai">.i vahinai brodu</span></p>
</div>
</div>
<div>
<input type="button" value=".ai cuxna prina" id="cuxna">
<input type="button" value=".i dacru ju'inai" id="dacru_pejgau">
</div>
<div id="tercuha" class="dacru">
<textarea id="mofunca">
zanfunca,1000
mutce zanfuha,200
zanfuha,100
malfunca,900
mutce malfuha,150
malfuha,100
malmalfuha,50
milxe zanfuha,500
milxe malfuha,400
zanfuha joi malfuha,100
malmalmalmalmalfuha
malfuhe
malsyfuhe
malsyfuha
cmalyfuha,bardyfuha,banlyfuha
balcuhe
baurnucuhe,bancuhesu,bangazuhe
zantufa,maltufa,gentufa
zanfancu,malfancu,zanfanza,malfanza,malfonxa
zanzanzanzanzanzanfuha,zanmalfuha,malzanfuha
zanzara,zanzibara,tanzaniia,tanjelavi
</textarea>
<textarea id="tertaha">
lo se djica,1000
lo zanpre,1000
lo se cirko,1000
lo jdini,900
lo nu darkla,800
lo xe cilre,800
lo ka kanro,800
lo nu jikca,600
lo nu gunka,500
lo zdani,500
lo lanzu,500
lo larcu,500
lo nu canja,lo jdima,200
lo nu damba,200
lo ve zivle,200
lo nu cinjikca,lo nu rorci,300
lo skami,lo dirtimi,lo desmihi,100
lo pinji,lo vibna,lo ganti,lo ganxo,5
</textarea>
<textarea id="brivla">
lakne,1000
jibni,1000
carmi,gusni,kandi,manku,500
cando,1000
sohimei,1000
mohamei,1000
raumei,800
zabna,600
mabla,600
gleki,300
badri,300
pluka,300
rigni,300
zdile,nalzdi,cinri,300
cizra,300
prali,400
nabmi,300
rinju,300
raktu,300
tohe zifre,zifre,400
nalrahu,300
xamgu,1000
xlali,1000
xruti,300
cenba,300
zunti,300
tolpohu,300
spofu,300
zenba,500
jdika,500
pamoi,300
zahumoi,300
romoi,300
jinga,terjiha,300
cnemu,300
sfasa,300
gaurtcini,100
clira,200
sutra,100
lerci,200
masno,100
kufra,tohe kufra,200
mucti,200
marji,200
snada,500
fliba,500
zanjahe,maljahe,500
bandu,sarji,300
snura,ckape,300
facki,tolcri,500
cliva,300
drani,200
frili,300
nandu,300
spaji,snuti,300
jenca,50
mansa,steba,200
darno,800
krefu,300
pendo,bradi,300
xatra,notci,300
sarxe,tohe sarxe,300
banro,farvi,300
klamuho,klanuho,300
pindi,ricfu,300
simxu,300
lamji,800
canci,tolcanci,600
tsasmani,sofybakni,tcokumte,jborida,50
</textarea>
<textarea id="mahoija">
je,5000
je,2000
je,1500
naje,100
naje,100
naje,100
jenai,100
jenai,100
jenai,100
najenai,100
ja,500
ja,500
ja,500
janai,100
janai,100
janai,100
naja,100
naja,100
naja,100
ju,100
seju,100
jonai,100
jo,50
</textarea>
<textarea id="zahumai">
.i .ehinai lazni,1000
.i .ehu na pacna,1000
.i .ehe denpa,1000
.i .ehu junri,1000
.i .ohi cenba,1000
.i .ehusai jinsa,,1000
.i mabla .uhenai,10
.i kahu zabna,10
.i .ehusai clite,1000
.i .ehu sinma,.i .ehi cevysiha,1000
.i .ehu xendo,1000
.i .ehu cumla,1000
.i .ehe sezlacri,1000
.i .oho cevlacri,.i .ehu ridlacri,700
.i .ehu na xanka,1000
.i .aho na dunku,.i .aho zanfri,600
.i .ehu jdejuhi,800
.i .ohi dukse,.i .ehu na bancu,1000
.i .ohi meckanpe,600
.i .ehe caha zukte,600
.i .ehu surla,700
.i .ehu nurcni,700
.i .ehu nalfehu,600
.i .ehe darsi,.i .ehe na terpa,.i .ehe na ckeji,.i .ehe virnu,800
.i vajni ko,.i dirba ko,600
.i kukte ko,100
.i .ohi srera,600
.i .ehu na gunrivzuhe,600
.i .ehu na xarnu,.i .ehe xarnu,.i .ehu na pante,500
.i .ehu na bebna,.i .aho na bebna,600
.i sidju ko,.i ko sidju,.i ko kurji,.i kurji ko,.i ko ko kurji,200
.i deha .ehu,.i cohu .ehu,.i coha .ehe,600
.i .ehu cnici,800
.i .ehu randa,800
.i .ehe renvi,.i .aho renvi,800
.i .ehu vrude,.i .ehu cesyvuhe,1000
.i .ehu na jgiduhe,800
.i .ehu dimsanji,800
.i .ehu cilre,600
.i .ehu rivliha,800
.i .ehu bredi,.i ehu judydeha,100
.i .ehu na lirtoi,800
.i .ehu mipri,700
.i .ehe birti,1000
.i .uenai racli,.i .ehe fenki,50
.i .ehe lunbe,.i .ehe glebre,.i .ehe zmohuna,.i .ehe xinzajba,5
.i ko lojbo .iu,.i jbobo .aho,2
.i dei jifyjufmei,3
.i si,.i su juhinai,.i si su,2
</textarea>
</div>
<div id="cmatci" class="dacru"><input type="checkbox" id="gafpuhi_bredi"><label for="gafpuhi_bredi">ba gafpu'i</label><input id="gafpuhi_jufspi"><div>
<script>
function notci(/*pilno zo arguments*/){
if(window.stika){console.log.apply(null,arguments);}
}
window.stika = false;
window.addEventListener("load",function(){
document.getElementById("cuxna").addEventListener("click",function(){
cuxyciha(["mofunca","tertaha","brivla","mahoija","zahumai"]);
notci(pinta_latmo("tordu pehu"));
},false);
document.getElementById("gafpuhi_bredi").addEventListener("click",function(){
if(!window.bahobregau){cenba_bregau();window.bahobregau=true;}
},false);
document.getElementById("dacru_pejgau").addEventListener("click",function(){
dacru();
},false);
},false);
function cuxyciha(id_zei_porsi){
for (var i of id_zei_porsi){
var tercuxsro = tercuxsro_poicpa(i);
for (var j of document.querySelectorAll("."+i)){
var sleselcuha = slecuha(tercuxsro);
j.textContent = sleselcuha.jufspi;
tercuxsro.splice(sleselcuha.moisni,1);
}
}
}
function tercuxsro_poicpa(id){
return document.getElementById(id).value.split("\n");//textarea-value
}
function slecuha(tercuxsro/*textarea+slice*/){ //va'i za'e cmakuji zo'o
var tercuxste = [];
var cuho = [];
var lijmoisni = [];
for (var i of tercuxsro) {
var terkaha = i.trim().split(",");
if(terkaha.length==2&&typeof(terkaha[1]-0)=="number"){
tercuxste.push(terkaha[0]);
cuho.push(terkaha[1]-0);
lijmoisni.push(tercuxsro.indexOf(i));
}else if(terkaha.length==1&&terkaha[0].length>0){
tercuxste.push(terkaha[0]);
cuho.push(1);
lijmoisni.push(tercuxsro.indexOf(i));
}else if(terkaha.length>1){
var namcu = 0;
if(typeof(terkaha[terkaha.length-1]-0)>0){//rivbi la na'e namcu
namcu = terkaha.pop()-0;
}else{
namcu = 1;
}
for (var j of terkaha) {
tercuxste.push(j);
cuho.push(namcu);
lijmoisni.push(tercuxsro.indexOf(i));
}
}
}
notci(tercuxste,cuho,sumji(cuho),sihesivahe(cuho));
var selcuxnahu = Math.floor(Math.random()*sumji(cuho));
var vahe = sihesivahe(cuho);
var selcuxmoisni = -1;
for (var i=0;i<vahe.length;i++){
if(selcuxnahu<vahe[i]&&selcuxmoisni<0){selcuxmoisni=i;}
}
notci(selcuxnahu,";",selcuxmoisni);
notci(tercuxste[selcuxmoisni]);
return {jufspi:tercuxste[selcuxmoisni], moisni:lijmoisni[selcuxmoisni]};
}
function sumji(nampoi){
var jalge = 0;
for (var i of nampoi){
jalge += i;
}
return jalge;
}
function sihesivahe(nampoi){
var ninpoi = [];
var zasnahu = 0;
for (var i of nampoi){
zasnahu += i;
ninpoi.push(zasnahu);
}
return ninpoi;
}
function cenba_bregau(){
var gaubredi = Array.from(document.querySelectorAll(".mofunca")).concat(Array.from(document.querySelectorAll(".torveki p span")));
for (var i of gaubredi){
i.addEventListener("click",function(){
if(document.getElementById("gafpuhi_bredi").checked){
this.textContent = document.getElementById("gafpuhi_jufspi").value;
}
},false);
}
}
function dacru(){
for (var i of document.getElementsByClassName("dacru")){
if(i.style.display == "block"){
i.style.display = "none";
}else{
i.style.display = "block";
}
}
}
function pinta_latmo(tordu){
return document.getElementById(tordu?"torveki_ralju":"mutytorveki").textContent
}
</script>