re-ordering: skip non-standard search results
parent
34d256fafc
commit
520130e3c8
|
@ -647,6 +647,10 @@ function main(mutations = null, observer = null) {
|
|||
|
||||
async function reorderGoogle() {
|
||||
let searchResults = document.querySelectorAll("div[data-hveid] a:first-of-type:not([role='button']):not([target='_self'])");
|
||||
|
||||
// Remove any matches that are not "standard" search results - this could've been done with :has() but limited browser support right now
|
||||
searchResults = Array.from(searchResults).filter((e) => !e.closest('g-section-with-header'));
|
||||
|
||||
return await reorderSearchResults(searchResults, 'google', storage);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue