diff --git a/comments.html b/comments.html index 8e6174b..7c1d236 100644 --- a/comments.html +++ b/comments.html @@ -168,6 +168,11 @@ text = text.replace(/^(#+)\s*(.+)$/gm, (_, hashes, content) => `${content}`); return text; } + + function getInstanceFromActorId(actorId) + const url = new URL(actorId); + return url.hostname; // возвращает домен, например, "lemmy.world" + } // функция для отображения постов function renderPost(post_view) { @@ -183,6 +188,8 @@ ${post_view.creator.name}
${post_view.community.name} + @ + ${getInstanceFromActorId(post_view.community.actor_id)}