fix: échapper l'apostrophe dans 'Je t'écoute' (guillemets doubles JS)
Le guillemet simple français cassait la string JavaScript. Corrigé avec des guillemets doubles pour la chaîne contenant l'apostrophe.
This commit is contained in:
+1
-1
@@ -151,7 +151,7 @@ if(SpeechRecognition){
|
|||||||
function toggleMic(){
|
function toggleMic(){
|
||||||
if(!rec){alert('Reconnaissance vocale non supportée sur ce navigateur');return}
|
if(!rec){alert('Reconnaissance vocale non supportée sur ce navigateur');return}
|
||||||
if(listening){rec.stop();return}
|
if(listening){rec.stop();return}
|
||||||
listening=true;mic.classList.add('listening');mic.textContent='🔴';s.textContent='🎤 Je t\'écoute...';
|
listening=true;mic.classList.add('listening');mic.textContent='🔴';s.textContent="🎤 Je t'écoute...";
|
||||||
try{rec.start()}catch(e){stopListening()}
|
try{rec.start()}catch(e){stopListening()}
|
||||||
}
|
}
|
||||||
function stopListening(){listening=false;mic.classList.remove('listening');mic.textContent='🎤';if(s.textContent.includes('écoute'))s.textContent='🟢 Connecté — JARVIS v3 prêt'}
|
function stopListening(){listening=false;mic.classList.remove('listening');mic.textContent='🎤';if(s.textContent.includes('écoute'))s.textContent='🟢 Connecté — JARVIS v3 prêt'}
|
||||||
|
|||||||
Reference in New Issue
Block a user