Add: match global sections

This commit is contained in:
eight 2018-10-06 13:48:46 +08:00
parent fedf844ddd
commit 1f18b13a92

View File

@ -331,6 +331,12 @@ const styleManager = (() => {
if (section.regexps && section.regexps.some(r => compileRe(r).test(url))) {
return true;
}
if (
(!section.regexps || !section.regexps.length) &&
(!section.urlPrefixes || !section.urlPrefixes.length) &&
(!section.urls || !section.urls.length) &&
(!section.domains || !section.domains.length)
)
return false;
}