From 1f18b13a9241f848d68ffc622c3a6f816436fd1c Mon Sep 17 00:00:00 2001 From: eight Date: Sat, 6 Oct 2018 13:48:46 +0800 Subject: [PATCH] Add: match global sections --- background/style-manager.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/background/style-manager.js b/background/style-manager.js index a82a69cb..4aee9df0 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -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; }