From e2772c27077a8d9399183ff3d6241ebc5c4c82b8 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Sat, 3 Aug 2024 04:32:47 -0700 Subject: [PATCH] Add hide function ability --- index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.html b/index.html index 1fba21d..cc6fa5e 100644 --- a/index.html +++ b/index.html @@ -22,6 +22,7 @@

Visualize a recursive function

+
@@ -132,8 +137,10 @@

Visualize a recursive function

const urlParams = new URLSearchParams(window.location.search); const funcDef = urlParams.get('function_definition'); const funcCall = urlParams.get('function_call'); + const hideFunc = urlParams.get('hide_function'); if (funcDef) document.getElementById('function-definition-textarea').value = funcDef; if (funcCall) document.getElementById('function-call-input').value = funcCall; + if (hideFunc == 'true') document.getElementById('function-code-container').style.display = "none"; const readyToViz = funcDef && funcCall;