From 927d55134d5c169de9b5b31b38e83b5de96e4c47 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 18 Oct 2020 11:06:40 -0400 Subject: [PATCH] Remove discarding of assumed unoptimal selectors This was a bad idea. Related commit: - https://github.com/gorhill/uBlock/commit/4c5197322f7f4c74412f01747e7e0c5e2a023677 --- src/js/scriptlets/epicker.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/js/scriptlets/epicker.js b/src/js/scriptlets/epicker.js index 4571ebba3..c048bf0c5 100644 --- a/src/js/scriptlets/epicker.js +++ b/src/js/scriptlets/epicker.js @@ -844,15 +844,6 @@ const onOptmizeCandidates = function(details) { if ( r !== 0 ) { return r; } return a.selector.length - b.selector.length; }); - // Discard selectors with same match count as shorter ones. - for ( let i = 0; i < results.length - 1; i++ ) { - const a = results[i+0]; - const b = results[i+1]; - if ( b.count !== a.count ) { continue; } - if ( b.selector.length === a.selector.length ) { continue; } - b.selector = a.selector; - b.count = a.count; - } vAPI.MessagingConnection.sendTo(epickerConnectionId, { what: 'candidatesOptimized', candidates: results.map(a => a.selector),