diff options
Diffstat (limited to 'bg/ListManager.js')
-rw-r--r-- | bg/ListManager.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bg/ListManager.js b/bg/ListManager.js index e0a85e9..354866d 100644 --- a/bg/ListManager.js +++ b/bg/ListManager.js @@ -50,6 +50,14 @@ class ListManager { */ getStatus(key, defValue = "unknown") { let {blacklist, whitelist} = this.lists; + let inline = ListStore.viewSourceItem(key); + if (inline) { + return blacklist.contains(inline) + ? "blacklisted" + : whitelist.contains(inline) ? "whitelisted" + : defValue; + } + let match = key.match(/\(([^)]+)\)(?=[^()]*$)/); if (!match) { let url = ListStore.urlItem(key); @@ -61,7 +69,6 @@ class ListManager { } let [hashItem, srcHash] = match; // (hash), hash - return blacklist.contains(hashItem) ? "blacklisted" : this.builtInHashes.has(srcHash) || whitelist.contains(hashItem) ? "whitelisted" |