Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lidel opened this issue Jan 22, 2023 · 1 comment
Open

Comments

@lidel
Copy link

lidel commented Jan 22, 2023

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
Copy link

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 <iframe> most likely unless its on a subdomain..

This is indeed one limitation of the current system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants