-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (48 loc) · 1.21 KB
/
index.html
File metadata and controls
56 lines (48 loc) · 1.21 KB
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
53
54
55
56
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ConsoleTools</title>
<link href="https://fonts.googleapis.com/css?family=Rubik:300,500,700" rel="stylesheet">
<style>
body {
font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
padding: 5vh 10vw;
color: #121314;
}
p {
font-size: 1.6em;
font-weight: 300;
line-height: 1.4;
max-width: 26em;
}
pre {
background-color: #eee;
padding: 5px 20px;
border-radius: 4px;
}
</style>
</head>
<body>
<p style="color: red">Welcome to console.tools.js - 请打开控制台!</p>
<pre id="tip"></pre>
<script src="./console.tools.js"></script>
<script>
var tools = new ConsoleTools({
timer: 1000, // 默认500ms
clean: false, // 默认开启
onchange: function(e) { // 回调
document.getElementById("tip").innerHTML = '<p>' + JSON.stringify(e, null, 2) + '</p>'
}
})
tools.opened()
// setTimeout(function() {
// tools.closed()
// }, 3000)
// setTimeout(function() {
// tools.opened()
// }, 6000)
</script>
</body>
</html>