From fb94f9169b44d039cab42e40f773e2be03dbaaef Mon Sep 17 00:00:00 2001 From: idotj Date: Sat, 22 Jan 2022 16:44:26 +0100 Subject: [PATCH] Replace account_id terminology for user_id --- README.md | 15 +++++++++------ src/mastodon-timeline.js | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fe31568..0db61a4 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,15 @@ Embed a mastodon feed timeline in your page, only with a css and js file. Working version running at: -https://www.idotj.com + Source code running at: -https://codepen.io/ipuntoj/pen/MWppNGL + ## 🗂️ User guide -Just copy both files (.css and .js) in your project +Just copy both files (.css and .js) in your project + ``` ``` @@ -20,24 +21,26 @@ Just copy both files (.css and .js) in your project ``` and add the following structure in your html page: + ```
-
+
``` Then you just need to change the profile info. At the beginning of the JS file *mastodon-timeline.js* replace the following values: + ``` instance_uri: 'The Mastodon instance', account_id: 'Your user ID on Mastodon instance', profile_name: 'Your user name on Mastodon instance', ``` -If you don't have your account_id, a quick search here will do the job: -https://prouser123.me/mastodon-userid-lookup/ +If you don't find your user_id, just copy your @profile_name and @instance_uri here: +[https://prouser123.me/mastodon-userid-lookup/](https://prouser123.me/mastodon-userid-lookup/){:target="_blank"} ## 🚀 Improve me diff --git a/src/mastodon-timeline.js b/src/mastodon-timeline.js index 5685c91..2152877 100644 --- a/src/mastodon-timeline.js +++ b/src/mastodon-timeline.js @@ -7,7 +7,7 @@ document.addEventListener("DOMContentLoaded", () => { container_id: 'mt-timeline', container_body_id: 'mt-body', instance_uri: 'https://mastodon.online', - account_id: '180745', + user_id: '180745', profile_name: '@idotj', toots_limit: 13, btn_see_more: 'See more posts at Mastodon'