A tiny and focused UserScript (for Violentmonkey/Tampermonkey) that converts eBay product-page links under /p/... that contain an ?iid= parameter into canonical item links under /itm/.... It preserves your current regional eBay domain (like .com, .de, .co.uk) and runs at document-start to avoid loading the heavier product page.
- Automatically redirects from product pages like
/p/…?iid=123456789012to/itm/123456789012 - Preserves protocol and regional domain (e.g.,
https://www.ebay.deremainshttps://www.ebay.de) - Validates the
iidparameter to avoid bad redirects - Uses
location.replaceso your browser history won’t be cluttered - Runs at
document-startfor instant effect
Option A — One‑click via raw URL (recommended)
- Install Violentmonkey (recommended) or Tampermonkey.
- Open this raw install/update URL in your browser and confirm the installation: https://raw.githubusercontent.com/IceCuBear/EBayLinkCleaner/refs/heads/main/EBayLinkCleaner.user.js
Option B — Manual
- Install Violentmonkey or Tampermonkey.
- Create a new userscript and paste the contents of
EBayLinkCleaner.user.js. - Save and enable the script.
Just browse eBay as usual. When you land on a product page under /p/... that includes an ?iid= parameter, the script will immediately redirect you to the direct item URL under /itm/<iid> while keeping your current regional eBay domain.
Examples:
https://www.ebay.com/p/11223344?iid=112233445566→https://www.ebay.com/itm/112233445566https://www.ebay.de/p/11223344?iid=112233445566→https://www.ebay.de/itm/112233445566
- The script performs a simple sanity check on the
iid(digits only, reasonable length). If the parameter is missing or invalid, no redirect occurs. - Redirection uses
window.location.replace(...)to avoid leaving the/p/URL in your back‑history. - The script is intentionally minimal — no storage, no UI, no grants.
Licensed under the GNU AGPLv3.
You are free to use, modify, and share this software under the terms of the AGPLv3. If you run a modified version as a network service, the AGPL requires that you make your modified source code available to users interacting with that service. Contributions and pull requests are welcome.