-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
42 lines (41 loc) · 1.08 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="./node_modules/jquery/dist/jquery.js"></script>
<script src="./dist/xlog-1.0.7.js"></script>
<link rel="stylesheet" href="./xlog.css">
<style>
body{
margin: 0;
}
</style>
</head>
<body>
<pre id="xlog" class="dark">
</pre>
</body>
<script>
var container = document.getElementById("xlog")
var lexer = new XLog(container)
$(document).ready(function (e) {
$.ajax({
method: "GET",
url: "https://api.travis-ci.org/v3/job/31095019/log.txt",
success: function (data) {
let segs = data.split("\n");
segs.forEach((v, i) => {
setTimeout(() => {
let substr = v;
if (segs.length !== i + 1) {
substr = substr + "\n"
}
lexer.write(substr)
}, 0)
})
}
})
});
</script>
</html>