Skip to content

feat: add inline download buttons to X video posts in browser extension - #143

Merged
vanloctech merged 1 commit into
vanloctech:mainfrom
nguyenphutrong:feat/x-inline-download-buttons
Nov 13, 2026
Merged

vanloctech merged 1 commit into
vanloctech:mainfrom
nguyenphutrong:feat/x-inline-download-buttons

Conversation

@nguyenphutrong

Copy link
Copy Markdown
Contributor

Summary

On X/Twitter, the browser extension now adds a Download button to the action bar of every post with a video, right before Bookmark. It replaces the fixed floating widget on X.

  • Each button sends its own post's /status/ URL (download_now, video, best), so pages with several videos download each one separately.
  • A MutationObserver adds buttons to posts that load while scrolling.
  • Video posts are detected before playback too: by videoPlayer/videoComponent, the playButton, or a *_video_thumb thumbnail (videos and GIFs). Image-only posts get no button.
  • Clicks don't open the post behind the button, and untrusted (synthetic) clicks are ignored.
  • The popup's existing "Floating button" on/off toggle also turns the X buttons on and off.
  • Changelog entries are added to CHANGELOG.md, docs/CHANGELOG.vi.md, and docs/CHANGELOG.zh-CN.md.

Testing

  • Tested by hand on x.com with the packaged Chromium build.
  • Loaded the built extension in Chromium against a mock page that copies X's tweet DOM. Checked: a button appears on played, unplayed, bookmarked, quoted, and late-loaded video posts and on GIFs; none appears on an image-only post; each click opens the correct youwee://download?...url=https://x.com/<user>/status/<id>... link.
  • biome check ., tsc -b, and bun run ext:build pass. cargo check was not run because no Rust files changed.

Notes

For a post that quotes a video, the button sends the outer post's URL and relies on yt-dlp to resolve the quoted media from it. This case is not verified yet.

2026-11-13 at 10 26 02@2x

@vanloctech
vanloctech merged commit ffe9c6d into vanloctech:main Nov 13, 2026
3 checks passed
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.

2 participants