Auto-deploy: 2026-06-02 18:44:31

This commit is contained in:
Hamza-Ayed
2026-06-02 18:44:31 +03:00
parent 979a5bbdae
commit 6d4337bccf

View File

@@ -288,7 +288,9 @@ function initDictation() {
statusEl.textContent = '✨ جارٍ التحسين بواسطة الذكاء الاصطناعي...'; statusEl.textContent = '✨ جارٍ التحسين بواسطة الذكاء الاصطناعي...';
refineWithGemini(textToProcess); refineWithGemini(textToProcess);
} else { } else {
statusEl.textContent = 'اضغط للتحدث (بالعربية)'; if (!statusEl.textContent.includes('❌')) {
statusEl.textContent = 'اضغط للتحدث (بالعربية)';
}
} }
} }
@@ -347,8 +349,16 @@ function initDictation() {
iframe = document.createElement('iframe'); iframe = document.createElement('iframe');
iframe.id = 'lja-dictation-frame'; iframe.id = 'lja-dictation-frame';
iframe.src = url; iframe.src = url;
iframe.style.display = 'none'; // Avoid display:none because Chrome blocks SpeechRecognition in hidden cross-origin iframes
// Allow microphone explicitly if needed iframe.style.position = 'fixed';
iframe.style.top = '0';
iframe.style.left = '0';
iframe.style.width = '1px';
iframe.style.height = '1px';
iframe.style.opacity = '0';
iframe.style.pointerEvents = 'none';
iframe.style.zIndex = '-9999';
iframe.style.border = 'none';
iframe.setAttribute('allow', 'microphone'); iframe.setAttribute('allow', 'microphone');
document.body.appendChild(iframe); document.body.appendChild(iframe);
} }