summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--searx/static/themes/simple/src/js/main/results.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/searx/static/themes/simple/src/js/main/results.js b/searx/static/themes/simple/src/js/main/results.js
index b6b4d0834..b9bd43394 100644
--- a/searx/static/themes/simple/src/js/main/results.js
+++ b/searx/static/themes/simple/src/js/main/results.js
@@ -6,6 +6,15 @@
searxng.image_thumbnail_layout = new searxng.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 14, 6, 200);
searxng.image_thumbnail_layout.watch();
+ d.querySelectorAll('#urls img.image').forEach(
+ img =>
+ img.addEventListener(
+ 'error', () => {
+ img.style.display = 'none';
+ img.error = null;
+ }
+ ));
+
searxng.on('.btn-collapse', 'click', function () {
var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');
var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');