-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
51 lines (47 loc) · 1.78 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
<!DOCTYPE html>
<html lang="zh-tw">
<head>
<meta charset="UTF-8"/>
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
<meta content="width=device-width, initial-scale=1.0, shrink-to-fit=no" name="viewport"/>
<title>Markdown</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<meta content="NOINDEX, NOFOLLOW, NOARCHIVE" name="ROBOTS" />
</head>
<body>
<div class="container">
<script>
if (window.MozWebSocket) {
window.WebSocket = window.MozWebSocket;
}
function openConnection() {
conn = new WebSocket('ws://127.0.0.1:9998');
document.body.innerHTML = 'Connecting...'
conn.onopen = function () {
document.body.innerHTML = 'Connected.'
};
conn.onmessage = function (event) {
var html = JSON.parse(event.data);
var i,s='';
//for(i=0;i<20;i++) s+='<br/>';
document.body.innerHTML = html+s;
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
};
conn.onclose = function (event) {
document.body.innerHTML = 'Disconnected.'
};
}
setTimeout(function () {
openConnection();
}, 1000);
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]], processEscapes: true } });
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</div>
</body>
</html>