Live data from Hacker News

Twitter is using its embedded JavaScript to hide tweets that have been deleted

kevinmarks.com

81–90 of 254 posts

Re: Twitter is using its embedded JavaScript to hide tweets that have been deleted

#82

Earlier quoted context omitted.

You have to have some level of trust - our ASP.net website loads quite a few Nuget packages we regularly keep up to date. Theoretically any of them say Stripe or Paypal could add nefarious code into our site to steal a bunch of stuff - there's no practical way for us to review the source code before updating. For Javascript if you're paranoid you can add the `integrity` attribute, and most of the time you can self ho…

The difference is that you have a contractual relationship with Stripe or Paypal when you use their services. When you embed FB/Twitter/... content there's no such relationship, that's the issue.

OK bad examples, but any open source project you use via a package manager in your projects you have to trust and there's no contract or relationship there.

Re: Twitter is using its embedded JavaScript to hide tweets that have been deleted

#84

Isn't this the way the internet is supposed to work? If I link to a page and the page is removed, it'll not show, right? Same thing if I were to add that page as an iframe on my site. So, IMHO, the title and the post doesn't make any sense. Twitter isn't editing anyone's site. You have chosen to embed some content of Twitter on yours and it is perfectly fine if they chose to remove it.

> Isn't this the way the internet is supposed to work? If I link to a page and the page is removed, it'll not show, right? Same thing if I were to add that page as an iframe on my site.

But the link still will be on your site.

Re: Twitter is using its embedded JavaScript to hide tweets that have been deleted

#85
post #26

Functionality aside embedding random scripts from twitter seems like a big risk for security and privacy. At a minimum, it should probably be embedded in a sandboxed iframe. Just taking a screenshot, and linking to the tweet, seems like a more robust solution, that won't randomly stop working, and doesn't have the same privacy issues.

There should be an HTML tag or something that downloads and embeds HTML from a remote site without scripting

https://developer.mozilla.org/en-US/docs/Web/HTML/Element#em...

or already exist. maybe they would work?

Re: Twitter is using its embedded JavaScript to hide tweets that have been deleted

#86

Isn't this the way the internet is supposed to work? If I link to a page and the page is removed, it'll not show, right? Same thing if I were to add that page as an iframe on my site. So, IMHO, the title and the post doesn't make any sense. Twitter isn't editing anyone's site. You have chosen to embed some content of Twitter on yours and it is perfectly fine if they chose to remove it.

Right, but it was not added as an iframe, it was added with the actual content along with the script. So it's kind of like the iframe reaching out and deleting the surrounding conversation about that link once the page goes offline, if iframes could do such a thing.

Re: Twitter is using its embedded JavaScript to hide tweets that have been deleted

#87
post #26

Functionality aside embedding random scripts from twitter seems like a big risk for security and privacy. At a minimum, it should probably be embedded in a sandboxed iframe. Just taking a screenshot, and linking to the tweet, seems like a more robust solution, that won't randomly stop working, and doesn't have the same privacy issues.

There should be an HTML tag or something that downloads and embeds HTML from a remote site without scripting

That's exactly what an is.

Re: Twitter is using its embedded JavaScript to hide tweets that have been deleted

#88

I've never understood why people even wanted to use this. For the styling? So you can just copy some random stuff from Twitter and it looks like Twitter but is also interactive? Just with the Facebook like-Button, you're exposing your visitors to the tracking of Twitter. For what? Just so you can quickly copy one snippet and be done with it, instead of manually copying author name, content and link and spending 10 se…

Twitter has display requirements. https://developer.twitter.com/en/developer-terms/display-req...

What are they going to do if I show a tweet in my site without complying? Sue me? DoS me?

Re: Twitter is using its embedded JavaScript to hide tweets that have been deleted

#89

Functionality aside embedding random scripts from twitter seems like a big risk for security and privacy. At a minimum, it should probably be embedded in a sandboxed iframe. Just taking a screenshot, and linking to the tweet, seems like a more robust solution, that won't randomly stop working, and doesn't have the same privacy issues.

> Just taking a screenshot, and linking to the tweet, seems like a more robust solution, that won't randomly stop working, and doesn't have the same privacy issues. And have none accessibility.

You can include a copy of the text along with a screenshot, or put it in alt text…

Re: Twitter is using its embedded JavaScript to hide tweets that have been deleted

#90

I've never understood why people even wanted to use this. For the styling? So you can just copy some random stuff from Twitter and it looks like Twitter but is also interactive? Just with the Facebook like-Button, you're exposing your visitors to the tracking of Twitter. For what? Just so you can quickly copy one snippet and be done with it, instead of manually copying author name, content and link and spending 10 se…

> For what? Just so you can quickly copy one snippet and be done with it, instead of manually copying author name, content and link and spending 10 seconds to format this yourself.

Unfortunately copyright law is not going to be happy with that one. [0] It's insanely complicated, but basically, as things are at the moment, the original poster has a right to retract the publication at any time. You may find yourself in legal hot water if your copy doesn't disappear at the same time as the original.

[0] https://australiacouncil.gov.au/workspace/uploads/files/soci...

Post reply on HN