Fix: match subdomain
This commit is contained in:
parent
a57b3b2716
commit
99626e4a48
|
@ -387,7 +387,8 @@ const styleManager = (() => {
|
||||||
|
|
||||||
function urlMatchSection(url, section) {
|
function urlMatchSection(url, section) {
|
||||||
// FIXME: match sub domains?
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
if (section.urlPrefixes && section.urlPrefixes.some(p => url.startsWith(p))) {
|
if (section.urlPrefixes && section.urlPrefixes.some(p => url.startsWith(p))) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user