More robust search filtering on mobile Google

pull/260/head
Kevin Payravi 2023-09-24 23:09:55 -06:00
parent e86cbf9842
commit 091d36b1a7
1 changed files with 5 additions and 1 deletions

View File

@ -267,7 +267,11 @@ function filterSearchResults(searchResults, searchEngine, storage) {
document.querySelector('#topstuff').prepend(searchRemovalNotice); document.querySelector('#topstuff').prepend(searchRemovalNotice);
} else if (document.querySelector('#main')) { } else if (document.querySelector('#main')) {
var el = document.querySelector('#main'); var el = document.querySelector('#main');
el.insertBefore(searchRemovalNotice, el.querySelector('div [data-hveid]').parentElement); if (el.querySelector('#main > div[data-hveid]')) {
el.insertBefore(searchRemovalNotice, el.querySelector('div[data-hveid]'));
} else {
el.insertBefore(searchRemovalNotice, el.querySelector('div div[data-hveid]').parentElement);
}
}; };
break; break;
case 'bing': case 'bing':