質問編集履歴
2
ソースコードの最後の}だけ抜けてたので追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -92,6 +92,7 @@
|
|
92
92
|
serifukaisu++;
|
93
93
|
}
|
94
94
|
console.log("3");
|
95
|
+
}
|
95
96
|
```
|
96
97
|
### 試したこと
|
97
98
|
|
1
ソースコードを追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -26,6 +26,73 @@
|
|
26
26
|
}
|
27
27
|
```
|
28
28
|
|
29
|
+
---追記 余計な情報も多いのですが、コードを丸々コピペしました。
|
30
|
+
```Javascript
|
31
|
+
var serifutemp=document.getElementById('pan2serifu').textContent;
|
32
|
+
var text=serifutemp.split(",");
|
33
|
+
|
34
|
+
function reload(charactor){
|
35
|
+
console.log("1");
|
36
|
+
count++;
|
37
|
+
//要素ノードオブジェクト
|
38
|
+
if(charactor===1){
|
39
|
+
$('#novelsakujo').attr('id',"novel");
|
40
|
+
var novel=document.getElementById('novel');
|
41
|
+
$('#novel2').attr('id',"novelsakujo2");
|
42
|
+
$('#nareta').attr('id',"naretasakujo");
|
43
|
+
}else if(charactor===2){
|
44
|
+
$('#novelsakujo2').attr('id',"novel2");
|
45
|
+
var novel=document.getElementById('novel2');
|
46
|
+
$('#novel').attr('id',"novelsakujo");
|
47
|
+
$('#nareta').attr('id',"naretasakujo");
|
48
|
+
}else if(charactor===3){
|
49
|
+
$('#naretasakujo').attr('id',"nareta");
|
50
|
+
var novel=document.getElementById('nareta');
|
51
|
+
$('#novel').attr('id',"novelsakujo");
|
52
|
+
$('#novel2').attr('id',"novelsakujo2");
|
53
|
+
}
|
54
|
+
|
55
|
+
if(skipflag==1){
|
56
|
+
clearTimeout(myTimer);
|
57
|
+
return 0;
|
58
|
+
}
|
59
|
+
if(text[serifukaisu].substr(count-1,4)=="brbr"){
|
60
|
+
count=count+4;
|
61
|
+
novel.insertAdjacentHTML('beforeend','<br>');
|
62
|
+
}
|
63
|
+
if(text[serifukaisu].substr(count-1,2)=="#r"){
|
64
|
+
count=count+2;
|
65
|
+
var element = document.createElement('span');
|
66
|
+
element.setAttribute('class', 'red');
|
67
|
+
element.innerHTML = text[serifukaisu].substr(count-1,1);
|
68
|
+
novel.appendChild(element);
|
69
|
+
}else if(text[serifukaisu].substr(count-1,2)=="&b"){
|
70
|
+
count=count+2;
|
71
|
+
var element = document.createElement('span');
|
72
|
+
element.setAttribute('class', 'f34pt');
|
73
|
+
element.innerHTML = text[serifukaisu].substr(count-1,1);
|
74
|
+
novel.appendChild(element);
|
75
|
+
}else if(charactor===2||charactor===3){
|
76
|
+
var texttemp=text[serifukaisu].substr(0,text[serifukaisu].length-2);
|
77
|
+
var textNode=document.createTextNode(texttemp.substr(count-1,1));
|
78
|
+
novel.appendChild(textNode);
|
79
|
+
}else{
|
80
|
+
var textNode=document.createTextNode(text[serifukaisu].substr(count-1,1));
|
81
|
+
novel.appendChild(textNode);
|
82
|
+
}
|
83
|
+
console.log("2");
|
84
|
+
if(hayoflag===0){
|
85
|
+
myTimer=setTimeout("reload("+charactor+")",40);
|
86
|
+
}else{//メッセージ表示中にエンターを押した場合表示速度を早くする
|
87
|
+
myTimer=setTimeout("reload("+charactor+")",0);
|
88
|
+
}
|
89
|
+
if(count==text[serifukaisu].length){
|
90
|
+
clearTimeout(myTimer);
|
91
|
+
count=0;
|
92
|
+
serifukaisu++;
|
93
|
+
}
|
94
|
+
console.log("3");
|
95
|
+
```
|
29
96
|
### 試したこと
|
30
97
|
|
31
98
|
ログの期待値は
|