Greasy Fork

来自缓存

Greasy Fork is available in English.

Twitter / X — 媒体复制与下载

在每条推文新增媒体与链接按钮,提供一键复制网址及下载媒体的功能。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
Star_tanuki07
日安装量
8
总安装量
309
评分
2 0 0
版本
2.0.3
创建于
2026-03-12
更新于
2026-05-03
大小
342.6 KB
许可证
MIT
适用于

✨ Copy, Preview, and Download Tweet Media Without Leaving Your Feed

Version License Greasy Fork

📍 Author: GitHub | Script: Repository

Hide image Image

Adds two buttons to every tweet's action bar — one for media, one for the tweet link — each with click, long-press, and right-click behaviours.


💡 Overview After installation, a 🎞️ Media Button and a 🔗 Link Button appear on every tweet. The media button lets you copy image and video URLs, preview them inline, or download them with structured filenames. The link button copies the tweet URL in either its native form or a third-party embed-friendly format. A floating Download History Panel tracks every file you have saved, with group-based organisation, search, and export. A lightweight settings panel, accessible by hovering the top-right corner of the page, centralises all configuration without requiring the userscript manager menu.


🎛 Toolbar Controls

After installation, two buttons are appended to the right side of every tweet's action row, alongside the native reply, retweet, and like buttons. A history tracker and settings panel are accessible from the top-right corner of any page.

Icon Feature Name Where It Appears
🎞️ Media Button Tweet action bar — rightmost position
🔗 Link Button Tweet action bar — second from right
📋 History Panel Top-right corner of the page (appears after first download)
⚙️ Settings Panel Top-right corner of the page (hover to reveal)

🚀 Core Features

🎞️ Media Button

Handles image and video URLs attached to any tweet.

Left-click — Copy all media URLs to the clipboard as plain text, one per line.

Left-click and hold (0.5 s) — Copy media URLs with your configured prefix prepended in Markdown link format.

/* Output format when prefix is set:
   [prefix](https://pbs.twimg.com/.../photo.jpg)
   [prefix](https://video.twimg.com/.../video.mp4) */

Middle-click — Open an inline preview:

  • Videos open in a floating player with volume memory, keyboard navigation (← → ↑ ↓), and an Escape key shortcut to close.
  • Images open in a card-style lightbox with a fan layout, dot pagination, and click-to-focus navigation between multiple photos.

Right-click — Download all media files directly to your device. A circular progress indicator appears on the button during the download. Files are saved with the following structured filename:

/* [twitter] DisplayName(@screenname)_YYYY.MM.DD_tweettext_tweetID_1.jpg
   Example: [twitter] Jane(@janedoe)_2026.04.09_Hello world_1234567890_1.jpg */

If one or more files fail to download, the button displays a warning with a partial success count (e.g., ⚠️ 2/3).


🔗 Link Button

Handles the tweet URL, with configurable domain output.

Click — Copy the tweet URL. By default this uses x.com. You can optionally configure a custom domain (such as fixupx.com or vxtwitter.com) for single-click output via the settings panel.

Click and hold (0.5 s) — Copy the tweet URL using the Long-Press Domain, with your configured prefix prepended in Markdown link format. The long-press domain is configured separately from the single-click domain.

Available domains for both behaviours:

  • vxtwitter.com
  • fixupx.com
  • fxtwitter.com
  • cunnyx.com
  • fixvx.com
  • twitter.com
  • x.com

⬇️ Download History Panel

Tracks every file you have downloaded, up to 300 records.

  • Open by clicking the 📋 button in the top-right corner, or from the History section in the Settings Panel.
  • Views — Switch between a compact list view and a thumbnail grid. Clicking any thumbnail opens a full-size zoom overlay.
  • Search — Filter records by display name, screen name, tweet text, or date directly from the search bar.
  • Undo — Accidentally deleted a record? An undo option appears briefly after deletion.
  • Export — Save the full history as a CSV or JSON file for external use.
  • Badge — Once a tweet has been downloaded, the 🎞️ button on that tweet receives a small indicator so you can see at a glance which tweets are already in your history.

When a download completes, a brief animation flies from the 🎞️ button toward the 📋 button to confirm the record was saved.


⭐ Groups

Organise downloaded media into named groups — useful for sorting by project, topic, or date range.

  • Enabling — Turn on Group on Download in the Settings Panel (⭐ Groups section). After each download completes, a ⭐ button briefly appears near the 🎞️ button.
  • Assigning — Click ⭐ to open a fan-style group picker. Select a group to tag the download record. If no groups exist yet, the picker prompts you to create one.
  • Managing — Open the group manager from the Settings Panel or by middle-clicking the ⭐ button. You can create, rename, choose an icon, set a glow colour, adjust label colour, and delete groups.
  • Filtering in History — Groups appear as tabs at the top of the History Panel. Click a tab to show only records from that group.

🌐 Third-Party Services & Dependencies

This script generates URLs using the following domains when configured as the single-click or long-press link target. The script itself does not contact these services — it only constructs URLs that you copy to your clipboard.

Domain Type Notes
vxtwitter.com Third-party embed converter Enables richer Twitter embeds in other platforms
fixupx.com Third-party embed converter Alternative embed fixer
fxtwitter.com Third-party embed converter Alternative embed fixer
cunnyx.com Third-party embed converter Alternative embed fixer
fixvx.com Third-party embed converter Alternative embed fixer
twitter.com / x.com Official Native tweet URLs

