Skip to content

A simple Chrome extension that allows you to copy the unique URL of reposts (retweets) on X.com via the context menu.

License

Notifications You must be signed in to change notification settings

PietroMk3/Repost-URL-Extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repost URL Extractor

日本語版 README はこちらです。

A Chrome extension that allows you to easily copy the unique URL of a repost (formerly retweet) on X.com (formerly Twitter).

Overview

Normally, it is difficult to obtain the unique URL of a repost through the standard UI.
With this extension, you can copy it directly to the clipboard from the context menu item “Copy URL of this repost”.

Example:
https://x.com/{username_of_the_user_who_reposted}/status/{repost_id}

Installation

This extension must be installed in Developer Mode.

Steps

  1. Enable Developer Mode

    • Open Chrome and go to chrome://extensions/
    • Toggle “Developer mode” on in the top-right corner
  2. Load the extension

    • Click “Load unpacked”
    • Select the folder containing this extension
    • Confirm that “Repost URL Extractor” appears in the extension list
  3. Check permissions

    • Allow clipboard access if prompted

Usage

Basic operation

  1. Open X.com

    • Works on the home timeline, profile pages, search results, etc.
  2. Right-click a repost

    • Right-click on the repost you want to copy
  3. Copy from the menu

    • Select “Copy URL of this repost”
    • The URL will be copied to your clipboard

Supported pages

  • Home timeline (x.com/home)
  • User profile (x.com/{username})
  • Search results (x.com/search)
  • Lists (x.com/i/lists/)
  • Tweet detail pages

Troubleshooting

Copy fails

Symptom: Right-clicking does not copy to the clipboard

Solutions:

  1. Check browser settings

    • Chrome → Settings → Privacy & Security → Site settings → Additional content settings → Clipboard
    • Enable “Allow sites to read and write to the clipboard”
  2. Check site-specific permissions

    • Click the padlock (🔒) icon in the address bar → Select “Site settings”
    • Set “Clipboard” to “Allow”
  3. Reload the page after changing settings


Menu item does not appear

Symptom: “Copy URL of this repost” does not appear

Solutions:

  • Check if the extension is enabled at chrome://extensions/
  • Reload the page

URL extraction fails

Symptom: Error message such as “This does not appear to be a repost”

Solutions:

  • Reload the page and try again later
  • Right-click again after a short wait
  • Try another repost

System Requirements

Supported environments

  • Browsers: Google Chrome 88+, Microsoft Edge 88+
  • Other Chromium-based browsers: not tested
  • Sites: x.com, twitter.com (including redirects)

Required permissions

  • Clipboard: For copying URLs
  • Context menus: For adding right-click menu options
  • x.com / twitter.com: To run on the target sites

Privacy

Data Handling

This extension is designed with the following privacy principles:

  • No external transmission: All processing is done locally in your browser
  • Temporary data only: Repost URLs are stored in memory only for as long as needed
  • No persistence: Data is automatically cleared when the browser is closed
  • Least privilege: Only the minimum required permissions are requested

Limitations

Technical limitations

  • Dependency on X.com: The extension relies on X.com’s internal structure and APIs, and may stop working if specifications change.
  • Repost detection: Only the following conditions can be detected:
    • Tweets that display “User X reposted”
    • Tweets identified by X.com’s API as retweets (RT @...)
  • Real-time behavior: Detection may take a short time immediately after a page is loaded

URL formats copied

  • When the reposting user’s username is known: https://x.com/{username}/status/{id}
  • When the username is unknown: https://x.com/i/status/{id}

Technical Details

Architecture

  • Manifest Version: 3
  • Structure: Content Script + Page Script pattern
  • API monitoring: Intercepts fetch / XMLHttpRequest
  • Data extraction: Parses internal X.com API responses

How it works

  1. Monitors API requests in the page
  2. Parses response data containing repost info
  3. Extracts repost ID and user info, caches them
  4. On right-click, generates and copies the URL

License

Released under the MIT License. See the LICENSE file for details.

About

A simple Chrome extension that allows you to copy the unique URL of reposts (retweets) on X.com via the context menu.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published