mirror of
https://github.com/searxng/searxng.git
synced 2024-12-26 19:20:29 +00:00
[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 <markus.heiser@darmarit.de>
This commit is contained in:
parent
76b91a3ef6
commit
903449e0b5
1 changed files with 3 additions and 1 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue