diff options
author | hackademix <giorgio@maone.net> | 2019-03-05 00:58:13 +0100 |
---|---|---|
committer | hackademix <giorgio@maone.net> | 2019-03-05 00:58:13 +0100 |
commit | 3f325cea256c5fd082a1c029d27f63ab93440ba6 (patch) | |
tree | ac2367c1a0a5e967bd83a5760f85c85b65685d08 /bg | |
parent | 5d9ab3778bcdb12913333deff64196590688789f (diff) |
Fixed inline whitelisting regressions (issue #35).
Diffstat (limited to 'bg')
-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" |