var arg = 0;
for (var pixel of row.querySelectorAll('input')) {
arg *= 2;
- if (pixel.checked) {
- arg += 1
- }
+ if (pixel.checked) arg += 1
}
args.push(arg.toString());
cstr += "\\" + arg.toString(8).padStart(2, "0");
}
- if (c_update_needed) {
+ if (c_update_needed)
document.getElementById("c").value = ` {"${cstr}", U() },`;
- }
Bedstead({
arguments: args,
print: function(charstring) {
document.querySelector('#inpane').reset();
for (row of document.querySelector('#pixels').rows) {
match = re.exec(c);
- if (match == null) {
- break;
- }
+ if (match == null) break;
rowbits = Number.parseInt(match[0], 8);
for (var pixel
of Array.from(row.querySelectorAll('input')).reverse()) {
update_glyph();
}
function init() {
- for (var e of document.querySelectorAll('#pixels input')) {
+ for (var e of document.querySelectorAll('#pixels input'))
e.onchange = e => update_glyph(true);
- }
document.querySelector('#c').oninput = function(e) {
from_c(this.value);
update_glyph(false);
Bedstead = module.default;
// This script is loaded asynchronously, so make sure the DOM is
// loaded before touching it.
- if (document.readyState === "loading") {
+ if (document.readyState === "loading")
document.addEventListener("DOMContentLoaded", init);
- } else {
+ else
init();
- }
});
]]>
</script>