diff options
-rw-r--r-- | background.js | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/background.js b/background.js index 48f6add..4dcb7a5 100644 --- a/background.js +++ b/background.js @@ -722,7 +722,6 @@ async function applyCSS(tabId, hostname, features) { let skippedHoverFeatures = 0; let skippedFooterFeatures = 0; let skippedDisabledFeatures = 0; - let totalTransparencyFeatures = 0; for (const [feature, css] of Object.entries(features)) { const isTransparencyFeature = feature @@ -731,11 +730,6 @@ async function applyCSS(tabId, hostname, features) { const isHoverFeature = feature.toLowerCase().includes("hover"); const isFooterFeature = feature.toLowerCase().includes("footer"); - // Count total transparency features - if (isTransparencyFeature) { - totalTransparencyFeatures++; - } - // Skip any transparency feature if disableTransparency is enabled globally if (globalSettings.disableTransparency && isTransparencyFeature) { console.log(`DEBUG: Skipping transparency feature: ${feature}`); @@ -765,35 +759,11 @@ async function applyCSS(tabId, hostname, features) { } else { console.log(`DEBUG: Feature disabled in site settings: ${feature}`); skippedDisabledFeatures++; - // Count disabled transparency features for site-specific logic - if (isTransparencyFeature) { - skippedTransparencyFeatures++; - } } } - // Check if transparency is effectively disabled (globally or all site transparency features disabled) - const transparencyDisabled = - globalSettings.disableTransparency || - (totalTransparencyFeatures > 0 && - skippedTransparencyFeatures === totalTransparencyFeatures); - - // Add background color CSS if transparency is disabled - if (transparencyDisabled) { - const backgroundCSS = ` -/* ZenInternet: Background color when transparency is disabled */ -body { - background-color: light-dark(#fff, #111) !important; -} -`; - combinedCSS += backgroundCSS; - console.log( - `DEBUG: Added background color CSS due to disabled transparency` - ); - } - console.log( - `DEBUG: CSS Summary - included: ${includedFeatures}, skipped transparency: ${skippedTransparencyFeatures}, skipped hover: ${skippedHoverFeatures}, skipped footer: ${skippedFooterFeatures}, skipped disabled: ${skippedDisabledFeatures}, transparency disabled: ${transparencyDisabled}` + `DEBUG: CSS Summary - included: ${includedFeatures}, skipped transparency: ${skippedTransparencyFeatures}, skipped hover: ${skippedHoverFeatures}, skipped footer: ${skippedFooterFeatures}, skipped disabled: ${skippedDisabledFeatures}` ); if (combinedCSS) { |