From 903449e0b57c50a0f0ec02e4e2a6c8cb9e923dac Mon Sep 17 00:00:00 2001 From: Jinyuan Huang <88757735+BernieHuang2008@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:25:30 +0000 Subject: [PATCH 1/2] [fix] Images cannot be clicked anymore #3006 URL in sidedbar only exists in HTTP POST requests. On HTTP GET requests the selector ``#search_url button#copy_url`` results in a ``null`` type and a ``.style.display`` raises:: Uncaught TypeError: d.querySelector(...) is null As a result, the initialization of the event handler is no longer carried out. Closes: https://github.com/searxng/searxng/issues/3003 Suggested-by: Markus Heiser --- searx/static/themes/simple/src/js/main/results.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/searx/static/themes/simple/src/js/main/results.js b/searx/static/themes/simple/src/js/main/results.js index 2309297df..0b0aebe12 100644 --- a/searx/static/themes/simple/src/js/main/results.js +++ b/searx/static/themes/simple/src/js/main/results.js @@ -16,7 +16,9 @@ } )); - d.querySelector('#search_url button#copy_url').style.display = "block"; + if (d.querySelector('#search_url button#copy_url')) { + d.querySelector('#search_url button#copy_url').style.display = "block"; + } searxng.on('.btn-collapse', 'click', function () { var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed'); From 3601badd8440400b952fb8c5535b13f6b5f76e31 Mon Sep 17 00:00:00 2001 From: Jinyuan Huang <88757735+BernieHuang2008@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:30:15 +0000 Subject: [PATCH 2/2] [build] /static --- searx/static/themes/simple/js/searxng.min.js | Bin 26385 -> 26436 bytes .../themes/simple/js/searxng.min.js.map | Bin 94912 -> 95022 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/searx/static/themes/simple/js/searxng.min.js b/searx/static/themes/simple/js/searxng.min.js index 95f6dab0a3dcf44436704a4028393ebf00620d05..0cc2a6dae2ff41d4955feb96a03d2d5dcb96e1af 100644 GIT binary patch delta 31 mcmbPuj`7Gj#tl#Om^0HfCO^^BW74b!QZ9_On>F=cm;(UUSPZ%V delta 20 ccmX?dj&b5S#tl#OCX4I4Fj{Yp(SKnM0AQ8~YybcN diff --git a/searx/static/themes/simple/js/searxng.min.js.map b/searx/static/themes/simple/js/searxng.min.js.map index 4b70d72dab4a1cfbf365500cb31f0e4e4e6baa13..131c71315658e1d8688bec9b91defc9ac6118a1a 100644 GIT binary patch delta 110 zcmX@`ly%)R)(xu?nKRQACKpNwPu`O#!>XxJ9g{ctp_BxWXUVDn1htz#Ct99m)p2)p z^qj7v&nU_1uH)?Joa0jFK3z|rQH{sn(K*W%DCFu`6f#}LkWqPioj#)}2a~1y^hiBM M`R!NC8Q)j|06b(P6aWAK delta 63 zcmV-F0KosQ<^{mz1+c1NldfSdlNDkevpHfn%>r;#mzOUACI?YLMK45hRF{e|0VB8U VF99_O0yRgMoh|_%w?a4p>^dPj7KZ=;