From affdde02a93a8d1b4b311204bfb51cd761ad1d79 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 7 Jan 2022 07:32:54 -0500 Subject: [PATCH] Add "blockedDetails" section to troubleshooting information This will allow to find out what is specifically blocked on the page reported as having issues, potentially saving time when volunteers try to diagnose issues. --- src/js/popup-fenix.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/js/popup-fenix.js b/src/js/popup-fenix.js index 3982f4d4f..ecb9ecc41 100644 --- a/src/js/popup-fenix.js +++ b/src/js/popup-fenix.js @@ -856,6 +856,19 @@ const gotoReport = function() { if ( popupData[prop] === expected ) { continue; } popupPanel[name] = !expected; } + if ( hostnameToSortableTokenMap.size !== 0 ) { + const blockedDetails = {}; + const hostnames = + Array.from(hostnameToSortableTokenMap.keys()).sort(hostnameCompare); + for ( const hostname of hostnames ) { + const entry = popupData.hostnameDict[hostname]; + if ( entry.counts.blocked.any === 0 ) { continue; } + blockedDetails[hostname] = entry.counts.blocked.any; + } + if ( Object.keys(blockedDetails).length !== 0 ) { + popupPanel.blockedDetails = blockedDetails; + } + } messaging.send('popupPanel', { what: 'launchReporter', tabId: popupData.tabId,