diff options
author | sameerasw <[email protected]> | 2025-03-05 18:40:55 +0530 |
---|---|---|
committer | sameerasw <[email protected]> | 2025-03-05 18:40:55 +0530 |
commit | 5bb01b6cc833c3e3609a0992d2512137748c8e89 (patch) | |
tree | 908332fb3756cefc79a4a4359ec15d5488ba09f6 /inject-css.js | |
parent | bbeae845b702727f0ffaf3e49c85ed9bc0f971ab (diff) |
feature complete for #4 - forced theems for unthemed websites.
Diffstat (limited to 'inject-css.js')
-rw-r--r-- | inject-css.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/inject-css.js b/inject-css.js index 88ddacc..ea1525a 100644 --- a/inject-css.js +++ b/inject-css.js @@ -1,3 +1,5 @@ +import { SKIP_FORCE_THEMING_KEY } from "./shared/constants.js"; + let logging = false; if (logging) console.log("inject-css.js script loaded"); @@ -28,7 +30,16 @@ if (logging) console.log("inject-css.js script loaded"); return currentUrl === siteName || currentUrl === `www.${siteName}`; }); + const skipListData = await browser.storage.local.get( + SKIP_FORCE_THEMING_KEY + ); + const skipList = skipListData[SKIP_FORCE_THEMING_KEY] || []; + if (!cssFileName && settings.transparentZenSettings?.forceStyling) { + if (skipList.includes(currentUrl)) { + if (logging) console.log("Skipping forced theming for this site"); + return; + } cssFileName = "example.com.css"; } |