diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-20 08:24:35 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-20 08:24:35 -0500 |
| commit | a180b95f60314872e4498bfcf56fc8fb5c34b521 (patch) | |
| tree | 0b6b03687a2fb9e37f26275bba7b39d57bc1dfaa /docs/repl.js | |
| parent | 2657f747a1cbc740b2432f6c60b19bc6c245f8cc (diff) | |
Make primitives in explain output clickable
Diffstat (limited to 'docs/repl.js')
| -rw-r--r-- | docs/repl.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/repl.js b/docs/repl.js index c3dbe1e2..6ed4f725 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -54,9 +54,11 @@ if (doc.doexplain) doc.doexplain.onclick = () => { e.innerHTML = s?drawEval(s,c).map(l=>l.join("")).join("\n"):''; setTimeout(() => { e.querySelectorAll('tspan').forEach(t => { - let h = primhelp[t.textContent]; + let c = t.textContent, h = primhelp[c]; if (!h) return; t.innerHTML = t.textContent+'<title>'+h+'</title>'; + t.classList.add('clickable'); + t.onclick = ev => { window.open('help/'+helpurl[c]+'.html'); } }); }, 0); } |
