lokesh341 commited on
Commit
3811ea2
·
verified ·
1 Parent(s): d2f0c93

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +3 -2
templates/index.html CHANGED
@@ -105,7 +105,8 @@
105
  let transcript = event.results[0][0].transcript.trim();
106
 
107
  if (isNameCaptured && !isEmailCaptured) {
108
- const cleanedEmail = transcript.replace(/\b(at|At|AT)\b/g, '@');
 
109
  emailInput.value = cleanedEmail.replace(/@{2,}/g, '@'); // Ensure only one @
110
  status.textContent = 'Registration complete.';
111
  speak("Registration complete. Go to the next step and take the order you want.");
@@ -124,7 +125,7 @@
124
  }
125
 
126
  window.onload = function () {
127
- setTimeout(startProcess, 4000);
128
  };
129
  </script>
130
  </body>
 
105
  let transcript = event.results[0][0].transcript.trim();
106
 
107
  if (isNameCaptured && !isEmailCaptured) {
108
+ let cleanedEmail = transcript.replace(/\b(at|At|AT)\b/g, '@').replace(/\s+/g, '');
109
+ cleanedEmail = cleanedEmail.charAt(0).toUpperCase() + cleanedEmail.slice(1); // Capitalize first letter
110
  emailInput.value = cleanedEmail.replace(/@{2,}/g, '@'); // Ensure only one @
111
  status.textContent = 'Registration complete.';
112
  speak("Registration complete. Go to the next step and take the order you want.");
 
125
  }
126
 
127
  window.onload = function () {
128
+ setTimeout(startProcess, 2000);
129
  };
130
  </script>
131
  </body>