回答編集履歴
1
chousei
test
CHANGED
@@ -19,3 +19,23 @@
|
|
19
19
|
});
|
20
20
|
|
21
21
|
```
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
# ifの中だけ?
|
26
|
+
|
27
|
+
```javascript
|
28
|
+
|
29
|
+
function reloadMessages(){
|
30
|
+
|
31
|
+
console.log('reload');
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
if(/messages/.test(location.pathname)){
|
36
|
+
|
37
|
+
setInterval(reloadMessages, 5000);
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
```
|