From 0f819cdf598e34e25ee040910552dc68cd8dcbd1 Mon Sep 17 00:00:00 2001 From: Marco Pernpruner Date: Mon, 7 Aug 2023 17:07:04 +0200 Subject: [PATCH] Implement JS function to automatically replace users' broken pictures with default user image --- _includes/list-people.html | 2 +- assets/js/custom.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/_includes/list-people.html b/_includes/list-people.html index a2d11a2f..3863e2d4 100644 --- a/_includes/list-people.html +++ b/_includes/list-people.html @@ -238,7 +238,7 @@ {% if personImage != "" %}
- {{ person.surname }} {{ person.name }} + {{ person.name }} {{ person.surname }}
{% endif %} diff --git a/assets/js/custom.js b/assets/js/custom.js index 30f66f81..cddf8208 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -9,6 +9,11 @@ $('a').each(function() { } }); +function setDefaultUserPicture(picture) { + picture.src = "/assets/images/no-user.jpg"; + return true; +} + function iframe16vs9() { var iframes = $("iframe");