diff options
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/index.html b/src/web/index.html index 4cf7476..fbc203d 100644 --- a/src/web/index.html +++ b/src/web/index.html @@ -41,7 +41,7 @@ let machine = null; for (const n of examples) { const o = document.createElement('option'); o.value = n; o.textContent = n + '.zc'; $('ex').appendChild(o); } $('ex').onchange = async () => { - try { $('src').value = await (await fetch('../examples/' + $('ex').value + '.zc')).text(); } + try { $('src').value = await (await fetch('examples/' + $('ex').value + '.zc')).text(); } catch (e) { $('out').textContent = 'the examples folder is not served next to this page'; } }; $('run').onclick = async () => { @@ -55,6 +55,6 @@ } catch (e) { $('out').textContent = String(e); $('status').textContent = 'failed'; } }; ZC.load('zc.wasm').then(m => { machine = m; $('status').textContent = 'ready'; }) - .catch(e => { $('status').textContent = 'could not load zc.wasm; run src/web/build.sh and serve this folder over http'; }); + .catch(e => { $('status').textContent = 'could not load zc.wasm; run make web and serve build/web over http'; }); </script> </html> |
