diff --git a/README.md b/README.md index 7a3db81..2a8973e 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,12 @@ Embed a Post and Its Replies You can also embed an individual post, the replies to a post, or both. This mode lets you use Fediverse replies as a comment system for static sites, inspired by [a blog post from Carl Schwan][reply-post]. -Use this to embed a post: +Use this to embed a post along with its responses: - Post and replies from the Fediverse + >Thread from the Fediverse By default, both the original post and the replies appear. You can customize this link with `data-` attributes: diff --git a/index.html b/index.html index c2a564f..95f6987 100644 --- a/index.html +++ b/index.html @@ -65,10 +65,10 @@
Alternatively, you can embed a single post along with its replies:
-<a class="mastodon-post-and-replies" +<a class="mastodon-thread" href="https://mastodon.social/@Mastodon" data-toot-id="112011697087209298" - >replies to my toot</a>+ >Single toot and its replies</a>
One place you can see Emfed in action is at the beets project. The code is diff --git a/src/core.ts b/src/core.ts index 5127b8c..fa4dafc 100644 --- a/src/core.ts +++ b/src/core.ts @@ -163,6 +163,6 @@ export async function loadTootPostAndReplies(element: Element) { export function loadAll() { document.querySelectorAll("a.mastodon-feed").forEach(loadToots); /* inspired by https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/ */ - document.querySelectorAll("a.mastodon-post-and-replies").forEach(loadTootPostAndReplies) + document.querySelectorAll("a.mastodon-thread").forEach(loadTootPostAndReplies) }