diff --git a/app/templates/imageresults.html b/app/templates/imageresults.html index cc3f6d6..1b7e429 100644 --- a/app/templates/imageresults.html +++ b/app/templates/imageresults.html @@ -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 { diff --git a/app/utils/search.py b/app/utils/search.py index 19d60ca..d6bb2ea 100644 --- a/app/utils/search.py +++ b/app/utils/search.py @@ -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: