summaryrefslogtreecommitdiff
path: root/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'background.js')
-rw-r--r--background.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/background.js b/background.js
index 357e5a0..682441c 100644
--- a/background.js
+++ b/background.js
@@ -6,7 +6,10 @@ function applyCSSToTab(tab) {
if (settings.transparentZenSettings?.enableStyling) {
browser.storage.local.get("styles").then((data) => {
const cssFileName = Object.keys(data.styles?.website || {}).find(
- (key) => hostname.includes(key.replace(".css", ""))
+ (key) => {
+ const siteName = key.replace(".css", "");
+ return hostname === siteName || hostname === `www.${siteName}`;
+ }
);
if (cssFileName) {