diff --git a/public/index.html b/public/index.html index ec12906..4fa5726 100644 --- a/public/index.html +++ b/public/index.html @@ -10,6 +10,7 @@
Current Prompt
+ diff --git a/public/js/index.js b/public/js/index.js index eda1d13..22b9b5c 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,4 +1,9 @@ const socket = io.connect('/'); +const button = document.querySelector('button') socket.on('prompt sent', function (data) { + button.removeAttribute("disabled"); document.querySelector('dd').innerHTML = data; }); +button.addEventListener('click', (event)=>{ + button.setAttribute("disabled",true); +});