JusticeEngineering / pin-tweet-to-ipfs

Web extension to Save tweets in a verifiable way to IPFS
MIT License
29 stars 4 forks source link

Provide reliable HTML snippet for embedding in blogs and news articles #126

Open lidel opened 1 year ago

lidel commented 1 year ago

Problem

News articles, blogposts, and mirrors still hotlink twitter posts. They are loaded dynamically and if twitter.com removes/censors them, all the context is lost.

Example

with JS fetched from twitter.com without JS from twitter.com
threadreaderapp com_thread_1615748869723394049 html (1) Screenshot 2023-01-22 at 18-59-59 Thread by @kyliebytes on Thread Reader App

Proposed Solution

Extend user interface displayed to the user after "Tweet is Pinned!":

2023-01-22-190946_731x444_scrot

In addition to the already present shareable link to content on gateway, have HTML with <script> or <iframe> that can be copied and pasted to embedd mirrored tweet.

Technical challenges

Note that this may be technically tricky to pull off, since Service Worker used by Webrecorder may not work in cross-origin <iframe>, but could be done with <script>. <script> could be made robust, retrywith a public gateway if default gateway is down, fetch content as CAR and verify it before rendering etc.

ikreymer commented 1 year ago

Yes, unfortunately, due to the service-worker based nature of the replay, there's not a guaranteed HTML snippet that someone can add, without also hosting a local service worker that imports from the gateway locally. We could still show all of that, its just one more step than just a snippet, currently.

Embedding an iframe will also not work, as service workers are now being blocked on third party iframes along with third party cookies (Chrome doesn't have it on by default by FF and Safari do). As a result, the service worker won't load in an