Skip to content

Commit

Permalink
feat(google): Add support for images on Google "All" page (#467)
Browse files Browse the repository at this point in the history
close #462

* Block "Images" on Google "All" page (Desktop)

* Improved detection of Images on first result page

* Support for dynamic loaded "Images" on Google "All" page (infinite scrolling)
  • Loading branch information
aug-dev authored May 25, 2024
1 parent 4a9a5e0 commit 8f1b01d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/scripts/search-engines/google-desktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,18 @@ const desktopSerpHandlers: Record<string, SerpHandler> = {
actionTarget: ".ZE0LJd, .S1FAPd",
actionStyle: desktopActionStyle,
},
// Images (on the "All" page)
{
target: ".eA0Zlc.mkpRId.RLdvSe",
url: "a",
title: ".toI8Rb",
actionTarget: ".guK3rf",
actionStyle: {
...desktopActionStyle,
position: "relative",
zIndex: "1",
},
},
],
pagerHandlers: [
// People Also Ask
Expand All @@ -483,7 +495,7 @@ const desktopSerpHandlers: Record<string, SerpHandler> = {
target: '.autopagerize_page_info ~ div, [id^="arc-srp"] > div',
// Regular, Video, and YouTube and TikTok channel
innerTargets:
"[data-snf], [data-sokoban-feature], [data-content-feature], .IsZvec, .g, .iHxmLe, .d3zsgb, .rULfzc",
"[data-snf], [data-sokoban-feature], [data-content-feature], .IsZvec, .g, .iHxmLe, .d3zsgb, .rULfzc, .eA0Zlc.mkpRId.RLdvSe",
},
],
}),
Expand Down

0 comments on commit 8f1b01d

Please sign in to comment.