Artem0729 commited on
Commit
12e76e8
·
verified ·
1 Parent(s): 52ef895

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -419,11 +419,18 @@ js_code = """
419
  }
420
  }
421
 
422
- setTimeout(() => {
423
- document.getElementById('message-btn').addEventListener('click', toggleChatbox);
424
- const userInputBox = document.querySelector('textarea.scroll-hide');
425
- userInputBox?.addEventListener('keypress', autoScroll, false);
426
- }, 2000);
 
 
 
 
 
 
 
427
  </script>
428
  """
429
 
 
419
  }
420
  }
421
 
422
+ setInterval(() => {
423
+ const messageBtn = document.getElementById('message-btn');
424
+ if (messageBtn) {
425
+ messageBtn.addEventListener('click', toggleChatbox);
426
+ }
427
+
428
+ const userInputBox = document.querySelector('textarea.scroll-hide');
429
+ if (userInputBox) {
430
+ userInputBox.addEventListener('keypress', autoScroll, false);
431
+ }
432
+ }, 1000);
433
+
434
  </script>
435
  """
436