Fix media load with multiple images

This commit is contained in:
idotj 2023-10-18 14:32:53 +02:00
parent 0f721399e2
commit b5d22a4de4
4 changed files with 11 additions and 9 deletions

View File

@ -1,3 +1,6 @@
v3.10.3 - 18/10/2023
- Fix media load when post has more than one image
v3.10.2 - 01/10/2023
- Fix counter bar values with boosted posts
- Improve HTML escape characters

View File

@ -1,4 +1,4 @@
/* Mastodon embed feed timeline v3.10.2 */
/* Mastodon embed feed timeline v3.10.3 */
/* More info at: */
/* https://gitlab.com/idotj/mastodon-embed-feed-timeline */

View File

@ -1,5 +1,5 @@
/**
* Mastodon embed feed timeline v3.10.2
* Mastodon embed feed timeline v3.10.3
* More info at:
* https://gitlab.com/idotj/mastodon-embed-feed-timeline
*/
@ -538,17 +538,16 @@ MastodonApi.prototype.assambleToot = function (c, i) {
}
// Media attachments
let media = "";
let media = [];
if (c.media_attachments.length > 0) {
for (let picid in c.media_attachments) {
media = this.placeMedias(c.media_attachments[picid], c.sensitive);
media.push(this.placeMedias(c.media_attachments[picid], c.sensitive));
}
}
if (c.reblog && c.reblog.media_attachments.length > 0) {
for (let picid in c.reblog.media_attachments) {
media = this.placeMedias(
c.reblog.media_attachments[picid],
c.reblog.sensitive
media.push(
this.placeMedias(c.reblog.media_attachments[picid], c.reblog.sensitive)
);
}
}
@ -620,7 +619,7 @@ MastodonApi.prototype.assambleToot = function (c, i) {
timestamp +
"</div>" +
content +
media +
media.join("") +
previewLink +
poll +
counterBar +

File diff suppressed because one or more lines are too long