From 00ef650b0e1873f1d04631d8e156c4ecb921453e Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Sat, 14 Mar 2026 11:46:35 -0400 Subject: [PATCH] Replace translate preview popup with inline iframe Firefox (and other browsers) block window.open popups from the translate modal. Render translated HTML in an iframe via blob URL instead. Fix translate modal header layout by removing negative margin hack, use proper article padding structure. Add CSS for iframe preview and raw HTML toggle. --- public/src/translate-modal.js | 164 ++++++++++++------------- public/src/uncloseai-modal-builtin.css | 44 ++++++- public/src/uncloseai-modal-pico.css | 48 +++++++- public/src/widget-library.js | 14 ++- 4 files changed, 176 insertions(+), 94 deletions(-) diff --git a/public/src/translate-modal.js b/public/src/translate-modal.js index 39a66cc..fc8d9a1 100644 --- a/public/src/translate-modal.js +++ b/public/src/translate-modal.js @@ -487,101 +487,91 @@ ${samplePreserved}`; translatedText.includes(" window.UNCLOSEAI_SKIP_INIT = true; - `; +