From 6d4337bccfa30391e38dc2613e96b679e40ae11d Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Tue, 2 Jun 2026 18:44:31 +0300 Subject: [PATCH] Auto-deploy: 2026-06-02 18:44:31 --- popup.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/popup.js b/popup.js index 44ed4cf..c2e7bec 100644 --- a/popup.js +++ b/popup.js @@ -288,7 +288,9 @@ function initDictation() { statusEl.textContent = '✨ جارٍ التحسين بواسطة الذكاء الاصطناعي...'; refineWithGemini(textToProcess); } else { - statusEl.textContent = 'اضغط للتحدث (بالعربية)'; + if (!statusEl.textContent.includes('❌')) { + statusEl.textContent = 'اضغط للتحدث (بالعربية)'; + } } } @@ -347,8 +349,16 @@ function initDictation() { iframe = document.createElement('iframe'); iframe.id = 'lja-dictation-frame'; iframe.src = url; - iframe.style.display = 'none'; - // Allow microphone explicitly if needed + // Avoid display:none because Chrome blocks SpeechRecognition in hidden cross-origin iframes + 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'); document.body.appendChild(iframe); }