Revert changes to triscit
Homepage / publish (push) Successful in 10s Details

This commit is contained in:
Neale Pickett 2024-09-03 13:42:57 -06:00
parent 100f309ed9
commit fc1afd8681
2 changed files with 1 additions and 16 deletions

View File

@ -43,10 +43,7 @@ type: bare
<div class="field">
<label class="label">Input</label>
<div class="control">
<input class="input" data-control="input" placeholder="used by READ instruction" value="hello">
</div>
<div class="control">
<input class="input" data-control="0xinput" placeholder="used by READ instruction">
<input class="input" data-control="input" placeholder="\x00 style escapes accepted" value="hello">
</div>
</div>
<div class="field">

View File

@ -51,9 +51,6 @@ class UI {
case "input":
e.addEventListener("input", () => this.SetInput())
break
case "0xinput":
e.addEventListener("input", () => this.SetInput(true))
break
case "program":
e.addEventListener("input", () => this.SetProgram())
}
@ -189,18 +186,9 @@ class UI {
this.Reset()
}
Set0xInput() {
let e = document.querySelector('[data-control="0xinput"]')
let x = e.value || ""
let v = Binutils.Unhexlify(x)
// XXX: escape v and fill into the input
this.input = Binutils.Unhexlify(v)
this.Reset()
}
SetInput() {
let e = document.querySelector('[data-control="input"]')
let v = e.value || ""
let x = Binutils.Hexlify(v)
this.input = Binutils.Unescape(v)
this.Reset()
}