Skip to content

Commit

Permalink
fix(google): insert a control even if SGE is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
iorate committed Sep 3, 2023
1 parent 4ff8583 commit 4dc1a73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/scripts/search-engines/google-desktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ const desktopSerpHandlers: Record<string, SerpHandler> = {
{
target: '#result-stats',
},
{
target: '#slim_appbar:empty',
},
{
target: '#botabar',
position: 'afterend',
Expand Down Expand Up @@ -182,7 +185,7 @@ const desktopSerpHandlers: Record<string, SerpHandler> = {
target: '.g .xpdopen .ifM9O .g',
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
level: target => target.closest('.M8OgIe') || target.parentElement!.closest('.g'),
url: '.yuRUbf > a',
url: '.yuRUbf a',
title: 'h3',
...regularEntryHandler,
},
Expand All @@ -206,7 +209,7 @@ const desktopSerpHandlers: Record<string, SerpHandler> = {
{
target: '.related-question-pair .g',
level: '.related-question-pair',
url: 'a',
url: '.yuRUbf a',
title: root => root.querySelector('h3')?.textContent ?? null,
...regularEntryHandler,
},
Expand Down

0 comments on commit 4dc1a73

Please sign in to comment.