Skip to content

Commit

Permalink
Merge pull request #38 from TenDRILLL/dev
Browse files Browse the repository at this point in the history
Fix popups
  • Loading branch information
TenDRILLL authored May 6, 2024
2 parents f753394 + 3ca253c commit 7b9dbce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/html/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ function message(data, scroll, previousMessage){
cssActive = document.getElementById('messageCtx')["data-messageID"] === `${data.ID}` || userCtx["data-opener"] === `messageAvatar_${data.ID}` || userCtx["data-opener"] === `messageUsername_${data.ID}` ? 'true' : cssActive;
messageContainer.innerHTML += `<div class="message" id="${data.ID}" oncontextmenu="openMessageContext(event, this)" css-active="${cssActive}">
<div style="display:none;" data-user="${data.userID}" data-time="${data.createdAt}"></div>
<img data-userID="${data.userID}" oncontextmenu="openUserContext(event, this)" id="messageAvatar_${data.userID}" class="messageAvatar" src="/resource/user/${data.userID}/avatar?size=64" onclick="openUserPopup('${data.userID}', this)" />
<div class="messageContainer"><span data-userID="${data.userID}" oncontextmenu="openUserContext(event, this)" id="messageUsername_${data.userID}" class="messageUsername" onclick="openUserPopup('${data.userID}', this)">${userStore[data.userID]?.username ?? data.userID}</span>
<img data-userID="${data.userID}" oncontextmenu="openUserContext(event, this)" id="messageAvatar_${data.ID}" class="messageAvatar" src="/resource/user/${data.userID}/avatar?size=64" onclick="openUserPopup('${data.userID}', this)" />
<div class="messageContainer"><span data-userID="${data.userID}" oncontextmenu="openUserContext(event, this)" id="messageUsername_${data.ID}" class="messageUsername" onclick="openUserPopup('${data.userID}', this)">${userStore[data.userID]?.username ?? data.userID}</span>
<span class="messageTimeSent">${parseTimestamp(data.createdAt)}</span></div></div>`;
document.getElementById(`${data.ID}`).children[2].innerHTML += `<pre>${formatContent(data.content, data)}</pre>`;
}
Expand Down Expand Up @@ -432,4 +432,4 @@ if (/firefox/i.test(navigator.userAgent)) {
userContainer.style.scrollbarGutter = 'stable';
userContainer.style.scrollbarWidth = 'thin';
setTimeout(() => showToast('You may experience a degraded experience on Firefox', false, 5), 2000);
}
}

0 comments on commit 7b9dbce

Please sign in to comment.