From 2548c64c099a89c76a9efa0f894f3d3b1086b4d6 Mon Sep 17 00:00:00 2001 From: Chris Patuzzo Date: Mon, 15 Jan 2024 11:52:30 +0000 Subject: [PATCH] Make the Run/Stop buttons respond to whether the program is running --- pyodide/index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pyodide/index.html b/pyodide/index.html index 6a5168f..10fdf07 100644 --- a/pyodide/index.html +++ b/pyodide/index.html @@ -91,6 +91,9 @@ let interruptBuffer; run.addEventListener("click", () => { + run.disabled = true; + stop.disabled = false; + output.innerText = ""; visual.innerText = ""; config.innerText = ""; @@ -120,10 +123,10 @@ if (output.innerText === "Loading pyodide...") { output.innerText = ""; - - run.disabled = false; - stop.disabled = false; } + + run.disabled = false; + stop.disabled = true; }; const handleOutput = (stream, content) => {