@@ -136,9 +136,11 @@ function main() {
136
136
selr . onchange = run ;
137
137
138
138
var hidestd = document . getElementById ( "hide-std" ) ;
139
+ var outputHanzi = document . getElementById ( "output-hanzi" ) ;
139
140
var outdiv = document . getElementById ( "out" ) ;
140
141
141
142
hidestd . onchange = run ;
143
+ outputHanzi . onchange = run ;
142
144
143
145
function run ( ) {
144
146
highlightCode ( ) ;
@@ -158,6 +160,7 @@ function main() {
158
160
hljs . highlightBlock ( document . getElementById ( "js" ) ) ;
159
161
160
162
evalCompiled ( code , {
163
+ outputHanzi : outputHanzi . checked ,
161
164
output : ( ...args ) => {
162
165
outdiv . innerText += args . join ( " " ) + "\n" ;
163
166
}
@@ -185,7 +188,19 @@ pre{tab-size: 4;}
185
188
<script>${ utils . catsrc ( ) } </script>
186
189
<body style="background:#272822;padding:20px;color:white;font-family:sans-serif;">
187
190
<h2><i>wenyan-lang</i></h2>
188
- <table><tr><td><select id="pick-example"></select><button id="run">Run</button> <input type="checkbox" id="auto-hl"/><small>Auto Highlight</small> <input type="checkbox" id="hide-std" checked=""/><small>Hide Imported Code</small> <small>Romanization</small><select id="pick-roman"></select></td></tr><tr><td id="in" valign="top"><div class="tbar">EDITOR</div></td><td rowspan="2" valign="top"><div class="tbar">COMPILED JAVASCRIPT</div><pre id="js"></pre></td></tr><tr><td valign="top"><div class="tbar">OUTPUT</div><pre id="out"></pre></td></tr></table>
191
+ <table><tr><td>
192
+ <select id="pick-example"></select><button id="run">Run</button>
193
+
194
+
195
+ <input type="checkbox" id="auto-hl"/><small>Auto Highlight</small>
196
+
197
+ <input type="checkbox" id="hide-std" checked=""/><small>Hide Imported Code</small>
198
+
199
+ <input type="checkbox" id="output-hanzi" checked=""/><small>Output Hanzi</small>
200
+
201
+ <small>Romanization</small><select id="pick-roman"></select>
202
+
203
+ </td></tr><tr><td id="in" valign="top"><div class="tbar">EDITOR</div></td><td rowspan="2" valign="top"><div class="tbar">COMPILED JAVASCRIPT</div><pre id="js"></pre></td></tr><tr><td valign="top"><div class="tbar">OUTPUT</div><pre id="out"></pre></td></tr></table>
189
204
<script>var STDLIB = ${ JSON . stringify ( lib ) } ;</script>
190
205
<script>var prgms = ${ JSON . stringify ( prgms ) } ;</script>
191
206
<script>var examplesAlias = ${ JSON . stringify ( examplesAlias ) } ;</script>
0 commit comments