Improve CSS + date/time tag
This commit is contained in:
		
							parent
							
								
									fdf15d60c9
								
							
						
					
					
						commit
						d165c659aa
					
				| @ -1,3 +1,7 @@ | ||||
| v3.9.5 - 23/09/2023 | ||||
| - Improve CSS class names | ||||
| - Use "time" tag for date format | ||||
| 
 | ||||
| v3.9.4 - 21/09/2023 | ||||
| - Add replies, reblog (boosts) and favourites counter | ||||
| 
 | ||||
|  | ||||
| @ -20,7 +20,7 @@ | ||||
|         font-family: Arial, Helvetica, sans-serif; | ||||
|       } | ||||
| 
 | ||||
|       .dummy-container { | ||||
|       .dummy-wrapper { | ||||
|         width: 100%; | ||||
|         max-width: 26rem; | ||||
|         height: calc(100% - 4rem); | ||||
| @ -30,8 +30,8 @@ | ||||
|   </head> | ||||
| 
 | ||||
|   <body> | ||||
|     <div class="dummy-container"> | ||||
|       <div class="mt-timeline"> | ||||
|     <div class="dummy-wrapper"> | ||||
|       <div class="mt-container"> | ||||
|         <div id="mt-body" class="mt-body" role="feed"> | ||||
|           <div class="loading-spinner"></div> | ||||
|         </div> | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* Mastodon embed feed timeline v3.9.4 */ | ||||
| /* Mastodon embed feed timeline v3.9.5 */ | ||||
| /* More info at: */ | ||||
| /* https://gitlab.com/idotj/mastodon-embed-feed-timeline */ | ||||
| 
 | ||||
| @ -27,40 +27,39 @@ html[data-theme="dark"] { | ||||
| } | ||||
| 
 | ||||
| /* Main container */ | ||||
| .mt-timeline { | ||||
| .mt-container { | ||||
|   height: 100%; | ||||
|   overflow-y: auto; | ||||
|   position: relative; | ||||
|   background: var(--bg-color); | ||||
|   scrollbar-color: var(--bg-hover-color) rgba(0, 0, 0, 0.1); | ||||
| } | ||||
| .mt-timeline a:link, | ||||
| .mt-timeline a:active, | ||||
| .mt-timeline a { | ||||
| .mt-container a:link, | ||||
| .mt-container a:active, | ||||
| .mt-container a { | ||||
|   text-decoration: none; | ||||
|   color: var(--link-color); | ||||
| } | ||||
| .mt-timeline a:not(.toot-preview-link):hover { | ||||
| .mt-container a:not(.mt-toot-preview):hover { | ||||
|   text-decoration: underline; | ||||
| } | ||||
| .mt-timeline::-webkit-scrollbar { | ||||
| .mt-container::-webkit-scrollbar { | ||||
|   width: 0.75rem; | ||||
|   height: 0.75rem; | ||||
| } | ||||
| .mt-timeline::-webkit-scrollbar-corner { | ||||
| .mt-container::-webkit-scrollbar-corner { | ||||
|   background: transparent; | ||||
| } | ||||
| .mt-timeline::-webkit-scrollbar-thumb { | ||||
| .mt-container::-webkit-scrollbar-thumb { | ||||
|   border: 0 var(--content-text); | ||||
|   border-radius: 2rem; | ||||
|   background: var(--bg-hover-color); | ||||
| } | ||||
| .mt-timeline::-webkit-scrollbar-track { | ||||
| .mt-container::-webkit-scrollbar-track { | ||||
|   border: 0 var(--content-text); | ||||
|   border-radius: 0; | ||||
|   background: rgba(0, 0, 0, 0.1); | ||||
| } | ||||
| 
 | ||||
| .mt-body { | ||||
|   padding: 1rem 1.5rem; | ||||
|   white-space: pre-wrap; | ||||
| @ -94,7 +93,7 @@ html[data-theme="dark"] { | ||||
| } | ||||
| 
 | ||||
| /* User avatar */ | ||||
| .mt-avatar { | ||||
| .mt-toot-avatar { | ||||
|   width: 3rem; | ||||
|   height: 3rem; | ||||
|   position: absolute; | ||||
| @ -103,17 +102,17 @@ html[data-theme="dark"] { | ||||
|   border-radius: 0.25rem; | ||||
|   overflow: hidden; | ||||
| } | ||||
| .mt-avatar-image img { | ||||
| .mt-toot-avatar-image img { | ||||
|   width: 100%; | ||||
|   height: auto; | ||||
| } | ||||
| .mt-avatar-image .mt-avatar-boosted { | ||||
| .mt-toot-avatar-image .mt-toot-avatar-boosted { | ||||
|   width: 2.25rem; | ||||
|   height: 2.25rem; | ||||
|   border-radius: 0.25rem; | ||||
|   overflow: hidden; | ||||
| } | ||||
| .mt-avatar-image .mt-avatar-account { | ||||
| .mt-toot-avatar-image .mt-toot-avatar-account { | ||||
|   width: 1.5rem; | ||||
|   height: 1.5rem; | ||||
|   top: 1.5rem; | ||||
| @ -127,47 +126,47 @@ html[data-theme="dark"] { | ||||
| .mt-toot-header { | ||||
|   display: flex; | ||||
|   justify-content: space-between; | ||||
|   align-items: center; | ||||
|   align-items: flex-start; | ||||
|   margin-bottom: 1rem; | ||||
| } | ||||
| .mt-user { | ||||
| .mt-toot-header-user { | ||||
|   font-weight: 600; | ||||
|   padding-right: 1rem; | ||||
| } | ||||
| .mt-user > a { | ||||
| .mt-toot-header-user > a { | ||||
|   color: var(--content-text) !important; | ||||
| } | ||||
| .toot-date { | ||||
| .mt-toot-header-date { | ||||
|   font-size: 0.75rem; | ||||
|   text-align: right; | ||||
| } | ||||
| 
 | ||||
| /* Text */ | ||||
| .toot-text { | ||||
| .mt-toot-text { | ||||
|   margin-bottom: 1rem; | ||||
|   color: var(--content-text); | ||||
| } | ||||
| .toot-text .spoiler-link { | ||||
| .mt-toot-text .spoiler-btn { | ||||
|   display: inline-block; | ||||
| } | ||||
| .toot-text .spoiler-text-hidden { | ||||
| .mt-toot-text .spoiler-text-hidden { | ||||
|   display: none; | ||||
| } | ||||
| .toot-text.truncate { | ||||
| .mt-toot-text.truncate { | ||||
|   display: -webkit-box; | ||||
|   overflow: hidden; | ||||
|   -webkit-line-clamp: var(--text-max-lines); | ||||
|   -webkit-box-orient: vertical; | ||||
| } | ||||
| .toot-text:not(.truncate) .ellipsis::after { | ||||
| .mt-toot-text:not(.truncate) .ellipsis::after { | ||||
|   content: "..."; | ||||
| } | ||||
| .toot-text blockquote { | ||||
| .mt-toot-text blockquote { | ||||
|   border-left: 0.25rem solid var(--line-gray-color); | ||||
|   margin-left: 0; | ||||
|   padding-left: 0.5rem; | ||||
| } | ||||
| .toot-text .custom-emoji { | ||||
| .mt-toot-text .custom-emoji { | ||||
|   height: 1.5rem; | ||||
|   min-width: 1.5rem; | ||||
|   margin-bottom: -0.25rem; | ||||
| @ -175,58 +174,42 @@ html[data-theme="dark"] { | ||||
| } | ||||
| 
 | ||||
| /* Poll */ | ||||
| .toot-poll { | ||||
| .mt-toot-poll { | ||||
|   margin-bottom: 0.25rem; | ||||
|   color: var(--content-text); | ||||
| } | ||||
| .toot-poll ul { | ||||
| .mt-toot-poll ul { | ||||
|   list-style: none; | ||||
|   padding: 0; | ||||
|   margin: 0; | ||||
| } | ||||
| .toot-poll ul li { | ||||
| .mt-toot-poll ul li { | ||||
|   font-size: 0.9rem; | ||||
|   margin-bottom: 0.5rem; | ||||
| } | ||||
| .toot-poll ul li:not(:last-child) { | ||||
| .mt-toot-poll ul li:not(:last-child) { | ||||
|   margin-bottom: 0.25rem; | ||||
| } | ||||
| .toot-poll ul li:before { | ||||
| .mt-toot-poll ul li:before { | ||||
|   content: "◯"; | ||||
|   padding-right: 0.5rem; | ||||
| } | ||||
| 
 | ||||
| /* Medias */ | ||||
| .toot-media { | ||||
| .mt-toot-media { | ||||
|   overflow: hidden; | ||||
|   margin-bottom: 1rem; | ||||
| } | ||||
| .toot-media-preview { | ||||
|   position: relative; | ||||
|   margin-top: 0.25rem; | ||||
|   height: auto; | ||||
|   text-align: center; | ||||
|   width: 100%; | ||||
| } | ||||
| .toot-media > .spoiler-link { | ||||
| .mt-toot-media > .spoiler-btn { | ||||
|   position: absolute; | ||||
|   top: 50%; | ||||
|   left: 50%; | ||||
|   z-index: 1; | ||||
|   transform: translate(-50%, -50%); | ||||
| } | ||||
| .toot-media-spoiler > img { | ||||
| .mt-toot-media-spoiler > img { | ||||
|   filter: blur(2rem); | ||||
| } | ||||
| .toot-media-preview a { | ||||
|   display: block; | ||||
|   position: absolute; | ||||
|   top: 0; | ||||
|   right: 0; | ||||
|   bottom: 0; | ||||
|   left: 0; | ||||
| } | ||||
| 
 | ||||
| .img-ratio14_7 { | ||||
|   position: relative; | ||||
|   padding-top: 56.95%; | ||||
| @ -243,7 +226,7 @@ html[data-theme="dark"] { | ||||
| } | ||||
| 
 | ||||
| /* Preview link */ | ||||
| .toot-preview-link { | ||||
| .mt-toot-preview { | ||||
|   min-height: 4rem; | ||||
|   display: flex; | ||||
|   flex-direction: row; | ||||
| @ -254,23 +237,23 @@ html[data-theme="dark"] { | ||||
|   margin: 1rem 0; | ||||
|   overflow: hidden; | ||||
| } | ||||
| .toot-preview-image { | ||||
| .mt-toot-preview-image { | ||||
|   width: 40%; | ||||
|   align-self: stretch; | ||||
| } | ||||
| .toot-preview-image img { | ||||
| .mt-toot-preview-image img { | ||||
|   display: block; | ||||
|   width: 100%; | ||||
|   height: 100%; | ||||
|   object-fit: cover; | ||||
| } | ||||
| .toot-preview-noImage { | ||||
| .mt-toot-preview-noImage { | ||||
|   width: 40%; | ||||
|   font-size: 1.5rem; | ||||
|   align-self: center; | ||||
|   text-align: center; | ||||
| } | ||||
| .toot-preview-content { | ||||
| .mt-toot-preview-content { | ||||
|   width: 60%; | ||||
|   display: flex; | ||||
|   align-self: center; | ||||
| @ -278,12 +261,12 @@ html[data-theme="dark"] { | ||||
|   padding: 0.5rem 1rem; | ||||
|   gap: 0.5rem; | ||||
| } | ||||
| .toot-preview-title { | ||||
| .mt-toot-preview-title { | ||||
|   font-weight: 600; | ||||
| } | ||||
| 
 | ||||
| /* Spoiler button */ | ||||
| .spoiler-link { | ||||
| .spoiler-btn { | ||||
|   border-radius: 2px; | ||||
|   background-color: var(--line-gray-color); | ||||
|   border: 0; | ||||
| @ -298,25 +281,23 @@ html[data-theme="dark"] { | ||||
| } | ||||
| 
 | ||||
| /* Counter bar */ | ||||
| .mt-counter-bar { | ||||
| .mt-toot-counter-bar { | ||||
|   display: flex; | ||||
|   gap: clamp(0.25rem, 1vw, 1.5rem); | ||||
|   color: var(--link-color); | ||||
| } | ||||
| 
 | ||||
| .mt-counter-replies, | ||||
| .mt-counter-reblog, | ||||
| .mt-counter-favorites { | ||||
| .mt-toot-counter-bar-replies, | ||||
| .mt-toot-counter-bar-reblog, | ||||
| .mt-toot-counter-bar-favorites { | ||||
|   display: flex; | ||||
|   font-size: 0.75rem; | ||||
|   gap: 0.25rem; | ||||
|   align-items: center; | ||||
|   opacity: 0.5; | ||||
| } | ||||
| 
 | ||||
| .mt-counter-replies > svg, | ||||
| .mt-counter-reblog > svg, | ||||
| .mt-counter-favorites > svg { | ||||
| .mt-toot-counter-bar-replies > svg, | ||||
| .mt-toot-counter-bar-reblog > svg, | ||||
| .mt-toot-counter-bar-favorites > svg { | ||||
|   width: 1rem; | ||||
|   fill: var(--link-color); | ||||
| } | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| /** | ||||
|  * Mastodon embed feed timeline v3.9.4 | ||||
|  * Mastodon embed feed timeline v3.9.5 | ||||
|  * More info at: | ||||
|  * https://gitlab.com/idotj/mastodon-embed-feed-timeline
 | ||||
|  */ | ||||
| @ -166,7 +166,7 @@ MastodonApi.prototype.buildTimeline = async function () { | ||||
|         this.INSTANCE_URL + | ||||
|         "/" + | ||||
|         linkSeeMorePath + | ||||
|         '" class="btn" target="_blank" rel="nofollow noopener noreferrer">' + | ||||
|         '" target="_blank" rel="nofollow noopener noreferrer">' + | ||||
|         this.LINK_SEE_MORE + | ||||
|         "</a></div>"; | ||||
|       this.mtBodyContainer.parentNode.insertAdjacentHTML( | ||||
| @ -186,16 +186,13 @@ MastodonApi.prototype.buildTimeline = async function () { | ||||
|       e.target.localName == "article" || | ||||
|       e.target.offsetParent?.localName == "article" || | ||||
|       (e.target.localName == "img" && | ||||
|         e.target.offsetParent.className !== "mt-avatar" && | ||||
|         e.target.offsetParent.className !== "mt-avatar-account") | ||||
|         e.target.offsetParent.className !== "mt-toot-avatar" && | ||||
|         e.target.offsetParent.className !== "mt-toot-avatar-account") | ||||
|     ) { | ||||
|       openTootURL(e); | ||||
|     } | ||||
|     // Check if Show More/Less button was clicked
 | ||||
|     if ( | ||||
|       e.target.localName == "button" && | ||||
|       e.target.className == "spoiler-link" | ||||
|     ) { | ||||
|     if (e.target.localName == "button" && e.target.className == "spoiler-btn") { | ||||
|       toogleSpoiler(e); | ||||
|     } | ||||
|   }); | ||||
| @ -216,7 +213,7 @@ MastodonApi.prototype.buildTimeline = async function () { | ||||
|       e.target.localName !== "a" && | ||||
|       e.target.localName !== "span" && | ||||
|       e.target.localName !== "button" && | ||||
|       e.target.parentNode.className !== "toot-preview-image" && | ||||
|       e.target.parentNode.className !== "mt-toot-preview-image" && | ||||
|       urlToot | ||||
|     ) { | ||||
|       window.open(urlToot, "_blank"); | ||||
| @ -230,7 +227,7 @@ MastodonApi.prototype.buildTimeline = async function () { | ||||
|   const toogleSpoiler = function (e) { | ||||
|     const nextSibling = e.target.nextSibling; | ||||
|     if (nextSibling.localName === "img") { | ||||
|       e.target.parentNode.classList.remove("toot-media-spoiler"); | ||||
|       e.target.parentNode.classList.remove("mt-toot-media-spoiler"); | ||||
|       e.target.style.display = "none"; | ||||
|     } else if ( | ||||
|       nextSibling.classList.contains("spoiler-text-hidden") || | ||||
| @ -338,7 +335,7 @@ MastodonApi.prototype.getTimelineData = async function () { | ||||
|         return { ...result, ...dataItem }; | ||||
|       }, {}); | ||||
| 
 | ||||
|       // console.log("Timeline data: ", this.FETCHED_DATA);
 | ||||
|       console.log("Timeline data fetched: ", this.FETCHED_DATA); | ||||
|       resolve(); | ||||
|     }); | ||||
|   }); | ||||
| @ -359,7 +356,7 @@ MastodonApi.prototype.appendToot = function (c, i) { | ||||
|  * @param {number} i Index of toot | ||||
|  */ | ||||
| MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|   let avatar, user, url, date; | ||||
|   let avatar, user, url, date, formattedDate; | ||||
| 
 | ||||
|   if (c.reblog) { | ||||
|     // BOOSTED toot
 | ||||
| @ -370,16 +367,16 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|     avatar = | ||||
|       '<a href="' + | ||||
|       c.reblog.account.url + | ||||
|       '" class="mt-avatar" rel="nofollow noopener noreferrer" target="_blank">' + | ||||
|       '<div class="mt-avatar-image">' + | ||||
|       '<div class="mt-avatar-boosted">' + | ||||
|       '" class="mt-toot-avatar" rel="nofollow noopener noreferrer" target="_blank">' + | ||||
|       '<div class="mt-toot-avatar-image">' + | ||||
|       '<div class="mt-toot-avatar-boosted">' + | ||||
|       '<img src="' + | ||||
|       c.reblog.account.avatar + | ||||
|       '" alt="' + | ||||
|       c.reblog.account.username + | ||||
|       ' avatar" loading="lazy" />' + | ||||
|       "</div>" + | ||||
|       '<div class="mt-avatar-account">' + | ||||
|       '<div class="mt-toot-avatar-account">' + | ||||
|       '<img src="' + | ||||
|       c.account.avatar + | ||||
|       '" alt="' + | ||||
| @ -391,7 +388,7 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
| 
 | ||||
|     // User name and url
 | ||||
|     user = | ||||
|       '<div class="mt-user">' + | ||||
|       '<div class="mt-toot-header-user">' + | ||||
|       '<a href="' + | ||||
|       c.reblog.account.url + | ||||
|       '" rel="nofollow noopener noreferrer" target="_blank">' + | ||||
| @ -403,7 +400,7 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|       "</div>"; | ||||
| 
 | ||||
|     // Date
 | ||||
|     date = this.formatDate(c.reblog.created_at); | ||||
|     date = c.reblog.created_at; | ||||
|   } else { | ||||
|     // STANDARD toot
 | ||||
|     // Toot url
 | ||||
| @ -413,8 +410,8 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|     avatar = | ||||
|       '<a href="' + | ||||
|       c.account.url + | ||||
|       '" class="mt-avatar" rel="nofollow noopener noreferrer" target="_blank">' + | ||||
|       '<div class="mt-avatar-image">' + | ||||
|       '" class="mt-toot-avatar" rel="nofollow noopener noreferrer" target="_blank">' + | ||||
|       '<div class="mt-toot-avatar-image">' + | ||||
|       '<img src="' + | ||||
|       c.account.avatar + | ||||
|       '" alt="' + | ||||
| @ -425,7 +422,7 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
| 
 | ||||
|     // User name and url
 | ||||
|     user = | ||||
|       '<div class="mt-user">' + | ||||
|       '<div class="mt-toot-header-user">' + | ||||
|       '<a href="' + | ||||
|       c.account.url + | ||||
|       '" rel="nofollow noopener noreferrer" target="_blank">' + | ||||
| @ -435,16 +432,21 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|       "</div>"; | ||||
| 
 | ||||
|     // Date
 | ||||
|     date = this.formatDate(c.created_at); | ||||
|     date = c.created_at; | ||||
|   } | ||||
| 
 | ||||
|   // Date
 | ||||
|   formattedDate = this.formatDate(date); | ||||
|   let timestamp = | ||||
|     '<div class="toot-date">' + | ||||
|     '<div class="mt-toot-header-date">' + | ||||
|     '<a href="' + | ||||
|     url + | ||||
|     '" rel="nofollow noopener noreferrer" tabindex="-1" target="_blank">' + | ||||
|     '" rel="nofollow noopener noreferrer" target="_blank">' + | ||||
|     '<time datetime="' + | ||||
|     date + | ||||
|     '">' + | ||||
|     formattedDate + | ||||
|     "</time>" + | ||||
|     "</a>" + | ||||
|     "</div>"; | ||||
| 
 | ||||
| @ -463,7 +465,7 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|     content = | ||||
|       '<div class="toot-text">' + | ||||
|       c.spoiler_text + | ||||
|       ' <button type="button" class="spoiler-link" aria-expanded="false">Show more</button>' + | ||||
|       ' <button type="button" class="spoiler-btn" aria-expanded="false">Show more</button>' + | ||||
|       '<div class="spoiler-text-hidden">' + | ||||
|       this.formatTootText(c.content) + | ||||
|       "</div>" + | ||||
| @ -476,7 +478,7 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|     content = | ||||
|       '<div class="toot-text">' + | ||||
|       c.reblog.spoiler_text + | ||||
|       ' <button type="button" class="spoiler-link" aria-expanded="false">Show more</button>' + | ||||
|       ' <button type="button" class="spoiler-btn" aria-expanded="false">Show more</button>' + | ||||
|       '<div class="spoiler-text-hidden">' + | ||||
|       this.formatTootText(c.reblog.content) + | ||||
|       "</div>" + | ||||
| @ -487,19 +489,19 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|     c.reblog.spoiler_text === "" | ||||
|   ) { | ||||
|     content = | ||||
|       '<div class="toot-text ' + | ||||
|       '<div class="mt-toot-text' + | ||||
|       text_css + | ||||
|       '">' + | ||||
|       "<div>" + | ||||
|       '<div class="mt-toot-text-wrapper">' + | ||||
|       this.formatTootText(c.reblog.content) + | ||||
|       "</div>" + | ||||
|       "</div>"; | ||||
|   } else { | ||||
|     content = | ||||
|       '<div class="toot-text ' + | ||||
|       '<div class="mt-toot-text' + | ||||
|       text_css + | ||||
|       '">' + | ||||
|       "<div>" + | ||||
|       '<div class="mt-toot-text-wrapper">' + | ||||
|       this.formatTootText(c.content) + | ||||
|       "</div>" + | ||||
|       "</div>"; | ||||
| @ -534,32 +536,32 @@ MastodonApi.prototype.assambleToot = function (c, i) { | ||||
|     for (let i in c.poll.options) { | ||||
|       pollOption += "<li>" + c.poll.options[i].title + "</li>"; | ||||
|     } | ||||
|     poll = '<div class="toot-poll">' + "<ul>" + pollOption + "</ul>" + "</div>"; | ||||
|     poll = '<div class="mt-toot-poll">' + "<ul>" + pollOption + "</ul>" + "</div>"; | ||||
|   } | ||||
| 
 | ||||
|   // Counter bar
 | ||||
|   let counterBar = ""; | ||||
|   if (!this.HIDE_COUNTER_BAR) { | ||||
|     let repliesCount = | ||||
|       '<div class="mt-counter-replies">' + | ||||
|       '<div class="mt-toot-counter-bar-replies">' + | ||||
|       '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1792 1600" aria-hidden="true"><path d="M1792 1056q0 166-127 451q-3 7-10.5 24t-13.5 30t-13 22q-12 17-28 17q-15 0-23.5-10t-8.5-25q0-9 2.5-26.5t2.5-23.5q5-68 5-123q0-101-17.5-181t-48.5-138.5t-80-101t-105.5-69.5t-133-42.5t-154-21.5t-175.5-6H640v256q0 26-19 45t-45 19t-45-19L19 621Q0 602 0 576t19-45L531 19q19-19 45-19t45 19t19 45v256h224q713 0 875 403q53 134 53 333z"/></svg>' + | ||||
|       c.replies_count + | ||||
|       "</div>"; | ||||
| 
 | ||||
|     let reblogCount = | ||||
|       '<div class="mt-counter-reblog">' + | ||||
|       '<div class="mt-toot-counter-bar-reblog">' + | ||||
|       '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1280" aria-hidden="true"><path d="M1280 1248q0 13-9.5 22.5t-22.5 9.5H288q-8 0-13.5-2t-9-7t-5.5-8t-3-11.5t-1-11.5V640H64q-26 0-45-19T0 576q0-24 15-41l320-384q19-22 49-22t49 22l320 384q15 17 15 41q0 26-19 45t-45 19H512v384h576q16 0 25 11l160 192q7 10 7 21zm640-416q0 24-15 41l-320 384q-20 23-49 23t-49-23l-320-384q-15-17-15-41q0-26 19-45t45-19h192V384H832q-16 0-25-12L647 180q-7-9-7-20q0-13 9.5-22.5T672 128h960q8 0 13.5 2t9 7t5.5 8t3 11.5t1 11.5v600h192q26 0 45 19t19 45z"/></svg>' + | ||||
|       c.reblogs_count + | ||||
|       "</div>"; | ||||
| 
 | ||||
|     let favoritesCount = | ||||
|       '<div class="mt-counter-favorites">' + | ||||
|       '<div class="mt-toot-counter-bar-favorites">' + | ||||
|       '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1664 1600" aria-hidden="true"><path d="M1664 615q0 22-26 48l-363 354l86 500q1 7 1 20q0 21-10.5 35.5T1321 1587q-19 0-40-12l-449-236l-449 236q-22 12-40 12q-21 0-31.5-14.5T301 1537q0-6 2-20l86-500L25 663Q0 636 0 615q0-37 56-46l502-73L783 41q19-41 49-41t49 41l225 455l502 73q56 9 56 46z"/></svg>' + | ||||
|       c.favourites_count + | ||||
|       "</div>"; | ||||
| 
 | ||||
|     counterBar = | ||||
|       '<div class="mt-counter-bar">' + | ||||
|       '<div class="mt-toot-counter-bar">' + | ||||
|       repliesCount + | ||||
|       reblogCount + | ||||
|       favoritesCount + | ||||
| @ -691,12 +693,11 @@ MastodonApi.prototype.replaceHTMLtag = function ( | ||||
| MastodonApi.prototype.placeMedias = function (m, s) { | ||||
|   let spoiler = s || false; | ||||
|   const pic = | ||||
|     '<div class="toot-media ' + | ||||
|     (spoiler ? "toot-media-spoiler" : "") + | ||||
|     " img-ratio14_7 " + | ||||
|     '<div class="mt-toot-media img-ratio14_7 ' + | ||||
|     (spoiler ? "mt-toot-media-spoiler " : "") + | ||||
|     this.SPINNER_CLASS + | ||||
|     '">' + | ||||
|     (spoiler ? '<button class="spoiler-link">Show content</button>' : "") + | ||||
|     (spoiler ? '<button class="spoiler-btn">Show content</button>' : "") + | ||||
|     '<img src="' + | ||||
|     m.preview_url + | ||||
|     '" alt="' + | ||||
| @ -716,24 +717,24 @@ MastodonApi.prototype.placePreviewLink = function (c) { | ||||
|   let card = | ||||
|     '<a href="' + | ||||
|     c.url + | ||||
|     '" class="toot-preview-link" target="_blank" rel="noopener noreferrer">' + | ||||
|     '" class="mt-toot-preview" target="_blank" rel="noopener noreferrer">' + | ||||
|     (c.image | ||||
|       ? '<div class="toot-preview-image ' + | ||||
|       ? '<div class="mt-toot-preview-image ' + | ||||
|         this.SPINNER_CLASS + | ||||
|         '"><img src="' + | ||||
|         c.image + | ||||
|         '" alt="" loading="lazy" /></div>' | ||||
|       : '<div class="toot-preview-noImage">📄</div>') + | ||||
|       : '<div class="mt-toot-preview-noImage">📄</div>') + | ||||
|     "</div>" + | ||||
|     '<div class="toot-preview-content">' + | ||||
|     '<div class="mt-toot-preview-content">' + | ||||
|     (c.provider_name | ||||
|       ? '<span class="toot-preview-provider">' + c.provider_name + "</span>" | ||||
|       ? '<span class="mt-toot-preview-provider">' + c.provider_name + "</span>" | ||||
|       : "") + | ||||
|     '<span class="toot-preview-title">' + | ||||
|     '<span class="mt-toot-preview-title">' + | ||||
|     c.title + | ||||
|     "</span>" + | ||||
|     (c.author_name | ||||
|       ? '<span class="toot-preview-author">By ' + c.author_name + "</span>" | ||||
|       ? '<span class="mt-toot-preview-author">By ' + c.author_name + "</span>" | ||||
|       : "") + | ||||
|     "</div>" + | ||||
|     "</a>"; | ||||
|  | ||||
							
								
								
									
										2
									
								
								src/mastodon-timeline.min.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								src/mastodon-timeline.min.css
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								src/mastodon-timeline.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								src/mastodon-timeline.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 idotj
						idotj