-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathterminal.html
More file actions
57 lines (57 loc) · 1.39 KB
/
terminal.html
File metadata and controls
57 lines (57 loc) · 1.39 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
57
<html>
<head>
<meta charset="UTF-8">
<script src="./jsonviewer.js"></script>
<link href="./jsonviewer.css" rel="stylesheet">
<meta property="og:title" content="JSON Viewer">
<meta property="og:description" content="JSON Viewer">
<meta property="description" content="JSON Viewer">
</head>
<body>
<div id="output"></div>
</body>
</html>
<script>
{
let consolelog = console.log;
log = (obj,elm,defaultopen=false)=>{
let pelm = document.createElement("p");
pelm.classList.add("jsonviewer");
pelm.appendChild(json_child(obj,defaultopen));
elm.appendChild(pelm);
}
console.log = (x)=>{
consolelog(x);
log(x,document.getElementById("output"),false);
}
}
</script>
<script>
console.log("hello");
console.log("good morning");
</script>
<style>
p.jsonviewer {
width: 100%;
display: block;
padding: 0px;
padding-left: 10px;
margin: 0px;
border: 1px solid gray;
border-left: 0;
border-right: 0;
}
body {
background-color: black;
color: white;
height: 100dvh;
width: 100dvw;
padding: 0;
margin: 0;
font-size: 1.2rem;
display: flex;
}
#output {
width: 100%;
}
</style>