mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
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.
This commit is contained in:
parent
e9058370b8
commit
affdde02a9
1 changed files with 13 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue