Report only stats for eTLD+1 in troubleshooting information

Related commit:
- affdde02a9
This commit is contained in:
Raymond Hill 2022-01-07 07:56:32 -05:00
parent affdde02a9
commit 6d1b44b42c
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 7 additions and 2 deletions

View File

@ -862,8 +862,13 @@ const gotoReport = function() {
Array.from(hostnameToSortableTokenMap.keys()).sort(hostnameCompare); Array.from(hostnameToSortableTokenMap.keys()).sort(hostnameCompare);
for ( const hostname of hostnames ) { for ( const hostname of hostnames ) {
const entry = popupData.hostnameDict[hostname]; const entry = popupData.hostnameDict[hostname];
if ( entry.counts.blocked.any === 0 ) { continue; } const count = entry.counts.blocked.any;
blockedDetails[hostname] = entry.counts.blocked.any; if ( count === 0 ) { continue; }
const domain = entry.domain;
if ( blockedDetails[domain] === undefined ) {
blockedDetails[domain] = 0;
}
blockedDetails[domain] += count;
} }
if ( Object.keys(blockedDetails).length !== 0 ) { if ( Object.keys(blockedDetails).length !== 0 ) {
popupPanel.blockedDetails = blockedDetails; popupPanel.blockedDetails = blockedDetails;