1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 01:59:38 +02:00

Listen to all-filter-lists-reloaded, not all-assets-updated

Related commit:
- 4a92f96206
This commit is contained in:
Raymond Hill 2023-04-23 16:32:38 -04:00
parent e93ecfadfa
commit e46705db00
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -215,7 +215,9 @@ function reportSpecificFilterType() {
}
function reportSpecificFilterIssue() {
const githubURL = new URL('https://github.com/uBlockOrigin/uAssets/issues/new?template=specific_report_from_ubo.yml');
const githubURL = new URL(
'https://github.com/uBlockOrigin/uAssets/issues/new?template=specific_report_from_ubo.yml'
);
const issueType = reportSpecificFilterType();
let title = `${reportedPage.hostname}: ${issueType}`;
if ( qs$('#isNSFW').checked ) {
@ -239,18 +241,6 @@ async function updateFilterLists() {
vAPI.messaging.send('dashboard', { what: 'forceUpdateAssets' });
}
vAPI.broadcastListener.add(msg => {
switch ( msg.what ) {
case 'assetsUpdated':
showSupportData();
dom.cl.remove(dom.body, 'updating');
dom.cl.add(dom.body, 'updated');
break;
default:
break;
}
});
/******************************************************************************/
const cmEditor = new CodeMirror(qs$('#supportData'), {
@ -283,6 +273,12 @@ uBlockDashboard.patchCodeMirrorEditor(cmEditor);
updateFilterLists();
ev.preventDefault();
});
vAPI.broadcastListener.add(msg => {
if ( msg.what !== 'staticFilteringDataChanged' ) { return; }
showSupportData();
dom.cl.remove(dom.body, 'updating');
dom.cl.add(dom.body, 'updated');
});
}
dom.on('[data-i18n="supportReportSpecificButton"]', 'click', ev => {