diff --git a/background/style-manager.js b/background/style-manager.js index a30f2d66..1a505a12 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -387,7 +387,8 @@ const styleManager = (() => { function urlMatchSection(url, section) { // FIXME: match sub domains? - if (section.domains && section.domains.includes(getDomain(url))) { + const domain = getDomain(url); + if (section.domains && section.domains.some(d => d === domain || domain.endsWith(`.${d}`))) { return true; } if (section.urlPrefixes && section.urlPrefixes.some(p => url.startsWith(p))) {