mirror of
https://github.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist.git
synced 2026-08-06 02:12:35 -04:00
[GH-ISSUE #164] (DuckDuckGo) Clicking on an image on a page with removed images sometimes removes the entire page #94
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Mangochicken13 on GitHub (May 16, 2025).
Original GitHub issue: https://github.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/issues/164
Issue
Sometimes, when clicking on an image in a page with images that have been previously removed, the whole page disappears.
Reproduction
Before (searching for a page that will be guaranteed to have a blocked image - "ai image gen"):
After (clicking on the first four images, and then on the first image in the remaining group):
This issue seems to be similar in result to the recent issue https://github.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/issues/148#issuecomment-2832617365 where the whole page would be cleared if an image from a blocked site appeared in the images tab, the only idea i have is that when the image preview is opened it triggers the remove attempt? and then when it doesn't find anything it just removes the
lielement that contains the whole row (which explains why sometimes one row is removed first), but then i don't know why it just removes the whole rest of the page??edit: forgot to add the browser, this was on Librewolf 135.0.1-1
@Snapdragon-Sapling commented on GitHub (May 27, 2025):
I've been having the same issue. under the "all" tab of the search results, it will show me a preview of some of the images (sometimes including AI generated ones...) but when I switch to the images tab it gives a completely blank white screen as you've shown. I vehemently dislike using Google as my default search engine but if I'm looking for images that might have any AI in the search results, I have to switch the engine. it's a shitty choice between images swamped with AI, no images at all, or not using DuckDuckGo. especially when trying to find artistic references, concept art, or the works of actual artists who've had their styles ripped.
@Mangochicken13 commented on GitHub (Jun 26, 2025):
Came back to look into this again, and changing the selector from something like
duckduckgo.com##a[href*="fandom.com"]:upward(li):remove()toduckduckgo.com##a[href*="fandom.com"]:upward(figure):upward(1):remove()(i personally dislike fandom so have this in my personal fliters as well) seems to fix this issue on duckduckgo, presumably as the page structure only has onefigureelement to select, as opposed to the two levels ofli, see the page structure belowbody -> div -> div -> div -> div -> div -> div -> div -> section -> ol -> li -> ol -> li -> figure -> figcaption -> a[href]Haven't found one that works for bing yet, but i'll open a pr when i do.(Guess who forgot that this was only an issue on ddg) Unfortunately this makes the third split, and now all three engines have to be maintained seperately. Might be worth setting up a base file for the links, and using github actions to format for the engines, but i don't have any experience with that so i don't know how realistic that is, especially for the update feed with uBlock Origin@Mangochicken13 commented on GitHub (Jun 26, 2025):
The method here does have a downside of not removing the sites in question from the normal search page, which i think is the intended result for the other search engines? Will look into this a bit more to see if this can be done without having a duplicate entry for both ddg pages