loleaflet/src/control/Control.UserList.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
New commits: commit f513eaf5a19dab18376a1ceafbaf6700b6a48419 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Wed Aug 19 21:39:23 2020 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Wed Aug 19 22:06:39 2020 +0200 do not show broken images instead of avatars, 2nd try Change-Id: Iab87518807ce11bbcf19ff8436b9241527140b7a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101023 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/src/control/Control.UserList.js b/loleaflet/src/control/Control.UserList.js index 949394e4f..47a259eca 100644 --- a/loleaflet/src/control/Control.UserList.js +++ b/loleaflet/src/control/Control.UserList.js @@ -85,19 +85,11 @@ L.Control.UserList = L.Control.extend({ var iconTd = L.DomUtil.create('td', 'usercolor', content); var nameTd = L.DomUtil.create('td', 'username loleaflet-font', content); - var hasAvatar = false; if (extraInfo !== undefined && extraInfo.avatar !== undefined) { - var http = new XMLHttpRequest(); - http.open('HEAD', extraInfo.avatar, false); - http.send(); - if (http.status != 404) { - hasAvatar = true; - } - } - - if (hasAvatar) { var img = L.DomUtil.create('img', 'avatar-img', iconTd); img.src = extraInfo.avatar; + var altImg = L.LOUtil.getImageURL('user.svg'); + img.setAttribute('onerror', 'this.onerror=null;this.src=\'' + altImg + '\';'); $(img).css({'border-color': color}); } else { img = L.DomUtil.create('div', 'user-info', iconTd); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits