From c3ebb83d3b38d17413daaf2e1a46835d468192c4 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 2 May 2021 17:52:06 -0400 Subject: Automatically increase REPL size for long linked code --- docs/repl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') 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(); } -- cgit v1.2.3