Filter .data-g elements from Google re-ordering
parent
7e1beaa21c
commit
1c6efc0860
|
@ -551,7 +551,7 @@ function startFiltering(searchEngine, storage, 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, div[aria-expanded], div[data-q], div[data-minw], div[data-num-cols], div[data-docid], div[data-lpage]'));
|
||||
searchResults = Array.from(searchResults).filter((e) => !e.closest('g-section-with-header, div[aria-expanded], div[data-q], div[data-g], div[data-minw], div[data-num-cols], div[data-docid], div[data-lpage]'));
|
||||
|
||||
return await reorderSearchResults(searchResults, 'google', storage);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue