summaryrefslogtreecommitdiff
path: root/inject-css.js
diff options
context:
space:
mode:
authorsameerasw <[email protected]>2025-04-14 22:42:07 +0530
committersameerasw <[email protected]>2025-04-14 22:42:07 +0530
commit08477ca5c8a1f58e880e5186773309567a2b5c2a (patch)
tree22408dfaa508e08252b5b9cae6596faf865e86cc /inject-css.js
parent3176cd97d89b3ae161f09956973ecb7ec01a9c3f (diff)
transparency global toggle and more logging
Diffstat (limited to 'inject-css.js')
-rw-r--r--inject-css.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/inject-css.js b/inject-css.js
index 2fe96c0..27b4ecc 100644
--- a/inject-css.js
+++ b/inject-css.js
@@ -51,7 +51,9 @@ function applyStyles(css) {
try {
// For immediate application, directly set textContent
// as this is more reliably applied in early document stages
- styleElement.textContent = css.trim() + `
+ styleElement.textContent =
+ css.trim() +
+ `
/* Remove FOUC prevention once styles are loaded */
body { opacity: 1 !important; }`;
@@ -197,11 +199,14 @@ async function injectCSS(hostname, features) {
let combinedCSS = "";
for (const [feature, css] of Object.entries(features)) {
// Skip any transparency feature if disableTransparency is enabled globally
- if (globalSettings.disableTransparency && feature.toLowerCase().includes("transparency")) {
+ if (
+ globalSettings.disableTransparency &&
+ feature.toLowerCase().includes("transparency")
+ ) {
if (logging) console.log(`Skipping transparency feature: ${feature}`);
continue;
}
-
+
// Apply the feature if it's not explicitly disabled
if (featureSettings[feature] !== false) {
combinedCSS += css + "\n";