Skip to content
p0n1Public

About

X Fun - Clean X/Twitter and Youtube List Viewer (For Kids and Others)

Resources

Stars

4 stars

Watchers

1 watching

Forks

Repository files navigation

X Fun - Clean X/Twitter and YouTube Viewer

The Story

As a parent, I often discover fascinating posts on X (formerly Twitter) that I bookmark to share with my child. However, sharing these posts through my phone presents a challenge: the X app is cluttered with distracting content and interface elements that detract from the core content I want to share.

This led me to create a dedicated X/Twitter List Viewer. Instead of navigating the busy X interface, I can now curate interesting posts by collecting their URLs in a simple text file, then display them through this clean, focused website. The result is a distraction-free viewing experience that's actually better than browsing X.com directly — perfect for sharing educational, entertaining, or inspiring content with children without the noise of a full social media platform.

You can also join the discussion about this project on reddit.

Features

  • Clean Interface: Displays X/Twitter posts and YouTube videos without distracting elements
  • Multi-platform Support: Handles content from both X/Twitter and YouTube.
  • Multi-format Support: Handles text, images, videos, and mixed content from X/Twitter.
  • Responsive Design: Works seamlessly on mobile and desktop devices
  • Direct Media Playback: Videos play directly without redirects to X.com or YouTube.
  • Expandable Images: Click any photo to view it full-size
  • URL Flexibility: Supports twitter.com, x.com, and youtube.com URLs.
  • Kid-friendly: Designed for young viewers, fostering curiosity without distractions
  • Progressive Web App (PWA): Install as an app on your device for native-like experience
  • Offline Support: View previously loaded posts even without internet connection
  • Self-hosting Friendly: Easy to deploy on your own server or hosting platform
  • Privacy-focused: All requests are sent from your browser — the hosting server never sees your lists

How to Use

Quick Start

  1. Visit xfun.p0n1.xyz and try the default demo posts
  2. Click "Try Examples" to explore curated demo lists

Custom Lists

  1. Create a plain text file with X/Twitter or YouTube URLs (one per line)
  2. Upload to a publicly accessible location:
    • GitHub: Create public repo → Upload .txt file → Copy raw URL
    • GitHub Gist: Create public gist → Copy raw URL
    • Pastebin: Create public paste → Use paste URL if needed, but treat it as best-effort
  3. Click the "Custom List" button on the website
  4. Paste your URL and click "Load List"

Troubleshooting CORS Issues

Some hosting services may block cross-origin requests (CORS). If your list fails to load:

  1. Test CORS support at cors-test.codehappy.dev with your URL
  2. Use GitHub Raw URLs or public Gists (recommended) — they are the most reliable and support offline reuse
  3. Pastebin URLs are handled through public proxy bridges on a best-effort basis, so availability can vary

Pastebin requests try Hexlet AllOrigins, cors.dev, then Codetabs in order. Each response must contain supported links before it is accepted. The bridges require no API key; requests are sent from the browser without credentials and are not cached by the service worker. Each attempt has an 8-second timeout, except cors.dev (15 seconds for slower upstream reads).

If all bridges fail, use Open original list, copy the raw text, and import it with Paste list contents in the error panel. This reads the links locally in your browser and bypasses the list proxies; the imported list lasts for the current session only. For a shareable list that loads without public proxies, use GitHub Raw or a public Gist.

Supported URL Formats

The viewer supports both X/Twitter and YouTube URLs.

X/Twitter URLs

https://x.com/username/status/1234567890
https://twitter.com/username/status/1234567890 # Comments are allowed after URLs
https://x.com/SpaceX/status/1949680387330027593
https://x.com/SpaceX/status/1949993416604951017 #starship
https://x.com/SpaceX/status/1949605880863047750 #falcon9

The viewer automatically handles both twitter.com and x.com URLs and fetches content using the FxEmbed API.

YouTube URLs

https://www.youtube.com/watch?v=AZ7AcvbebKo
https://youtu.be/2R8V68viXqk # Comments are also allowed

Local Development

To run the project locally:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

Validation

npm test
npm run lint
npm run build

The regression tests use Node's built-in test runner and mocked requests. They cover list parsing and deduplication, nested list URLs, request cancellation and body timeouts, proxy fallback, and FxEmbed media handling. No test API keys or extra test dependencies are required.

Dependency compatibility: ESLint stays on 9.x while the React, import, and accessibility plugins declare support only through 9.x. Node types target the Node 24 development runtime. The override scoped to @serwist/next replaces the Browserslist pinned by Serwist 9.5.12 with 4.28.7 to fix GHSA-c83g-rgw3-j3cx and GHSA-73wf-gq98-2v4g; reassess it when updating Serwist.

Technical Details

  • Framework: Built with Next.js for optimal performance
  • PWA: Progressive Web App support with Serwist for offline functionality and app installation
  • API: Uses FxEmbed API for X/Twitter content — no API keys required
  • Styling: System font stack for consistent, fast-loading typography
  • Architecture: Client-side only (server serves static files for simplicity)
  • Offline list caching: Direct-CORS list sources such as GitHub Raw and public Gists can be reused offline; proxied Pastebin loads are best-effort and online-only
  • Self-hosting: Can be easily deployed to any static hosting service (Vercel, Netlify, GitHub Pages, etc.)

About

X Fun - Clean X/Twitter and Youtube List Viewer (For Kids and Others)

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages