Merge pull request #1251 from rstefko/images-with-links

Re-enable view_image functionality
This commit is contained in:
Don 2025-09-30 21:09:11 -05:00 committed by GitHub
commit e0a4a5f2cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 12 deletions

View file

@ -161,7 +161,6 @@
.e3goi {
vertical-align: top;
padding: 0;
height: 180px;
}
.GpQGbf {
margin: auto;
@ -210,8 +209,6 @@
text-align: center;
}
.RAyV4b {
width: 162px;
height: 140px;
line-height: 140px;
overflow: "hidden";
text-align: center;
@ -220,8 +217,6 @@
text-align: center;
margin: auto;
vertical-align: middle;
width: 100%;
height: 100%;
object-fit: contain;
}
.Tor4Ec {

View file

@ -148,10 +148,8 @@ class Search:
# force mobile search when view image is true and
# the request is not already made by a mobile
# FIXME: Broken since the user agent changes as of 16 Jan 2025
# view_image = ('tbm=isch' in full_query
# and self.config.view_image
# and not g.user_request.mobile)
view_image = ('tbm=isch' in full_query
and self.config.view_image)
client = self.user_request or g.user_request
get_body = client.send(query=full_query,
@ -168,9 +166,8 @@ class Search:
html_soup = html_soup.html
# Replace current soup if view_image is active
# FIXME: Broken since the user agent changes as of 16 Jan 2025
# if view_image:
# html_soup = content_filter.view_image(html_soup)
if view_image:
html_soup = content_filter.view_image(html_soup)
# Indicate whether or not a Tor connection is active
if (self.user_request or g.user_request).tor_valid: