Only use title if there is text

This commit is contained in:
bingus_violet 2024-11-26 11:57:54 -06:00
parent 862c6f7ec4
commit 6b3fa918a1

View file

@ -129,8 +129,8 @@ module.exports = {
addedHTML += `
<div class="chip activity grid-child">
<img src="${get_img(activity)}" title="${activity.assets.large_text || activity.assets.small_text}">
${onlyIfExists(`<img class="smallimg" src="${get_img(activity, "small_image")}" title="${activity.assets.small_text}">`, activity.assets.small_image)}
<img src="${get_img(activity)}" ${onlyIfExists(`title="${activity.assets.large_text}"`, activity.assets.large_text)}>
${onlyIfExists(`<img class="smallimg" src="${get_img(activity, "small_image")}" ${onlyIfExists(`title="${activity.assets.small_text}"`, activity.assets.small_text)}>`, activity.assets.small_image)}
<div>
<p style="font-size: 1.6rem;">${activity.name}</p>
${onlyIfExists("<p>" + text1 + "</p>", text1)}