nagasurendra commited on
Commit
a5033dd
·
verified ·
1 Parent(s): 5fe6f92

Update static/script.js

Browse files
Files changed (1) hide show
  1. static/script.js +1 -2
static/script.js CHANGED
@@ -355,7 +355,7 @@ function displayOptions(options) {
355
  options.forEach(opt => {
356
  const button = document.createElement('button');
357
  button.textContent = opt.text;
358
- button.className = option-button ${opt.class};
359
  button.onclick = () => {
360
  addMessage('user', opt.text);
361
  conversation.push({ role: 'user', message: opt.text });
@@ -380,7 +380,6 @@ function displayOptions(options) {
380
  chatMessages.appendChild(backButton);
381
  }
382
 
383
-
384
  document.getElementById('userInput').addEventListener('keypress', function(e) {
385
  if (e.key === 'Enter') {
386
  sendMessage();
 
355
  options.forEach(opt => {
356
  const button = document.createElement('button');
357
  button.textContent = opt.text;
358
+ button.className = `option-button ${opt.class}`;
359
  button.onclick = () => {
360
  addMessage('user', opt.text);
361
  conversation.push({ role: 'user', message: opt.text });
 
380
  chatMessages.appendChild(backButton);
381
  }
382
 
 
383
  document.getElementById('userInput').addEventListener('keypress', function(e) {
384
  if (e.key === 'Enter') {
385
  sendMessage();