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

Fix report of unprocessed requests in Support pane

This commit is contained in:
Raymond Hill 2023-03-18 16:20:40 -04:00
parent d42e9ae2a8
commit e8abd5dfbe
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
4 changed files with 5 additions and 4 deletions

View File

@ -220,7 +220,6 @@ const µBlock = { // jshint ignore:line
supportStats: {
allReadyAfter: '?',
maxAssetCacheWait: '?',
unprocessedRequestCount: '?',
},
pageStores: new Map(),

View File

@ -626,9 +626,12 @@ const onMessage = function(request, sender, callback) {
case 'launchReporter': {
const pageStore = µb.pageStoreFromTabId(request.tabId);
if ( pageStore === null ) { break; }
if ( vAPI.net.hasUnprocessedRequest(request.tabId) ) {
request.popupPanel.hasUnprocessedRequest = true;
}
const supportURL = new URL(vAPI.getURL('support.html'));
supportURL.searchParams.set('pageURL', request.pageURL);
supportURL.searchParams.set('popupPanel', request.popupPanel);
supportURL.searchParams.set('popupPanel', JSON.stringify(request.popupPanel));
µb.openNewTab({ url: supportURL.href, select: true, index: -1 });
break;
}

View File

@ -859,7 +859,7 @@ const gotoReport = function() {
what: 'launchReporter',
tabId: popupData.tabId,
pageURL: popupData.pageURL,
popupPanel: JSON.stringify(popupPanel),
popupPanel,
});
vAPI.closePopup();

View File

@ -1147,7 +1147,6 @@ const webRequest = {
}
);
vAPI.net.unsuspend({ all: true });
µb.supportStats.unprocessedRequestCount = `${vAPI.net.unprocessedRequestCount}`;
};
})(),