⚠️ The third-party domains listed above have no affiliation with this script. Review their terms and privacy policies before using them.

💡 Media download contacts Twitter's own content delivery network to fetch files you have already viewed on the timeline — no credentials are sent to any service outside of Twitter/X.


⚠️ Known Limitations

Known Constraints

  • History capacity — The History Panel stores up to 300 records. When the limit is reached, the oldest unfavourited entries are removed first. Records you have marked as favourites are retained even beyond this cap.
  • Media download fallback — When the primary download channel is blocked by the browser's security policy, the script automatically retries using an alternative method. Most downloads still complete; a partial-success warning (e.g. ⚠️ 2/3) appears if any file fails under both methods.
  • Embedded "From @user" videos on the timeline — Tweets that display another account's video under an attribution label (using a /i/status/ card format instead of a standard status URL) cannot always be extracted when viewed in the feed. An API-based fallback resolves this in many cases, but it remains unreliable in the timeline view. Opening the individual tweet page resolves this consistently.

Known Conflicts

Situation Impact Recommended Action
Strict Content Security Policy on some pages Media download may fall back to the secondary method Navigate directly to twitter.com or x.com rather than embedded views

⚙️ Additional Features

Settings Panel

Hover the top-right corner of any twitter.com or x.com page to reveal the ⚙️ button. Click it to open the panel. Changes take effect immediately without a page reload, except for language changes (which require a reload to apply).

🔗 Link section

  • Single-click domain — Set the domain used when clicking 🔗. Click the same row again to toggle back to x.com.
  • Long-press domain — Set the domain used during a long-press on 🔗. Configured independently from the single-click domain.
  • Prefix — Set the text prepended to media and link URLs during long-press gestures. Defaults to [text].

🎞 Media section

  • Date format — Toggle between Asian (YYYY.MM.DD) and Western (DD.MM.YYYY) formats used in downloaded filenames.
  • Feedback style — Choose how the script signals completion: Toast (brief popup message), Icon Only (button icon changes briefly), or Silent (no visual feedback).

⭐ Groups section

  • Group on Download — Master toggle. When enabled, a ⭐ button appears after each download to let you assign it to a group.
  • Glow colour — Set a custom highlight colour for the group fan menu, using a colour picker or preset swatches.
  • Label colour — Set the text colour used for group labels in the fan menu.

🗂 History Panel section

  • Open History — Launch the History Panel directly from settings.
  • Dock style — Choose the visual style of the docked edge tab: Ruler (subtle glowing bar), Ghost (faint line), or Notch (corner slot).
  • Hover delay — Adjust how long (in milliseconds) you must hover over the docked tab before the panel expands.
  • Trigger distance — Set how close (in pixels) to the screen edge the mouse must be to activate the dock hover zone, independently for left and right sides.
  • Persist dock across pages — When enabled, the History Panel remembers its docked position and automatically restores it after navigating to a new page.

All settings are also accessible from the userscript manager's menu (e.g., Tampermonkey, Violentmonkey).


History Panel — Dock & Hide

The History Panel can be docked to either the left or right edge of the screen, collapsing into a thin tab when not in use.

  • Drag the panel to either side until it snaps into dock mode.
  • Once docked, hover over the tab to expand the panel after the configured delay.
  • Long-press the docked tab for 2 seconds to force-undock and return the panel to free-floating mode.
  • Dock position is preserved across pages when Persist dock across pages is enabled in settings.

🌐 Language Support

Nine languages are built in: English, 繁體中文, 简体中文, 日本語, 한국어, Español, Português (BR), Français, Русский.

A Custom Language option is available via the Language panel:

  1. Click Export Template to download a pre-filled JSON file with all UI strings in English.
  2. Translate the values in the file. Keys, placeholders such as {lang}, HTML tags, and emoji must be left unchanged.
  3. Click Import Translation and select the edited file.
  4. Reload the page to apply.

A loaded custom language can be cleared at any time from the same panel, reverting the UI to English.

Due to increasing maintenance costs, official translations are currently maintained up to Russian. Additional languages may be added based on user demand.


First-Run Guide

On the first launch after installation, a brief spotlight overlay highlights the Settings Panel entry point and explains the primary controls. The guide appears only once and can be re-triggered at any time from the Help section inside the Settings Panel.


🔐 Security & Privacy Notice

⚠️ This script reads session data from your active Twitter / X session to enable a fallback method — used only when the standard approach cannot retrieve video URLs from the timeline.

Data Type Source Purpose Storage Transmitted To
Anti-forgery token Read from your browser's active Twitter / X session Verify that requests originate from your own session when retrieving embedded video URLs Never stored by the script Twitter / X only
Session identifier Read from your browser's active Twitter / X session Identify your session when the standard video extraction method fails Never stored by the script Twitter / X only
Download history Generated by the script on each download Show past downloads in the History Panel Saved locally on your device via the userscript manager Not transmitted
Groups configuration Created by you in the Settings Panel Organise history records into named groups Saved locally on your device via the userscript manager Not transmitted

This script does not collect, share, or transmit your credentials to any server outside of Twitter / X.

💡 Cookie access only occurs when the standard video extraction method fails — it is an automatic internal fallback, not an opt-in feature. No passwords, direct message content, or account credentials are read or stored at any point. Reviewing the source code before installation is always recommended.


  • This userscript is primarily maintained on Greasy Fork.
  • Built with AI assistance by a hobbyist developer. Bug fixes and updates may not be immediate.
  • Feedback is welcome. Responses may be assisted by translation tools if needed.