And it's not a module because Safari can't handle that. -->
<script async="async"><![CDATA[
var Bedstead;
- function update_glyph() {
+ function update_glyph(c_update_needed) {
var args = [];
var cstr = "";
for (var row of document.querySelector('#pixels').rows) {
args.push(arg.toString());
cstr += "\\" + arg.toString(8).padStart(2, "0");
}
- document.getElementById("c").value =
- ` {"${cstr}", U() },`;
+ if (c_update_needed) {
+ document.getElementById("c").value = ` {"${cstr}", U() },`;
+ }
Bedstead({
arguments: args,
print: function(charstring) {
}
function init() {
for (var e of document.querySelectorAll('#pixels input')) {
- e.onchange = update_glyph;
+ e.onchange = e => update_glyph(true);
}
- document.querySelector('#inpane').onreset = update_glyph;
- update_glyph();
+ document.querySelector('#c').oninput = function(e) {
+ from_c(this.value);
+ update_glyph(false);
+ };
+ update_glyph(true);
}
import("./bedstead.js").then((module) => {
Bedstead = module.default;