aboutsummaryrefslogtreecommitdiff
path: root/bg
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2019-03-05 00:58:13 +0100
committerhackademix <giorgio@maone.net>2019-03-05 00:58:13 +0100
commit3f325cea256c5fd082a1c029d27f63ab93440ba6 (patch)
treeac2367c1a0a5e967bd83a5760f85c85b65685d08 /bg
parent5d9ab3778bcdb12913333deff64196590688789f (diff)
Fixed inline whitelisting regressions (issue #35).
Diffstat (limited to 'bg')
-rw-r--r--bg/ListManager.js9
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"