this post was submitted on 13 Sep 2024
31 points (100.0% liked)

News from fediverse

0 readers
4 users here now

founded 10 months ago
MODERATORS
 

So an interesting change is coming to Mastodon embeds.

Previously, the embed code consisted of an iframe, going forward, this is being switched to a blockquote.

In either case, the original text of the post is not included and is rather added after the main page the embed is on is loaded.

https://github.com/mastodon/mastodon/pull/31766

#mastodon #embeds #fediverse

top 25 comments
sorted by: hot top controversial new old
[–] stefan@stefanbohacek.online 5 points 1 month ago (1 children)

There are definitely benefits of moving away from iframes, as I've discussed on my blog.

https://stefanbohacek.com/project/wordpress-plugin-for-fediverse-embeds/

Also, an important side note, if you're using my Fediverse Embeds WordPress plugin, it will not work with this latest format. I will work on an update...hopefully over this weekend.

[–] Fizzle_Up@seocommunity.social 1 points 1 month ago

@stefan@stefanbohacek.online Oooo interesting! Thanks for this!

[–] bob@beamship.mpaq.org 1 points 1 month ago

@stefan@stefanbohacek.online

I've had to "clean up" several WordPress sites that got highjacked by iframe viruses.

[–] stefan@stefanbohacek.online 1 points 1 month ago (2 children)

Okay, looking at the new embed code more closely, this is...something else.

[–] cybeardjm@masto.ai 1 points 1 month ago (1 children)

@stefan@stefanbohacek.online what will happen with previously embedded posts? They'll contain the "old code" with an iframe.

[–] stefan@stefanbohacek.online 1 points 1 month ago (2 children)

@cybeardjm@masto.ai Any existing embeds will continue to work, including from mastodon.social.

Basically, the plugin will check for the server and post ID from the iframe, and then fetches the status.

Updating the plugin to work with blockquotes should be fairly straightforward, I just need to find the time.

Will keep you posted!

[–] cybeardjm@masto.ai 1 points 1 month ago

@stefan@stefanbohacek.online thx

[–] cybeardjm@masto.ai 1 points 1 month ago (1 children)

@stefan@stefanbohacek.online It's for the next release I think, 4.3 or so...
Yeah, wouldn't like to redo all my embeds... Yes I have many ;-)

[–] stefan@stefanbohacek.online 1 points 1 month ago (1 children)

@cybeardjm@masto.ai Yeah, you definitely won't have to do that, the issue is more with wanting to embed posts from any servers running this version of Mastodon.

You will only get the blockquote HTML code, while the plugin looks for iframes, so it just won't do anything.

[–] stefan@stefanbohacek.online 1 points 1 month ago (1 children)

@cybeardjm@masto.ai Alright, I just went ahead and made the necessary update, it didn't require too much effort.

Let me know once you update the plugin!

[–] cybeardjm@masto.ai 1 points 1 month ago (1 children)

@stefan@stefanbohacek.online Old embeds still work ;-)

[–] stefan@stefanbohacek.online 1 points 1 month ago (1 children)

@cybeardjm@masto.ai Great! Did you also try the new embed, something from mastodon.social?

[–] cybeardjm@masto.ai 1 points 1 month ago (1 children)

@stefan@stefanbohacek.online Nope. If I find a post, I'll test.

[–] stefan@stefanbohacek.online 1 points 1 month ago (1 children)

@cybeardjm@masto.ai Thank you! No rush. It should work and look exactly the same way as with iframes.

[–] cybeardjm@masto.ai 1 points 1 month ago (1 children)

@stefan@stefanbohacek.online Anyway, will have to wait for it to work.
My instance is still 4.2.10, so it doesn't seem to work well...

[–] stefan@stefanbohacek.online 1 points 1 month ago (1 children)

@cybeardjm@masto.ai Oh that's interesting, I am able to replicate this as well.

I added a note to https://github.com/mastodon/mastodon/pull/31766#issuecomment-2351041692.

cc @andypiper@macaw.social

[–] andypiper@macaw.social 1 points 1 month ago (1 children)

@stefan@stefanbohacek.online @cybeardjm@masto.ai it should still work with the old-style iframe code but with the post URL substituted in (on the Wordpress side)

[–] stefan@stefanbohacek.online 1 points 1 month ago* (last edited 1 month ago) (1 children)

@andypiper @cybeardjm Right, but this is an issue with the UI, the embed code is missing, see the screenshot I added to the GitHub issue.

[–] andypiper@macaw.social 1 points 1 month ago (1 children)

@stefan@stefanbohacek.online @cybeardjm@masto.ai 👀 thanks for submitting!

[–] stefan@stefanbohacek.online 1 points 1 month ago

@andypiper@macaw.social @cybeardjm@masto.ai No problem!

[–] stefan@stefanbohacek.online 1 points 1 month ago (1 children)

For comparison, the previous (and on most Mastodon servers, the current) version looked like this.

[–] qwazix@bananachips.club 1 points 1 month ago

@stefan@stefanbohacek.online it seems presumptive to my old webdev mind to assume all places that allow embeds will allow external js.

Also, seriously, do you expect me to backdoor my own site??

[–] some_guy@lemmy.sdf.org 1 points 1 month ago

That looked like a Zip Disk to me, but I checked a reference photo and I was wrong.

[–] KevinMarks@xoxo.zone 1 points 1 month ago (1 children)

@stefan@stefanbohacek.online that's interesting I the sense of "what were you thinking?" putting the text in the statically served blockquote is job 0.
https://www.kevinmarks.com/twittereditsyou

[–] stefan@stefanbohacek.online 1 points 1 month ago

@KevinMarks@xoxo.zone Yeah, I think I will withhold any criticism of that, for now.

The topic of quoting people's public social media posts is pretty fascinating to me, and my thoughts might be better expressed in a blog post rather than a series of posts on here. (Especially knowing that some might feel pretty strongly about this topic.)

There is so much to consider, from people's expectations, societal norms, and the technical aspects as well.