Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image suggestions box not being filtered in the "All" section of google search #462

Closed
STUAAAAAAAAAART opened this issue May 15, 2024 · 6 comments
Labels

Comments

@STUAAAAAAAAAART
Copy link

Expected Behavior

image suggestions box (not the image search section, that's working) also getting filtered and blacklist items hidden in there

Actual Behavior

image suggestions box not being filtered in the "all" section of google search

image

sites in that box exist in the filter list

Steps to Reproduce the Problem

  1. ensure filter(s) in ublacklist contain *://*.prompthunt.com/*
  2. google search for pixar jean baptiste
    (i know that's not how jon batiste's name spelt, i'm going off memory and couldn't recall)

i'm not sure of other terms that would produce that scenario as well, but that search result seems to be consistent at the moment

Specifications

  • Browser: Google Chrome 124.0.6367.203 (Official Build) (64-bit)
  • Other extensions/add-ons:
    • uBlock Origin 1.57.0
    • dark reader 4.9.84
    • Google IBA Opt-Out 1.5
  • Search engine: google
  • Language: english
  • Region: SG

any other comments

it's google's loosening grip on quality and abstracting away user-sided control that i have to resort to using this extension. thanks for making it work for the most part

@aug-dev
Copy link
Contributor

aug-dev commented May 15, 2024

I'll look into this once I finish working on another feature.

@aug-dev
Copy link
Contributor

aug-dev commented May 17, 2024

Adding a rule to support this was surprisingly simple... but there is a problem.

If we click the button to load more images, they slip through the rule and show up anyways:

img-blocking-demo.webm

Something similar happens when the "Images" section doesn't show up in the first page (before auto-loading new content.)

This seems to be an issue with the extension currently, where the ability to detect dynamic content can be hit or miss sometimes (e.g. #446).

This is not a trivial problem to solve (at least I think), but I can tell that is something we are aware of.

@iorate
Copy link
Owner

iorate commented May 19, 2024

We can use pagerHandlers to extract search results from dynamically added elements.

pagerHandlers: [
// People Also Ask
{
target: '.IZE3Td, [jsname="Cpkphb"]',
innerTargets: ".g",
},
// Recipe, Regular (COVID-19), Web Result (COVID-19), ...
{
target: ".yl > div",
innerTargets:
".YwonT, [data-snf], [data-sokoban-feature], [data-content-feature], .IsZvec, .kno-fb-ctx, .ZE0LJd, .S1FAPd, .g, .F9rcV, .hMJ0yc",
},
// AutoPagerize and Continuous scrolling (US)
{
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",
},
],
}),

@aug-dev
Copy link
Contributor

aug-dev commented May 19, 2024

Oh wow!

Not going to lie, I hadn't yet deciphered what pageHandlers were used for. 😅

This is cool! I was trying to fix this issue right now, later this day I'll look into it.

@aug-dev
Copy link
Contributor

aug-dev commented May 20, 2024

Here's the PR solving this issue #467

:)

@iorate iorate closed this as completed in 8f1b01d May 25, 2024
Copy link

🎉 This issue has been resolved in version 8.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants