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"> <div class="field">
<label class="label">Input</label> <label class="label">Input</label>
<div class="control"> <div class="control">
<input class="input" data-control="input" placeholder="used by READ instruction" value="hello"> <input class="input" data-control="input" placeholder="\x00 style escapes accepted" value="hello">
</div>
<div class="control">
<input class="input" data-control="0xinput" placeholder="used by READ instruction">
</div> </div>
</div> </div>
<div class="field"> <div class="field">

View File

@ -51,9 +51,6 @@ class UI {
case "input": case "input":
e.addEventListener("input", () => this.SetInput()) e.addEventListener("input", () => this.SetInput())
break break
case "0xinput":
e.addEventListener("input", () => this.SetInput(true))
break
case "program": case "program":
e.addEventListener("input", () => this.SetProgram()) e.addEventListener("input", () => this.SetProgram())
} }
@ -189,18 +186,9 @@ class UI {
this.Reset() 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() { SetInput() {
let e = document.querySelector('[data-control="input"]') let e = document.querySelector('[data-control="input"]')
let v = e.value || "" let v = e.value || ""
let x = Binutils.Hexlify(v)
this.input = Binutils.Unescape(v) this.input = Binutils.Unescape(v)
this.Reset() this.Reset()
} }