Mastodon-Timeline 3.13.1-1 + JSMenu + embedTumblrPost

** Use this fiddle for pre-deployment testing **

by Chris Vitalos

HTML

<script src="https://clvgt12.github.io/js/JSMenu.js"></script>
<link rel="stylesheet" href="https://clvgt12.github.io/css/JSMenu.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/validator/13.6.0/validator.min.js"></script>
<link rel="stylesheet" href="https://clvgt12.github.io/css/embedTumblrPost-2.0.0.css">
<script src="https://clvgt12.github.io/js/embedTumblrPost-2.0.0.js"></script>
<!DOCTYPE html>
<html>

  <head>
    <style>
      body {
        background-color: #ddd;
      }

    </style>
  </head>

  <body>
    <div id="RecentPosts">
      <div id="RecentPosts-Tumblr-menu">
      </div>
      <div id="RecentPosts-Tumblr-region" class="embed-tweet" style="display: none;">
      </div>
      <div id="RecentPosts-Mastodon-menu">
      </div>
      <div id="RecentPosts-Mastodon-region" class="embed-tweet" style="display: none;">
        <p><span style="font-size: smaller;">Our <a target="_blank" href="https://www.patreon.com/AlbinSocial">donations</a> to <a target="_blank" href="https://mastodon.green/about">mastodon.green</a> fund <a target="_blank" href="https://www1.plant-for-the-planet.org/t/albin-social">reforestration</a></span></p>
        <div id="mt-timeline" class="mt-timeline">
          <div id="mt-body" class="mt-body">
            <div class="loading-spinner"></div>
          </div>
        </div>
      </div>
    </div>
    <script>
      document.addEventListener("DOMContentLoaded", () => {
        //Set up JSMenu blocks underneat Recent Posts section
        let tumblrRecentPostsMenuBlock = new JSMenu({
          "Top_DOM_Id": "RecentPosts-Tumblr-menu",
          "This_Div_Id": "TumblrMenu",
          "Menu_Image_URL": "https://cdn0.iconfinder.com/data/icons/global-top-brands/430/tumblr-letter-logo-512.png",
          "Menu_Text_Label": "Tumblr",
          "Arrow_Body_Color": "goldenrod",
          "Arrow_Outline_Color": "white",
          "Arrow_Outline_Stroke_Size": 3,
          "Region_Div_Id": "RecentPosts-Tumblr-region",
        ...

CSS

/* Mastodon embed feed timeline v3.13.1-1 */
/* More info at: */
/* https://gitlab.com/clvgt12/mastodon-embed-feed-timeline */

/* Variables */
:root {
  --text-max-lines: none;
}

/* Theme colors */
:root,
html[data-theme="light"] {
  --bg-color: #fff;
  --bg-hover-color: #d9e1e8;
  --line-gray-color: #c0cdd9;
  --content-text: #000;
  --link-color: #3a3bff;
  --contrast-gray-color: #606984;
  --error-text-color: #8b0000;
}
html[data-theme="dark"] {
  --bg-color: #fff;
  --bg-hover-color: #d9e1e8;
  --line-gray-color: #c0cdd9;
  --content-text: #000;
  --link-color: #3a3bff;
  --contrast-gray-color: #606984;
  --error-text-color: #8b0000;
}

/* Main container */
.mt-container {
  height: 100%;
  overflow-y: auto;
  position: relative;
  background-color: var(--bg-color);
  scrollbar-color: var(--line-gray-color) var(--bg-color);
  scrollbar-width: thin;
}
.mt-container::-webkit-scrollbar {
  width: 0.25rem;
  height: 0.25rem;
}
.mt-container::-webkit-scrollbar-thumb {
  background-color: var(--line-gray-color);
  border: none;
  border-radius: 3rem;
}
.mt-container::-webkit-scrollbar-thumb:hover,
.mt-container::-webkit-scrollbar-thumb:active {
  background-color: var(--line-gray-color);
}
.mt-container::-webkit-scrollbar-track {
  background-color: var(--bg-color);
  border: none;
  border-radius: 0;
}
.mt-container::-webkit-scrollbar-track:hover,
.mt-container::-webkit-scrollbar-track:active,
.mt-container::-webkit-scrollbar-corner {
  background-color: var(--bg-color);
}
.mt-container a:link,
.mt-container a:active,
.mt-container a {
  text-decoration: none;
  color: var(--link-color);
}
.mt-container a:not(.mt-toot-preview):hover {
  text-decoration: underline;
}
.mt-body {
  padding: 1rem clamp(0.25rem, 4vw, 1.5rem);
  white-space: pre-wrap;
  word-wrap: break-word;
  background-color: var(--bg-color);
}
.mt-body .invisible {
  font-size: 0;
  line-height: 0;
  display: inline-block;
  width: 0;
  height: 0;
  position: absolute;
}
.mt-body a {
  color:...

JavaScript

/**
 * Mastodon embed feed timeline v3.13.1-1
 * More info at:
 * https://gitlab.com/idotj/mastodon-embed-feed-timeline
 */
/**
 * This file contains modifications to the above upstream project.
 * The file repository for these modifications can be found here:
 * https://gitlab.com/clvgt12/mastodon-embed-feed-timeline
 *  
 *   Mastodon embed feed timeline
 *   Copyright (C) 2022  clvgt12
 *   Copyright (C) 2021  i.j
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU Affero General Public License as published
 *   by the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU Affero General Public License for more details.
 *
 *   You should have received a copy of the GNU Affero General Public License
 *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
/**
 * Timeline settings
 * Adjust these parameters to customize your timeline
 */
/** ------------------------------------------------------
window.addEventListener("load", () => {
  const mastodonTimeline = new MastodonApi({
    // Id of the <div> containing the timeline
    container_body_id: "mt-body",

    // Class name for the loading spinner (also used in CSS file)
    spinner_class: "loading-spinner",

    // Preferred color theme: 'light', 'dark' or 'auto'. Default: auto
    default_theme: "auto",

    // Your Mastodon instance
    instance_url: "https://mastdn.social",

    // Choose type of toots to show in the timeline: 'local', 'profile', 'hashtag'. Default: local
    timeline_type: "local",

    // Your user ID number on Mastodon instance. Leave it empty if you didn't choose 'profile' as type of timeline
    user_id: "",

    // Your user name on Mastodon...