From cda3455a22ecb077a04b083e57e6b53f50e45e01 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Thu, 3 Jul 2025 21:36:13 -0400 Subject: [PATCH] fix: remove enforceModalTextColors function and set black text directly on textarea and dropdowns --- src/ui-themes.js | 14 -------------- src/uncloseai-embed-modal.js | 10 ++++------ 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/ui-themes.js b/src/ui-themes.js index be60965..1dbc70f 100644 --- a/src/ui-themes.js +++ b/src/ui-themes.js @@ -96,17 +96,3 @@ export function initializeChunkFiveFont() { document.head.appendChild(fontFaceStyle); } -// Simple text color fix for white backgrounds -export function enforceModalTextColors() { - const modalElement = document.getElementById('uncloseai-embedded-modal'); - if (!modalElement) return; - - // Force black text on all form elements and content - modalElement.style.color = 'black'; - - // Fix specific form elements that might have white text - const inputs = modalElement.querySelectorAll('input, textarea, select, button'); - inputs.forEach(input => { - input.style.color = 'black'; - }); -} diff --git a/src/uncloseai-embed-modal.js b/src/uncloseai-embed-modal.js index 93cfbf7..32fb50c 100644 --- a/src/uncloseai-embed-modal.js +++ b/src/uncloseai-embed-modal.js @@ -8,7 +8,6 @@ import { detectCurrentTheme, getThemeColors, initializeChunkFiveFont, - enforceModalTextColors, } from "./ui-themes.js"; import { getUIText, @@ -169,7 +168,6 @@ function refreshModalUI() { async function openUncloseaiEmbeddedModalNew() { // Ensure ChunkFive font is loaded and text colors are enforced initializeChunkFiveFont(); - enforceModalTextColors(); // Get theme colors const theme = detectCurrentTheme(); @@ -368,7 +366,7 @@ async function openUncloseaiEmbeddedModalNew() { border-radius: 6px; font-size: 14px; background: ${colors.inputBackground}; - color: ${colors.primaryText}; + color: black; `; // Store models for selection handler @@ -468,7 +466,7 @@ async function openUncloseaiEmbeddedModalNew() { border-radius: 6px; font-size: 14px; background: ${colors.inputBackground}; - color: ${colors.primaryText}; + color: black; `; const voices = ["alloy", "echo", "fable", "onyx", "nova", "shimmer"]; @@ -516,7 +514,7 @@ async function openUncloseaiEmbeddedModalNew() { border-radius: 6px; font-size: 14px; background: ${colors.inputBackground}; - color: ${colors.primaryText}; + color: black; `; // Add options for each supported language @@ -1149,7 +1147,7 @@ async function openUncloseaiEmbeddedModalNew() { line-height: 1.4; outline: none; background: ${colors.inputBackground}; - color: ${colors.primaryText}; + color: black; transition: border-color 0.2s; `; input.onfocus = () => (input.style.borderColor = colors.focusBorder);