summaryrefslogtreecommitdiff
path: root/searx/static/themes/__common__/js/image_layout.js
diff options
context:
space:
mode:
Diffstat (limited to 'searx/static/themes/__common__/js/image_layout.js')
-rw-r--r--searx/static/themes/__common__/js/image_layout.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/searx/static/themes/__common__/js/image_layout.js b/searx/static/themes/__common__/js/image_layout.js
index e178c2968..be4fe84e0 100644
--- a/searx/static/themes/__common__/js/image_layout.js
+++ b/searx/static/themes/__common__/js/image_layout.js
@@ -149,7 +149,7 @@
function img_load_error(event) {
// console.log("ERROR can't load: " + event.originalTarget.src);
- event.originalTarget.src = window.searxng.static_path + 'img/img_load_error.svg';
+ event.originalTarget.src = w.searxng.static_path + w.searxng.theme.img_load_error;
}
function throttleAlign() {
@@ -175,7 +175,9 @@
img.addEventListener('load', throttleAlign);
// https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror
img.addEventListener('error', throttleAlign);
- img.addEventListener('error', img_load_error, {once: true});
+ if (w.searxng.theme.img_load_error) {
+ img.addEventListener('error', img_load_error, {once: true});
+ }
}
}
};