-
Notifications
You must be signed in to change notification settings - Fork 0
/
anindex.html
1062 lines (1056 loc) · 30.2 KB
/
anindex.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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html itemscope='' itemtype='http://schema.org/SearchResultsPage' lang='ru' >
<head >
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
<meta content='ru-RU' http-equiv='Content-Language' />
<meta content='personal,page' name='keywords' />
<meta content='Static' name='googlebot' />
<meta content='NoIndex,NoArchive' name='Robots' />
<meta content='http://github.com/Alikberov' name='Author' />
<meta description='CCCP' />
<meta http-equiv=refresh content='200' />
<title>CCCP - Common Creative Collection Project</title>
<link rel=icon type='image/gif' href='index.gif' />
<link rel=icon type='image/ico' href='index.ico' />
<!----------------------------------------------------------------------------
КАМЕРА <-- Вхождение в блок управления КАМЕРОЙ
ПОГОДА <-- Вхождение в блок управления ПОГОДОЙ
ВРЕМЯ <-- Вхождение в блок управления ВРЕМЕНЕМ
Иван Иваныч Иванов <-- Вхождение в блок манипуляции ПЕРСОНАЖЕМ
Иван Иваныч <-- Вхождение в блок манипуляции ПЕРСОНАЖЕМ
Иван Иванов <-- Вхождение в блок манипуляции ПЕРСОНАЖЕМ
----------------------------------------------------------------------------->
<script type='text/javascript'>
(function() {
var gue = Object.create(HTMLTableElement.prototype); // Graphic Unical Element
gue.createdCallback = function() {
var cpt = document.createElement("TR");
var pic = cpt.insertCell(0);
var title = cpt.insertCell(1);
var buttons = cpt.insertCell(2);
this.style.width = "100%";
this.style.position = "fixed";
this.style.top = "0px";
cpt.style.backgroundColor = "ActiveCaption";
cpt.style.color = "CaptionText";
cpt.style.width = "100%";
pic.style.width = "16px";
title.style.width = "100%";
buttons.style.whiteSpace = "nowrap";
var picture = new Image();
this.minimizer = document.createElement("BUTTON");
this.maximizer = document.createElement("BUTTON");
this.optimizer = document.createElement("BUTTON");
this.minimizer.style.fontFamily = "Marlett";
this.maximizer.style.fontFamily = "Marlett";
this.optimizer.style.fontFamily = "Marlett";
try{ picture.src = document.querySelector("link[rel*='icon']").href; } catch(e) {}
picture.style.width = "16px";
picture.style.height = "16px";
this.minimizer.textContent = "0";
this.maximizer.textContent = "2";
this.optimizer.textContent = "r";
pic.appendChild(picture);
title.textContent = this.innerHTML;
buttons.appendChild(this.minimizer);
buttons.appendChild(this.maximizer);
buttons.appendChild(this.optimizer);
this.textContent = "";
this.appendChild(cpt);
if(this.attributes.menu) {
var mnu = document.getElementById(this.attributes.menu.nodeValue);
var chk = document.createElement("INPUT");
chk.type = "checkbox";
mnu.insertBefore(chk, mnu.firstChild);
this.appendChild(mnu);
}
document.body.style.paddingTop = this.offsetHeight + "px";
};
document.registerElement("caption-bar", {
prototype :gue
});
gue = Object.create(HTMLCanvasElement.prototype); // Graphic Unical Element
gue.createdCallback = function() {
this.canvas = document.createElement("CANVAS");
this.canvas.height = (this.canvas.width = this.attributes.size ? this.attributes.size.value : 64);
this.context = this.canvas.getContext("2d");
this.design = {
clockDial :{
color :"cyan",
ghost :"green"
}
, hoursArrow :{
color :"brown"
, width :"5"
, size :"60%"
}
, minutesArrow :{
color :"yellow"
, width :"3"
, size :"80%"
}
, secondsArrow :{
color :"yellow"
, width :"1.5"
, size :"80%"
}
};
var css = document.styleSheets;
var i, j, classes, classId, styles, style, tags, branch;
for(i = 0; i < css.length; ++ i) {
classes = css[i].cssRules;
for(classId = 0; classId < classes.length; ++ classId) {
tags = classes[classId];
if(tags.selectorText.toUpperCase() == this.tagName) {
styles = tags.style;
for(j = 0; j < styles.length; ++ j) {
if("--" == styles[j].substr(0, 2)) {
style = styles[j].substr(2).split("-");
if(style.length >= 3) {
branch = style[0] + style[1].charAt(0).toUpperCase() + style[1].substr(1);
if(branch in this.design && style[2] in this.design[branch])
this.design[branch][style[2]] = styles.getPropertyValue(styles[j]);
}
}
}
}
}
}
this.context.strokeStyle = this.style.color || "yellow";
this.context.fillStyle = this.style.backgroundColor || "cyan";
this.appendChild(this.canvas);
this.draw = function() {
var size = this.context.canvas.width / 2;
var hours, minutes, seconds, percent;
var timer = [this.attributes.value.value];
if(this.attributes.waiting && this.attributes.waiting.value > timer[0])
timer.unshift(this.attributes.waiting.value),
this.context.fillStyle = this.design.clockDial.ghost;
else
this.context.fillStyle = this.design.clockDial.color;
do {
hours = timer[0] / 3600000 * Math.PI / 6;
minutes = timer[0] / 60000 * Math.PI / 30;
seconds = timer[0] / 1000 * Math.PI / 30;
this.context.beginPath();
this.context.fillRect(0, 0, this.context.canvas.width, this.context.canvas.height);
percent = parseInt(this.design.hoursArrow.size, 10) / 100;
this.context.moveTo(size + size * Math.sin(hours) * percent, size - size * Math.cos(hours) * percent);
this.context.lineTo(size, size);
this.context.lineWidth = this.design.hoursArrow.width;
this.context.strokeStyle = this.design.hoursArrow.color;
this.context.stroke();
this.context.beginPath();
this.context.moveTo(size, size);
percent = parseInt(this.design.minutesArrow.size, 10) / 100;
this.context.lineTo(size + size * Math.sin(minutes) * percent, size - size * Math.cos(minutes) * percent);
this.context.lineWidth = this.design.minutesArrow.width;
this.context.strokeStyle = this.design.minutesArrow.color;
this.context.stroke();
this.context.beginPath();
this.context.moveTo(size, size);
percent = parseInt(this.design.secondsArrow.size, 10) / 100;
this.context.lineTo(size + size * Math.sin(seconds) * percent, size - size * Math.cos(seconds) * percent);
this.context.lineWidth = this.design.secondsArrow.width;
this.context.strokeStyle = this.design.secondsArrow.color;
this.context.stroke();
this.context.fillStyle = this.design.clockDial.color;
this.context.fillStyle += "80";
timer.shift()
} while(timer.length > 0);
}
this.step = function() {
var step = +(this.attributes.step ? this.attributes.step.value : 10000);
this.draw();
this.attributes.value.value = (+this.attributes.value.value + step) % 86400000;
if(this.attributes.clock) {
var hours = +this.attributes.clock.value;
if(hours >= 0)
if(Math.abs(hours / 3600000 - this.attributes.value.value / 3600000) > 10000)
this.attributes.value.value = +this.attributes.value.value + (this.attributes.clock.value - this.attributes.value.value) / 10;
else
this.attributes.clock.value = -hours;
}
}
this.start = function(speed) {
clearInterval(this.handle);
this.handle = setInterval(this.step.bind(this), speed || (this.attributes.delay ? this.attributes.delay.value : 500));
}
this.stop = function() {
clearInterval(this.handle);
}
this.addEventListener("mousedown"
, function(e) {
var hours = (Math.PI + Math.atan2(this.canvas.width / 2 - e.layerX, e.layerY - this.canvas.height / 2)) / Math.PI * 6 * 3600;
if(e.target.parentNode.attributes.value.value >= 43200)
hours += 43200;
e.target.parentNode.attributes.clock.value = hours;
});
this.start();
};
document.registerElement("clock-box", {
prototype :gue
});
})();
/*document.registerElement("gui-caption", {
prototype: {
__proto__ :HTMLElement.prototype
, attachedCallback:function() {
alert("atach!");
}
}
})
var MyTimerProto = Object.create(HTMLElement.prototype);
MyTimerProto.tick = function() {
this.timer++;
this.innerHTML = this.timer;
};
MyTimerProto.createdCallback = function() {
this.timer = 0;
};
MyTimerProto.attachedCallback = function() {
setInterval(this.tick.bind(this), 1000);
};
document.registerElement("my-timer", {
prototype: MyTimerProto
});*/
</script>
<script>
// регистрация произойдёт через 2 сек
setTimeout(function() {
document.registerElement("hello-world", {
prototype: {
__proto__: HTMLElement.prototype,
sayHi: function() { alert('Привет!'); }
}
});
// у нового типа элементов есть метод sayHi
hello.sayHi();
}, 2000000);
</script>
<script type='text/javascript'>
var MetaRefresh = setInterval("if((Progress.value += +window.panic()) > 100) window.location = '';", 100);
window.DOME = function() { Array.prototype.slice.call(document.querySelectorAll("[js]"), 0).forEach(function(elem) { window[elem.id] = elem; }); }
window.HINT = function() {
Array.prototype.slice.call(document.querySelectorAll("[contenteditable=true]"), 0)
.forEach(function(elem) {
if(elem.title == "")
elem.title = "Click to edit";
});
}
window.panic = function() { return 10 / document.querySelector("meta[http-equiv='refresh']").content; }
window.onerror =
function(e_id, e_file, e_line, e_char, e_fn) {
if(Progress.value == 0)
window.panic = new Function("",
["var info = document.createElement('h1');"
,"info.style.backgroundColor = 'red';"
,"info.innerHTML = '[" + e_line + ":" + e_char + "]:" + e_id + "';"
,"document.body.appendChild(info);"
,"window.panic = function() { return 3; };"
,"return 25;"
].join("\r\n"));
return true;
}
</script>
<script type='text/javascript'>
Object.defineProperty(HTMLTextAreaElement.prototype, "selectionRow", {
enumerable : true,
get :
function() {
return {
start :this.value.substr(0, this.selectionStart).split(/\r?\n/).length
, end :this.value.substr(0, this.selectionEnd).split(/\r?\n/).length
}
},
set :function(x) {}
}
);
Object.defineProperty(HTMLTextAreaElement.prototype, "selectionColumn", {
enumerable : true,
get :
function() {
return {
start :this.value.substr(0, this.selectionStart).split(/\r?\n/).pop().length
, end :this.value.substr(0, this.selectionEnd).split(/\r?\n/).pop().length
}
},
set :function(x) {}
}
);
Object.defineProperty(HTMLTextAreaElement.prototype, "peekRow", {
enumerable : true,
get :
function() {
var pos = this.value.substr(0, this.selectionEnd).split(/\r?\n/).length;
return this.value.split(/\r?\n/)[pos - 1];
},
set :function(x) {}
}
);
Object.defineProperty(HTMLTextAreaElement.prototype, "readRow", {
enumerable : true,
get :
function() {
var pos = this.value.substr(0, this.selectionEnd).split(/\r?\n/).length
, crlf = this.value.match(/\r?\n/)
, lines = this.value.split(/\r?\n/)
, string = lines[pos - 1];
this.selectionEnd = lines.slice(0, pos + 1).join(crlf[0]).length;
return string;
},
set :function(x) {}
}
);
//////////////////////////////////////////////////////////////////////////////
// "JohnDoe".toName() == "John Doe"
String.prototype.toName = function() { return this.replace(/([A-ZА-ЯЁ][a-zа-яё]*)(?:\.)/g, " $1").trim().split(/\s+/).join(""); };
//////////////////////////////////////////////////////////////////////////////
// "wAneSsa".toNick() == "Wanessa"
String.prototype.toNick = function() { return this.charAt(0).toUpperCase() + this.substr(1).toLowerCase(); };
//////////////////////////////////////////////////////////////////////////////
// "Jo.D.".areNickOf({...}) == "JohnDoe"
String.prototype.areNickOf =
function(troupe) {
var id, name;
var i, p, part;
name = this.replace(/([A-ZА-ЯЁ][a-zа-яё]*)(?:\.)/g, " $1").trim().split(/\s+/);
id = name.join("");
if(id in troupe)
return id;
for(id in troupe) {
for(i in name) {
part = name[i];
p = id.indexOf(part);
}
}
return false;
};
//////////////////////////////////////////////////////////////////////////////
// "Jo.D.".isNickOf({...}) == "JohnDoe"
String.prototype.isNickOf =
function(troupe) {
var id, name;
var a, b, c;
name = this.replace(/([A-ZА-ЯЁ][a-zа-яё]*)(?:\.)/g, " $1").trim().split(/\s+/);
id = name.join("");
if(id in troupe)
return id;
for(id = 0; id < name.length; ++ id)
name[id] = name[id].toNick();
id = name.join("");
if(id in troupe)
return id.join("");
for(id in troupe) {
a = id.indexOf(name[0]);
if(a >= 0) {
if(name.length > 1) {
b = id.indexOf(name[1], a);
if(b >= 0) {
if(name.length > 2) {
c = id.indexOf(name[2], b);
if(c >= 0)
return id;
else
continue;
}
else
return id;
} else
continue;
}
return id;
}
}
return false;
};
//////////////////////////////////////////////////////////////////////////////
var Lyrics = [];
function parseRow(string, parent) {
var child;
var count = null;
var action;
var n;
var str, cmd, times;
while(string.length > 0) {
n = -1;
times = string.match(/^(\d+:)?(\d+:)(\d+)(?:\.(\d+))?([\s\t]*)(\(?)/);
if(times) {
n = 3600000 * parseInt(times[1] || "0", 10)
+ 60000 * parseInt(times[2], 10)
+ 1000 * parseInt(times[3], 10)
+ 1 * parseInt((times[4] || "").padEnd(3, 0), 10);
n = -n;
if(times[6]) {
string = string.substr(times[0].length - 1);
} else {
string = string.substr(times[0].length);
child = document.createElement("QUOTE");
child.textContent = times[0].trim();
parent.appendChild(child);
continue;
}
}
str = string.match(/^([\s\t]*)(\d+)/);
if(str)
n = Number(str[2])
, string = string.substr(str[0].length);
//cmd = string.split(/
str = string.match(/^([\s\t]*)([A-ZА-Я_]+\??)([\s\t]*)/i);
if(str) {
string = string.substr(str[0].length);
if("(" != string.charAt(0)) {
action = document.createElement("SPAN");
action.className = "Novel";
action.textContent = n < 0 ? str[2] : str[2] + "(" + n + ")";
parent.appendChild(action);
continue;
}
;
}
if("(" == string.charAt(0)) {
count = document.createElement("PROGRESS");
count.style.display = "block";
count.max = Math.abs(n),
count.value = Math.abs(n);
if(n < 0)
count.dataset.watch = Timer.id;
child = document.createElement("DIV");
child.className = "Novel";
child.appendChild(count);
parent.appendChild(child);
parent = child;
} else
if(")" == string.charAt(0)) {
if("PROGRESS" == parent.childNodes[0].tagName)
parent = parent.parentNode;
}
string = string.substr(1);
}
return parent;
}
var actors = [];
function parseRole(parent, text) {
var basic = parent;
var string, child, nick = "", tmp;
text = text.split(/\r?\n/);
while(text.length) {
string = text.shift();
if(":" == string.substr(-1)) {
string = string.substr(0, string.length - 1);
tmp = string.match(/^(\d+):(\d\d)(.(\d\d))?/);
if(tmp) {
tmp = -60 * (parseInt(tmp[1], 10) * 60 + parseInt(tmp[2], 10));
child = document.createElement("QUOTE");
child.textContent = string;
parent.appendChild(child);
continue;
}
if("" != nick)
actors[nick] = parent;
nick = string.isNickOf(actors);
if(false != nick)
string = nick;
if(string in actors)
parent = actors[nick = string];
else {
nick = string;
child = document.createElement("H2");
child.textContent = nick;
basic.appendChild(child);
child = document.createElement("P");
child.className = "Novel";
basic.appendChild(child);
parent = child;
actors[nick] = parent;
}
} else
if(string.match(/^[A-ZА-Я]/)) {
child = document.createElement("QUOTE");
child.textContent = string;
parent.appendChild(child);
} else
/*if(string.match(/^(\d+:)?(\d+:)(\d+)(\.\d+)?(\.*)$/)) {
child = document.createElement("QUOTE");
child.textContent = string;
parent.appendChild(child);
} else*/
parent = parseRow(string, parent);
}
for(child in actors)
actors[child] = actors[child].firstChild;
}
//////////////////////////////////////////////////////////////////////////////
function findActive(html, actions, lyrics) {
var active = true;
var watch;
while(null != html) {
if("DIV" == html.tagName) {
//if("DIV" == html.parentNode.tagName || html.parentNode.tagName == "P")
// html.parentNode.className = "Ready";
html = html.childNodes[0];
html.value = 0;
} else
if("PROGRESS" == html.tagName) {
if(html.dataset.watch && (html.dataset.watch in window)) {
watch = window[html.dataset.watch].attributes;
if("value" in watch) {
if(!watch.waiting || (watch.waiting.value > html.max && html.max > watch.value.value)) {
var typ = document.createAttribute("waiting");
typ.nodeValue = html.max;
watch.setNamedItem(typ);
}
watch = watch.value;
} else
watch = html;
} else
watch = html;
if(html.max > watch.value) {
html.value = watch.value + (watch === html ? 1 : 0);
active = html.max > watch.value;
if(null == html.nextSibling)
break;
html = html.nextSibling;
} else {
html = html.parentNode;
html.className = "Novel Leave";
if(null == html.nextSibling) {
html = html.parentNode;
html = "DIV" == html.tagName ? html.childNodes[0] : null;
} else
html = html.nextSibling;
}
} else
if("SPAN" == html.tagName || html.tagName == "QUOTE") {
if("QUOTE" == html.tagName) {
if(".." == html.textContent.substr(-2))
lyrics.length = 0,
lyrics.push(html.textContent.substr(0, html.textContent.length - 2));
else
if(html.textContent.match(/^(\d+):(\d\d)/))
actions.push(html.textContent);
else
lyrics.push(html.textContent);
} else {
if("?" == html.textContent.substr(-1)) {
if(FIO.$.indexOf(html.textContent) < 0) {
html = html.parentNode.childNodes[0];
if("PROGRESS" != html.tagName)
html = null;
break;
}
} else
actions.push(html.textContent);
}
if(active)
html.parentNode.className = "Novel Watch";
else
html.parentNode.className = "Novel Leave";
if(null == html.nextSibling) {
html = html.parentNode.childNodes[0];
if("PROGRESS" != html.tagName)
html = null;
break;
} else
html = html.nextSibling;
} else
html = null;
}
return html;
}
function process() {
var nick, acts = [];
for(nick in actors) {
var actions = [nick];
var lyrics;
if(!(nick in Lyrics))
Lyrics[nick] = [];
lyrics = Lyrics[nick];
if(null != actors[nick]) {
actors[nick] = findActive(actors[nick], actions, lyrics);
acts.push(actions);
}
}
var h = [], n;
for(var i = 0; i < acts.length; ++ i) {
var tmp = acts[i].shift(), a = [];
h.push("<b>" + tmp + "</b>");
if(Lyrics[tmp].length)
h.push("<i>" + Lyrics[tmp].join("<br />") + "</i>");
acts[i].forEach(function(s) {
var times = s.match(/^(\d+:)?(\d+:)(\d+)(?:\.(\d+))?/);
if(times) {
var hours = 3600000 * parseInt(times[1] || "0", 10)
+ 60000 * parseInt(times[2], 10)
+ 1000 * parseInt(times[3], 10)
+ 1 * parseInt((times[4] || "").padEnd(3, 0), 10);
//if(hours[4])
// setTimeout(
if(times[4] && !times[1])
document.getElementsByTagName("clock-box")[0].attributes.step.value = hours;
else
document.getElementsByTagName("clock-box")[0].attributes.clock.value = hours,
document.getElementsByTagName("clock-box")[0].attributes.value.value = hours;
}
a.push(s);
});
h.push(a.join("; "))
}
Actions.innerHTML = h.join("<br />");
setTimeout(process, 250);
}
</script>
<script type='text/javascript'>
function init() {
var storage = null;
Array.prototype.slice.call(document.querySelectorAll("[data-storage]"), 0)
.forEach(
function(elem) {
var data = elem.dataset.storage.match(/([^:]+):([^.]+)\.([^.]+)\.(.*)/);
var bank = data[1];
var method = data[2];
var name = data[3];
var container = data[4].split(/\s+/);
var actions = [];
var handle, element;
var first = true;
switch(bank) {
case "wls": storage = "localStorage"; break;
case "wss": storage = "sessionStorage"; break;
default: storage = "pageStorage";
}
if(window[storage] && window[storage][name]) {
container
.forEach(
function(str) {
elem[str] = window[storage][(first ? name : name + "_" + str)];
first = false;
});
} else {
window[storage][name] = [];
window[storage][name] = elem[container[0]];
}
window[name] = elem;
container
.forEach(
function(str) {
handle = actions.length == 0 ? name : name + "_" + str;
element = actions.length == 0 ? "$" : "$" + str;
Object.defineProperty(window[name], element, {
enumerable : true,
get : new
Function(
"",
"\t return window." + storage + "." + handle
),
set : new
Function(
"x",
"\twindow." + name + "." + str + " = "
+ "window." + storage + "." + handle + " = x;"
)
}
);
actions
.push("window." + storage + "." + handle
+ " = this." + str + ";\r\n"
+ "window." + storage + ".focus = this.id"
);
});
method.split(/\//)
.forEach(
function(str) {
elem.addEventListener(str,
new Function("", actions.join(";\r\n"))
);
});
});
if(storage && window[storage] && window[storage].focus) {
elem = document.getElementById(window[storage].focus);
if(elem)
elem.focus();
}
}
//////////////////////////////////////////////////////////////////////////////
</script>
<script type='text/javascript'>
function main() {
setInterval(
function() {
PAD_row.$ = BIO.selectionRow.start;
PAD_column.$ = BIO.selectionColumn.start;
Timer.value = +Timer.value + 60;
}, 100);
//Bio.focus(); parseRow(Bio.readRow, Parsed); process(Parsed);// .childNodes[0]);
Bio.focus(); parseRole(Parsed, Bio.value);
process();// .childNodes[0]);
}
</script>
<style>
body
{
padding :0px 0px 0px 0px;
margin :0px 0px 0px 0px;
background-color:ThreeDFace;
color :WindowText;
overflow :auto;
}
.TitleBar
{
padding :0px 0px 0px 0px;
margin :0px 0px 0px 0px;
background-color:WindowFrame;
cursor :default;
width :100%;
}
.TitleBar tr:nth-child(1)
{
background-color:ActiveCaption;
color :CaptionText;
font-weight :normal;
text-align :left;
}
.TitleBar tr:nth-child(2)
{
background-color:Menu;
color :MenuText;
padding :0px 0px 0px 0px;
margin :0px 0px 0px 0px;
}
.TitleBar tr:nth-child(3)
{
}
.TitleBar tr:nth-child(4)
{
vertical-align :bottom;
}
.TitleBar th
{
font-weight :normal;
text-align :left;
}
.TitleBar th:nth-child(2)
{
width :100%;
}
.TitleBar td
{
background-color:inherit;
color :inherit;
padding :0px 0px 0px 0px;
margin :0px 0px 0px 0px;
}
.TitleBar input
{
display :none;
}
.TitleBar label
{
background-color:inherit;
color :inherit;
}
.TitleBar label menu
{
background-color:inherit;
color :inherit;
border :none;
padding :1px 9px 1px 9px;
margin :0 0 0 0;
display :inline-block;
}
.TitleBar input ~ menu:hover
{
border :1px outset;
padding :0px 8px 0px 8px;
}
.TitleBar input:checked ~ menu:hover
{
border :1px inset;
padding :0px 8px 0px 8px;
}
.TitleBar input:checked ~ menu:active
{
border :1px inset;
}
.TitleBar menu ul
{
background-color:inherit;
color :inherit;
position :absolute;
border :1px outset;
display :none;
list-style-type :none;
list-style-type :none;
list-style-position :outside;
}
.TitleBar li
{
background-color:inherit;
color :inherit;
}
.TitleBar input:checked ~ menu:hover ul
{
background-color:inherit;
color :inherit;
display :block;
padding :0px 0px 0px 0px;
margin :0px 0px 0px 0px;
}
.TitleBar input:checked ~ menu:hover li:hover
{
background-color:Highlight;
color :HighlightText;
}
.storage
{
}
.Controls
{
text-align :right;
}
.TitleBar th:nth-child(3)
{
text-align :right;
}
.TitleBar th:nth-child(3) button
{
padding :0px 0px 0px 0px;
margin :0px 0px 0px 0px;
background-color:ButtonFace;
font-family :Marlett;
}
progress[value^='-'] {
display :none;
}
progress#Progress {
display :inline;
bottom :0;
position :fixed;
}
div#Actions {
background-color:cyan;
display :inline-block
}
.Action {
margin-left :1em;
border :thin solid;
}
.Role {
background-color:green;
}
div.Novel {
border :this solid;
margin-left :1em;
padding-left :1em;
}
div.Watch, p.Watch {
background-color:silver;
}
div.Leave {
background-color:grey;
}
div.Novel span {
margin-right :1em;
}
.Novel quote {
background-color:cyan;
margin-left :1em;
border :thin solid;
display :block;
}
.Active {
background-color:silver;
}
.Ready {
background-color:grey;
}
div.Novel progress {
width :100%;
}
/* стиль для :unresolved элемента (до регистрации) */
hello-world:unresolved {
color: white;
}
hello-world {
display:block;
transition: color 3s;
}
caption-bar input
{
display :none;
}
caption-bar label
{
background-color:Menu;
color :MenuText;
display :block;
}
caption-bar label menu
{
background-color:inherit;
color :inherit;
border :none;
padding :1px 9px 1px 9px;
margin :0 0 0 0;
display :inline-block;
}
caption-bar input ~ menu:hover
{
border :1px outset;
padding :0px 8px 0px 8px;
}
caption-bar input:checked ~ menu:hover
{
border :1px inset;
padding :0px 8px 0px 8px;
}
caption-bar input:checked ~ menu:active
{
border :1px inset;
}
caption-bar menu ul
{
background-color:inherit;
color :inherit;
position :absolute;
border :1px outset;
display :none;
list-style-type :none;
list-style-type :none;
list-style-position :outside;
}
caption-bar li
{
background-color:inherit;
color :inherit;
}
caption-bar input:checked ~ menu:hover ul
{
background-color:inherit;
color :inherit;
display :block;
padding :0px 0px 0px 0px;
margin :0px 0px 0px 0px;
}
caption-bar input:checked ~ menu:hover li:hover
{
background-color:Highlight;
color :HighlightText;
}
caption-bar input:checked ~ menu:hover li menu
{
padding-left :0px;
}
caption-bar input:checked ~ menu:hover li menu ul
{
background-color:Menu;
color :MenuText;
display :none;
position :absolute;
}
caption-bar input:checked ~ menu:hover li:hover menu ul
{
background-color:Highlight;
color :HighlightText;
display :inline-block;
}
clock-box
{
background-color:red;
--hours-arrow-color:blue;
--minutes-arrow-color:red;
}
</style>
</head>
<body onload='DOME(); HINT(); init(); main()' onmouseover='if(MetaRefresh) clearInterval(MetaRefresh); MetaRefresh = null;'>
<caption-bar menu=MenuBar>CCCP - Common Creative Collection Project</caption-bar>
<label id=MenuBar>
<menu>File<ul>
<li onclick='window.localStorage.clear(); window.location=""'>New</li>
<li>Open</li>
<li>Close</li>
</ul>
</menu><menu>Edit<ul>
<li>Cut</li>
<li>Copy</li>
<li>Paste</li>
</ul>
</menu><menu>View<ul>
<li>Normal</li>
<li>Extend</li>
<li><menu>Custom<ul>
<li>Dark</li>
<li>Lite</li></ul>
</menu>
</li>
</ul></menu><menu>Help<ul>
<li>Info</li>
<li>Help</li>
<li onclick='return false'>About</li>
</ul></menu>
<!--span id=Caption-Status style='position:fixed; right:0%; white-space:nowrap;'>12:59<progress style=width:64px></progress></span--></label>
Your Name<br />
<input id=Fio class=storage data-storage='wls:focus/input.FIO.value' value='Mr. мышь?'><br />
<textarea id=Chat rows=2 cols=80 js></textarea>