diff --git a/content-search-filtering.js b/content-search-filtering.js index ef83d61..b9cf1bd 100644 --- a/content-search-filtering.js +++ b/content-search-filtering.js @@ -267,7 +267,11 @@ function filterSearchResults(searchResults, searchEngine, storage) { document.querySelector('#topstuff').prepend(searchRemovalNotice); } else if (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; case 'bing':