Debian Codegraph @

example/ivy/android/app/src/main/assets/tape.html

raw
1 <!--
2 Copyright 2015 The Go Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style
4 license that can be found in the LICENSE file.
5 -->
6 <html>
7 <head>
8 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" charset="UTF-8">
9 <style>
10 body {
11 font-family: sans-serif;
12 }
13 div {
14 padding: 1;
15 white-space: pre-wrap;
16 font-family: "Roboto Mono", monospace;
17 }
18 .comment {
19 color: grey;
20 }
21 .expr {
22 font-weight: bold;
23 }
24 .flow-hide {
25 text-overflow: ellipsis;
26 word-break: break-all;
27 white-space: nowrap;
28 overflow: hidden;
29 }
30 .flow-show {
31 word-break: break-all;
32 }
33 </style>
34
35 <script>
36
37 function flowClick(el) {
38 el.classList.toggle("flow-hide");
39 el.classList.toggle("flow-show");
40 }
41
42 function appendDiv(txt, tag) {
43 var el = document.createElement("div");
44 el.innerHTML = txt;
45 if (tag == "comment") {
46 el.classList.add("comment");
47 } else if (tag == "expr") {
48 el.classList.add("expr");
49 } else {
50 el.classList.add("flow-show");
51 el.onclick = function() {
52 flowClick(el);
53 };
54 }
55 document.body.appendChild(el);
56 }
57
58 </script>
59 <body>
60 </body>
61 </html>