aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarvin Borner2024-04-08 02:50:04 +0200
committerMarvin Borner2024-04-08 03:15:22 +0200
commit9f20d4168d7ced4636a121d26b5c90d2230627cf (patch)
tree1ddd1724075985a02d74f45a5f545d6e6c7507b9
parent7932d175fa27055356cc4c307a990db0d9071ee3 (diff)
Mobile
-rw-r--r--index.html29
-rw-r--r--style.css2
2 files changed, 21 insertions, 10 deletions
diff --git a/index.html b/index.html
index 0393d8c..d127106 100644
--- a/index.html
+++ b/index.html
@@ -154,14 +154,27 @@ qsplit = \(0 \\\\\((((0 ((4 \((((0 \\1) \\1) \\1) \\1)) \((((0 \\0) \\0) \\0) \\
clearScreen(worker);
clearErrors();
console.time("reduceLoop");
- reduceLoop(
- worker,
- root,
- app(parse(window.term.value))(
- parse("\\((((0 \\\\1) \\\\1) \\\\1) \\\\1)"),
- ),
- );
- console.timeEnd("reduceLoop");
+ window.render.disabled = true;
+ window.render.textContent = "Rendering...";
+
+ // button doesn't update text without timeout
+ setTimeout(() => {
+ try {
+ reduceLoop(
+ worker,
+ root,
+ app(parse(window.term.value))(
+ parse("\\((((0 \\\\1) \\\\1) \\\\1) \\\\1)"),
+ ),
+ );
+ } catch (e) {
+ console.error(e);
+ } finally {
+ window.render.textContent = "Render!";
+ window.render.disabled = false;
+ console.timeEnd("reduceLoop");
+ }
+ }, 0);
});
</script>
</body>
diff --git a/style.css b/style.css
index 30003d2..96368ff 100644
--- a/style.css
+++ b/style.css
@@ -56,8 +56,6 @@ span#error {
}
footer {
- position: fixed;
- bottom: 0;
text-align: center;
}