1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Rename reported popup panel property

This commit is contained in:
Raymond Hill 2023-04-04 13:42:09 -04:00
parent 620a96531c
commit 0f5384ee0d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -907,7 +907,7 @@ const gotoReport = function() {
popupPanel[name] = !expected;
}
if ( hostnameToSortableTokenMap.size !== 0 ) {
const blockedDetails = {};
const network = {};
const hostnames =
Array.from(hostnameToSortableTokenMap.keys()).sort(hostnameCompare);
for ( const hostname of hostnames ) {
@ -915,13 +915,13 @@ const gotoReport = function() {
const count = entry.counts.blocked.any;
if ( count === 0 ) { continue; }
const domain = entry.domain;
if ( blockedDetails[domain] === undefined ) {
blockedDetails[domain] = 0;
if ( network[domain] === undefined ) {
network[domain] = 0;
}
blockedDetails[domain] += count;
network[domain] += count;
}
if ( Object.keys(blockedDetails).length !== 0 ) {
popupPanel.blockedDetails = blockedDetails;
if ( Object.keys(network).length !== 0 ) {
popupPanel.network = network;
}
}
messaging.send('popupPanel', {