diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-02 17:52:06 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-02 17:52:06 -0400 |
| commit | c3ebb83d3b38d17413daaf2e1a46835d468192c4 (patch) | |
| tree | ea3464e26cbed16c419b03b3c7661e8a8e63e983 /docs/repl.js | |
| parent | a16372ada08a450f3c5c7dc42485926c17c973b5 (diff) | |
Automatically increase REPL size for long linked code
Diffstat (limited to 'docs/repl.js')
| -rw-r--r-- | docs/repl.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/repl.js b/docs/repl.js index cc7a7cf4..61c3d433 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -169,9 +169,9 @@ if (location.hash) { if (s.slice(0,7)==='explain') ee=1; }); if (code!==undefined) { - let b=atob(code); - b=new Uint8Array([...b].map(c=>c.charCodeAt(0))); - setcount(doc.code.value = (new TextDecoder()).decode(b)); + let b=new Uint8Array([...atob(code)].map(c=>c.charCodeAt(0))); + let c=doc.code.value=(new TextDecoder()).decode(b); + setcount(c); doc.code.rows = Math.max(doc.code.rows, 1+c.split("\n").length); if (ee && doc.doexplain) doc.doexplain.onclick(); nojs = () => { throw Error("Possible script injection; press Run to confirm"); } if (run) { sysvals.js=nojs; repl(); } |
