Twitter Edits You

With all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people‘s sites.

When a site embeds a tweet like this:

the code looks like this:

<blockquote class="twitter-tweet">
<p lang="en" dir="ltr">we are working on an edit button</p>
— Twitter (@Twitter) 
<a href="https://twitter.com/Twitter/status/1509951255388504066">
April 1, 2022</a>
</blockquote> 
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8">
</script>

That widgets.js script looks for blockquotes with the class="twitter-tweet" on, and replaces them with a Twitter-branded iframe to confirm that it is a real tweet (and to encourage you to click through to Twitter).

Without the script it would look like this:

we are working on an edit button

— Twitter (@Twitter) April 1, 2022

Until recently, if the tweet or account had been deleted, then Twitter would leave the blockquote alone, so the embedded text would still show, but without Twitter’s validation.

This was by design, so that the act of quoting would still work. As Ben Ward, who wrote the original code said:

And the API documentation still says this:

However, Twitter has broken this API contract. Here’s a tweet that I deleted:

Notice that it doesn’t show as a blockquote fallback, but as an empty white blob. Twitter is not confirming the tweet, but it is erasing my citation of it.

Update

Twitter has now reverted the change. “[W]e’re rolling back this change for now while we explore different options” Twitter spokesperson Remi Duhé said according to Emma Roth of The Verge.

Before this, the tweet above looked like this:

Twitter has used its javascript to edit my webpage text. When I pointed this out to Twitter Engineering:

The response was that this was “to better respect when people have chosen to delete their Tweets”:

This is tampering with the public record. Any news article that cited a tweet from the former president, like this vox one, will now have an incoherent hole in it:

Rather than the cited text:

I don’t think Twitter should edit other people’s webpages to remove tweets that have subsequently been deleted. Do you?

Update

Mark Jaquith has a protection script that runs before Twitter’s, checks for deleted or hidden tweets and removes the class="twitter-tweet" from the blockquotes so they don’t get stomped.

I spoke to Tech News Weekly about this:

