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

Keep reflecting search matches after applying changes

This commit is contained in:
Raymond Hill 2023-05-08 07:08:45 -04:00
parent 9808423845
commit f6839f5a57
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -98,6 +98,9 @@ const renderFilterLists = ( ) => {
if ( dom.cl.has(listEntryPrevious, 'toRemove') ) {
dom.cl.add(listEntry, 'toRemove');
}
if ( dom.cl.has(listEntryPrevious, 'searchMatch') ) {
dom.cl.add(listEntry, 'searchMatch');
}
} else {
dom.cl.toggle(listEntry, 'checked', listDetails.off !== true);
}
@ -384,6 +387,9 @@ const updateListNode = listNode => {
dom.text(qs$(listNode, '.nodestats'),
renderNodeStats(listLeaves.length, qsa$(listNode, '.listEntry[data-role="leaf"]').length)
);
dom.cl.toggle(listNode, 'searchMatch',
qs$(listNode, ':scope > .listEntries > .listEntry.searchMatch') !== null
);
if ( listNode.dataset.parent === 'root' ) { return; }
let usedFilterCount = 0;
let totalFilterCount = 0;