lokesh341 commited on
Commit
7d43ab3
·
verified ·
1 Parent(s): feda747

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +3 -3
templates/index.html CHANGED
@@ -102,11 +102,11 @@
102
 
103
  recognition.start();
104
  recognition.onresult = function(event) {
105
- const transcript = event.results[0][0].transcript.trim();
106
 
107
  if (isNameCaptured && !isEmailCaptured) {
108
- const cleanedEmail = transcript.replace(/\s/g, '@');
109
- emailInput.value = cleanedEmail;
110
  status.textContent = 'Registration complete.';
111
  speak("Registration complete. Go to the next step and take the order you want.");
112
  setTimeout(() => location.reload(), 20000);
 
102
 
103
  recognition.start();
104
  recognition.onresult = function(event) {
105
+ let transcript = event.results[0][0].transcript.trim();
106
 
107
  if (isNameCaptured && !isEmailCaptured) {
108
+ const cleanedEmail = transcript.replace(/\s/g, '').replace(/\bat\b/gi, '@');
109
+ emailInput.value = cleanedEmail.replace(/@+/g, '@'); // Ensure only one @
110
  status.textContent = 'Registration complete.';
111
  speak("Registration complete. Go to the next step and take the order you want.");
112
  setTimeout(() => location.reload(), 20000);