Twitter is using it’s embedded JavaScript to edit other people's sites L: kevinmarks.com/twittereditsyo… C: news.ycombinator.com/item?id=309282…
Twitter is using it’s embedded JavaScript to edit other people's sites: kevinmarks.com/twittereditsyo… Comments: news.ycombinator.com/item?id=309282…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo… (news.ycombinator.com/item?id=309282…)
Twitter is using it’s embedded JavaScript to edit other people&#x27;s sites kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people&#x27;s sites kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites Link: kevinmarks.com/twittereditsyo… Comments: news.ycombinator.com/item?id=309282…
Twitter tampering with the public record. kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo… (news.ycombinator.com/item?id=309282…)
Twitterは、埋め込まれたJavaScriptを使用して他の人のサイトを編集しています kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo…
Bookmarked In Soviet Musk Twitter, Twitter edits you Post detailsWith all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people’s sites.Recommended read: Twitter Edits You http://www.kevinmarks.com/twittereditsyou.htmlWed, 06 Apr 2022 08:04 by Jamie Tanna . #twitter #social-media.
[object Object]
Twitter is using it’s embedded JavaScript to edit other people's sites #blockquote #code #script #tweets #edits #kevin #working #twitter #deleted #text #edit kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo…
kevinmarks.com/twittereditsyo…
kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo… (news.ycombinator.com/item?id=309282…)
Damit zwingt Twitter Medienunternehmen geradezu, Tweets mithilfe von Screenshots zu dokumentieren (glücklicherweise auch die datenschutzfreundlichere Variante, da man auf das Twitter-Embed-Skript verzichten kann) kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo…
New post in Gillmor Gang: ift.tt/pQuqa9h With all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people's sites. kevinmarks.com/twittereditsyo…
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo… Article URL: kevinmarks.com/twittereditsyo… Comments URL: news.ycombinator.com/item?id=309282… Points: 183 # Comments: 97
Twitter is using it’s embedded JavaScript to edit other people's sites kevinmarks.com/twittereditsyo… (news.ycombinator.com/item?id=309282…)
아 HN에 트위터가 당신 사이트를 수정한다 같은 글 또 떠서 보니까 또 어그로야 진짜 kevinmarks.com/twittereditsyo…
Twitter is using its embedded JavaScript to hide tweets that have been deleted kevinmarks.com/twittereditsyo… Article URL: kevinmarks.com/twittereditsyo… Comments URL: news.ycombinator.com/item?id=309282… Points: 224 # Comments: 120
Looks like it's time to begin illustrating news articles with screenshots of tweets rather than embeds again kevinmarks.com/twittereditsyo…
Se citas un tuit na túa web mediante o JS de Twitter e logo bórrano, desaparece de alí completamente. Non é sorprendente, nin sequera ilegal ou inético, apenas unha cousa a ter presente. kevinmarks.com/twittereditsyo…
Twitter正在使用它的嵌入式JavaScript来编辑其他人的网站 Twitter is using it’s embedded JavaScript to edit other people's sites HN讨论地址: news.ycombinator.com/item?id=309282… 原文地址: kevinmarks.com/twittereditsyo…
Twitter is using its embedded JavaScript to hide tweets that have been deleted kevinmarks.com/twittereditsyo… (news.ycombinator.com/item?id=309282…)
Twitter is using its embedded JavaScript to hide tweets that have been deleted kevinmarks.com/twittereditsyo… (news.ycombinator.com/item?id=309282…)
Twitter Edits You kevinmarks.com/twittereditsyo…
Unknown
I’ve noticed this over the last few weeks and like @kevinmarks, I’m not a fan at all. Hiding the embedded text from a tweet embed via JavaScript b/c something has been deleted just feels wrong. kevinmarks.com/twittereditsyo…
Nice catch by Kevin including the paper trail of the change! I wish I could say I was surprised.
Might have to revive EmbedTweet (service I made to embed tweets before Twitter introduced its own alternative) 🤔 kevinmarks.com/twittereditsyo…
Rewriting history is one of my least favorite trends that just won't go away. kevinmarks.com/twittereditsyo…
Top story: Twitter Edits You kevinmarks.com/twittereditsyo…, see more tweetedtimes.com/jackschofield?…
Very important points here. Don’t rewrite history.
Top story: Twitter Edits You kevinmarks.com/twittereditsyo…, see more tweetedtimes.com/Higgsb101?s=tnp
Top story: Twitter Edits You kevinmarks.com/twittereditsyo…, see more tweetedtimes.com/bbctechcreate?…
Twitter Edits You 2022-04-06 With all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people‘s sites. kevinmarks.com/twittereditsyo… @kevinmarks
Twitter is using its embedded JavaScript to hide tweets that have been deleted kevinmarks.com/twittereditsyo…
Twitter now renders embedded deleted tweets as white blobs, @kevinmarks has discovered, similar to the grey block YouTube displays for embedded videos that have gone MIA. And more internet memory holes open. kevinmarks.com/twittereditsyo…
Interesting. @kevinmarks has discovered that Twitter is now “editing other people’s webpages” to remove tweets that have subsequently been deleted. kevinmarks.com/twittereditsyo…
Mark my words: one day, we are going to look back in time, look at the internet archive and exclaim "omgwtf were people doing embedding third party <script> tags ?!". kevinmarks.com/twittereditsyo…
Twitter change leaves huge gaps in websites - The Verge theverge.com/2022/4/6/23012… FYI kevinmarks.com/twittereditsyo…
Twitter'ın edit butonu koymasının konuşulduğu şu günlerde bu duruma farklı bir açıdan bakan çok güzel bir yazı💡 "In Soviet Musk Twitter, Twitter edits you" kevinmarks.com/twittereditsyo…
#Twitter edits you! kevinmarks.com/twittereditsyo… via @kevinmarks 🐦
Twitter changed how embeds work for deleted tweets, causing blank spaces on websites: blockquote text would previous display for deleted tweets; this impacts every blog or news site that ever… kevinmarks.com/twittereditsyo…
"With all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people‘s sites." kevinmarks.com/twittereditsyo…
Perhaps the solution is to differentiate between user deleted tweets and moderator/staff removed tweets (as Reddit does). Will achieve Twitter's stated goal while preserving the public record (Trump's tweets, for example, will fall under the latter).
That is a fair point, didn't realize the blockquote is in the original non-JS rendered HTML. Interestingly, that means you can actually fix it, not sure if legal. Run your JS before Twitter to cache the blockquote, Twitter runs, then put it back again.
My other point still stands though: there is a "right to be forgotten" which you should not just ignore. It's not an unlimited right, but it's not nothing either.
@kevinmarks not expected @Twitter behavior from a publisher point of view. kevinmarks.com/twittereditsyo…
埋め込んだツイートが削除された時、フォールバックのblockquote要素ではなく空のウィジェットが表示されるようになった Twitter Edits You kevinmarks.com/twittereditsyo…
[好奇] Twitter Edits You kevinmarks.com/twittereditsyo… > Twitter is using its embedded javascript to edit other people‘s sites.
Twitter Edits You kevinmarks.com/twittereditsyo… With all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people‘s sites.
Twitter Edits You kevinmarks.com/twittereditsyo… With all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people‘s sites.
Twitter Edits You kevinmarks.com/twittereditsyo… With all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people‘s sites.
Twitter Edits You kevinmarks.com/twittereditsyo… With all the fuss about Twitter’s promised edit button, and how they might design it, we’re missing a disturbing development — Twitter is using its embedded javascript to edit other people‘s sites.
Like it, or lump it....The internet runs on filters. kevinmarks.com/twittereditsyo…
Another Twitter API contract broken. As if more evidence was needed that an edit button is a bad idea. If they do insist on adding one then an edit history should be maintained at least for all to see. kevinmarks.com/twittereditsyo…
Good point on how Twitter changed its embed functinoality, with examples and why it matters.. kevinmarks.com/twittereditsyo…
To soon to blame @elonmusk but this is a serious blow to researchers who track things that liars lie about.. kevinmarks.com/twittereditsyo…
Unknown
Twitter Edits You kevinmarks.com/twittereditsyo…
Poor decision by Twitter. Good find by @kevinmarks Thank goodness for @markjaquith's stabletweet implementation. kevinmarks.com/twittereditsyo…
To the importance of owning your data and scripts. If you're using Twitter's widget.js to embed Tweets, a recent change introduced that it removes fallback content for deleted Tweets. Ergo: Twitter wipes out content on millions of pages. 👇 kevinmarks.com/twittereditsyo…
Is there a good alternative to Twitter’s script? If you don’t include it, images won’t load.
I'm planning to build something server-side via the Twitter API, wouldn't that work? Haven't seen an alternative other than a proxy script that doesn't load widgets.js if the tweet was deleted.
A weekly note
I’ve been trying for a while to work my way back to a perfect moka pot recipe. My tried and true version has stopped doing the trick—maybe because I’m using different beans; more likely because we fixed the grinder and the grind has changed in some way. If my guess is right, then it’s been about two years of infrequent moka pot grumblings. A couple weeks ago I accidentally bought pre-ground Stumptown coffee at Safeway and had a bit left over. This week I tossed it in the moka pot to see what happened.
Unknown
"You don't need to use Twitter's JS to show Tweets. If you choose to use their system, you're subject to their rules. If you don't like their rules, don't use their stuff. Calling it "altering th... " Continues on HN: news.ycombinator.com/item?id=309282…
"I see so many people here arguing that by embedding javascript directly from Twitter, you are accepting whatever they choose to make that javascript do. While that is true to an extent, Twitter... " Continues on HN: news.ycombinator.com/item?id=309282…
Can you untag me please, this convo has turned to shite
Twitter is using it’s embedded JavaScript to edit other people's sites - kevinmarks.com/twittereditsyo…
kevinmarks.com/twittereditsyo… #Musk Turned Down The Seat On Twitter After #Pumping Stock Up Nearly 30%, Making About $1,000,000,000 In Under 24 Hours. Edit Button Requested, But Will Not Happen. Twitter Uses #JavaScript To Edit Your Websites & Plans To Do This In The Future Secretly.
#Twitter is using it’s embedded #JavaScript to edit other people's sites kevinmarks.com/twittereditsyo…
Also, there are thousands of web pages that have quoted tweets in, including news stories, and they drive traffic to twitter. I wrote about this recently when twitter messed with them: kevinmarks.com/twittereditsyo…
BTW Twitter's recent change of blanking out deleted tweets when embedded although rolled back as detailed in kevinmarks.com/twittereditsyo… probably already pushed some to rather consider embedding screenshots with the original text as alt instead of relying on Twitter.
Twitter Edits You Twitter is using its embedded javascript to edit other people‘s sites. There seems to be a fix: GitHub – markjaquith/stabletweet. I wonder if someone will make a WordPress plug-in?
Twitter Edits You Twitter is using its embedded javascript to edit other people‘s sites. There seems to be a fix: GitHub – markjaquith/stabletweet. I wonder if someone will make a WordPress plug-in? kevinmarks.com/twittereditsyo…
Twitter Edits You 2022-04-06 by @kevinmarks kevinmarks.com/twittereditsyo… Well worth a read
RT gnusocial.in/shantanoo Twitter is using it’s embedded JavaScript to edit other people's sites - kevinmarks.com/twittereditsyo…
Unknown
Unknown
The plaintext is preserved, but you would lose embedded images. See kevinmarks.com/twittereditsyo…
This is very good news!
neat job on this, @markjaquith. kevinmarks.com/twittereditsyo…
Interestingly, the live web version of the blog post linked to in the latter TC article had more page damage than archived versions. kevinmarks.com/twittereditsyo…
@KevinMarks 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.