aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/assets/scripts.js
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/assets/scripts.js')
-rw-r--r--juick-server/src/main/assets/scripts.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/juick-server/src/main/assets/scripts.js b/juick-server/src/main/assets/scripts.js
index 25450d30..6b1176ee 100644
--- a/juick-server/src/main/assets/scripts.js
+++ b/juick-server/src/main/assets/scripts.js
@@ -827,7 +827,7 @@ ready(function() {
document.querySelectorAll('[data-uri]').forEach(el => {
let dataUri = el.getAttribute('data-uri');
if (dataUri) {
- fetchUserUri(dataUri, user => {
+ setTimeout(() => fetchUserUri(dataUri, user => {
let header = el.closest('.msg-header');
header.querySelectorAll('.a-username').forEach(a => {
a.setAttribute('href', user.uri);
@@ -842,19 +842,19 @@ ready(function() {
a.replaceChild(uname, a.firstChild);
}
});
- });
+ }), 100);
}
});
document.querySelectorAll('[data-user-uri]').forEach(el => {
let dataUri = el.getAttribute('href');
if (dataUri) {
- fetchUserUri(dataUri, user => {
+ setTimeout(() => fetchUserUri(dataUri, user => {
let textNode = el.childNodes[0];
if (textNode.nodeType === Node.TEXT_NODE && textNode.nodeValue.trim().length > 0) {
let uname = document.createTextNode(`@${user.uname}`);
el.replaceChild(uname, el.firstChild);
}
- });
+ }), 100);
}
});
initES();