From 2bee3260b45b559eb3bc75c6421dc7e573571cdb Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 8 Apr 2019 21:37:35 +0200 Subject: Fixed UI inconsistencies when whitelisting/blacklisting through wide wildcard matching. --- main_background.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main_background.js') diff --git a/main_background.js b/main_background.js index 5943fb8..ba88f15 100644 --- a/main_background.js +++ b/main_background.js @@ -134,6 +134,10 @@ async function createReport(initializer) { template.url = url; template.site = ListStore.siteItem(url); template.siteStatus = listManager.getStatus(template.site); + let list = {"whitelisted": whitelist, "blacklisted": blacklist}[template.siteStatus]; + if (list) { + template.listedSite = ListManager.siteMatch(template.site, list); + } return template; } @@ -750,7 +754,7 @@ async function get_script(response, url, tabId = -1, whitelisted = false, index let reason = site ? `All ${site} whitelisted by user` : "Address whitelisted by user"; - addReportEntry(tabId, url, {"whitelisted": [site, reason], url}); + addReportEntry(tabId, url, {"whitelisted": [site || url, reason], url}); } if (response.startsWith("javascript:")) return result(response); -- cgit v1.2.3