From 6d1b44b42c32f935a23e13d3096a987db8f65b37 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 7 Jan 2022 07:56:32 -0500 Subject: [PATCH] Report only stats for eTLD+1 in troubleshooting information Related commit: - https://github.com/gorhill/uBlock/commit/affdde02a93a8d1b4b311204bfb51cd761ad1d79 --- src/js/popup-fenix.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/js/popup-fenix.js b/src/js/popup-fenix.js index ecb9ecc41..0cc68f198 100644 --- a/src/js/popup-fenix.js +++ b/src/js/popup-fenix.js @@ -862,8 +862,13 @@ const gotoReport = function() { 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; + const count = 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 ) { popupPanel.blockedDetails = blockedDetails;