Skip to content

Commit b6bcf5b

Browse files
authored
Update ti.html
1 parent b6cef9b commit b6bcf5b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

true/ti.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<title>true.js</title>
22
<script>
33
function main(){
4+
var code=document.getElementById("program")
45
url=location.origin + location.pathname;
5-
if ( url!=location.href ) { code=decodeURIComponent(location.href.split("#")[1]) }
6-
var code=document.getElementById("program").value
6+
if ( url!=location.href ) { code.value=decodeURIComponent(location.href.split("#")[1]) }
77
var input=document.getElementById("input").value.split("\n")
8+
code=code.value
89
p=0; output=''; s=[]; ts=[]; /* m=0;*/
910
num=["0","1","2","3","4","5","6","7","8","9"]
1011
while (code.length>p){
@@ -17,6 +18,7 @@
1718
//else if (code[p]=="\n"){ break }
1819
p++
1920
}
21+
if code
2022
document.getElementById("console").innerHTML=output+'\nSTACK: ['+s+']\nTEMPSTACK: ['+ts+']\nBYTES: '+code.length
2123
}
2224
</script>

0 commit comments

Comments
 (0)