Skip to content

feat: Implement Twitter embed functionality #4

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

myjeong19
Copy link
Member

Overview

The tweet.ts file implements functionality to embed Twitter/X tweets into a web application. It handles the detection of Twitter URLs, extraction of tweet IDs, and generation of embed HTML with dynamic theming based on the user's system preferences.

Key Features

  • Twitter URL Detection: Identifies if a given URL is from Twitter or X.com.
  • Tweet ID Extraction: Extracts the tweet ID from the URL for embedding.
  • Dynamic Theming: Automatically adjusts the theme of the embed (light or dark) based on the user's system settings.
  • Responsive Embed: Generates an iframe with specified dimensions and attributes for embedding tweets.
  • Error Handling: Provides error messages for failed operations, such as tweet ID extraction.

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

Successfully merging this pull request may close these issues.

1 participant