diff options
author | Vitaly Takmazov | 2023-01-22 00:52:14 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-22 00:52:14 +0300 |
commit | d17e5714c9b421fce507d310fd913ce3160a1764 (patch) | |
tree | de86cd888efada741d6501639f0d0d7427c1137d /src/main/assets/scripts.js | |
parent | 2949c247e4f1d82e0231c8e7eddfe715d7449aa9 (diff) |
Update links to external users with web urls instead of json-ld uris
Diffstat (limited to 'src/main/assets/scripts.js')
-rw-r--r-- | src/main/assets/scripts.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/assets/scripts.js b/src/main/assets/scripts.js index 27e2d59c..eecb3372 100644 --- a/src/main/assets/scripts.js +++ b/src/main/assets/scripts.js @@ -742,7 +742,7 @@ ready(() => { setTimeout(() => fetchUserUri(dataUri, user => { let header = el.closest('.msg-header'); Array.from(header.querySelectorAll('.a-username')).forEach(a => { - a.setAttribute('href', user.uri); + a.setAttribute('href', user.url || user.uri); let img = a.querySelector('img'); if (img && user.avatar) { img.setAttribute('src', user.avatar); @@ -765,6 +765,7 @@ ready(() => { if (textNode.nodeType === Node.TEXT_NODE && textNode.nodeValue.trim().length > 0) { let uname = document.createTextNode(`@${user.uname}`); el.replaceChild(uname, el.firstChild); + el.setAttribute('href', user.url || user.uri); } }), 100); } |