mirror of
https://github.com/searxng/searxng.git
synced 2025-02-21 04:39:02 +00:00
[fix] if image load fails on client side, show default image
BTW: change icon color from red to gray Closes: - https://github.com/searxng/searxng/issues/4066 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
4a8d333d5b
commit
8c3f0c3d52
@ -7,13 +7,14 @@
|
||||
}
|
||||
|
||||
searxng.ready(function () {
|
||||
d.querySelectorAll('#urls img.image').forEach(
|
||||
d.querySelectorAll('#urls img').forEach(
|
||||
img =>
|
||||
img.addEventListener(
|
||||
'error', () => {
|
||||
img.style.display = 'none';
|
||||
img.error = null;
|
||||
}
|
||||
// console.log("ERROR can't load: " + img.src);
|
||||
img.src = window.searxng.settings.theme_static_path + "/img/img_load_error.svg";
|
||||
},
|
||||
{once: true}
|
||||
));
|
||||
|
||||
if (d.querySelector('#search_url button#copy_url')) {
|
||||
|
@ -14,6 +14,5 @@ module.exports = {
|
||||
'sortAttrs',
|
||||
// Optimize SVG for WEB usage
|
||||
'convertStyleToAttrs',
|
||||
'removeXMLNS'
|
||||
],
|
||||
};
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Loading…
Reference in New Issue
Block a user