forked from chunpu/min-debug
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (49 loc) · 1007 Bytes
/
index.html
File metadata and controls
52 lines (49 loc) · 1007 Bytes
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
<!doctype html>
<html>
<head>
<title>debug()</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style>
* {
margin: 0;
padding: 0;
}
h1 {
margin-top: 30px;
}
body {
background: #eee;
color: #777;
}
a {
color: #555;
text-decoration: none;
}
a:hover {
text-decoration: underline;
color: #222;
}
</style>
</head>
<body>
<script src='./dist/debug.js'></script>
<a href='./?debug=*'><h1>debug with textarea</h1></a>
<a href='./'><h1>debug with localStorage</h1></a><p>type `localStorage.debug = '*'` in Console and refresh</p>
<script>
var a = debug('worker:a')
var b = debug('worker:b')
a('init')
b('init')
var timer1 = setInterval(function(){
a('log some number', 1024)
}, 1000)
var timer2 = setInterval(function(){
b('log some object', {foo: 'bar'})
}, 1200)
setTimeout(function() {
clearInterval(timer1)
clearInterval(timer2)
}, 15 * 1000)
</script>
</body>
</html>