Greasy Fork

来自缓存

Greasy Fork is available in English.

ChatGPT Remove UTM Source from links (clean URLs)

Removes ?utm_source=chatgpt.com from URLs on OpenAI and ChatGPT domains

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
ezzdev
日安装量
0
总安装量
23
评分
0 0 0
版本
1.0
创建于
2025-10-23
更新于
2025-10-23
大小
2.1 KB
许可证
MIT
适用于

ChatGPT Remove UTM Source from links (clean URLs)

Description

This script automatically removes the ?utm_source=chatgpt.com tracking parameter from links on ChatGPT and OpenAI domains. This ensures that any external link you click, copy, or share is clean and free of this specific UTM tracker, giving you shorter and cleaner URLs.


Features

  • Address Bar Cleaning: Instantly removes the utm_source parameter from the current page's URL in your address bar (using history.replaceState to avoid a page reload).
  • Click Interception: Cleans links right as you click them, so you are always taken to the clean URL.
  • Dynamic Content Support: Uses a MutationObserver to automatically find and clean new links that are added to the page dynamically (e.g., inside new chat responses).
  • Lightweight & Fast: Runs at document-start and has no external dependencies, ensuring minimal performance impact.

How to Use

  1. Install the script using a userscript manager (see below).
  2. Browse chatgpt.com or openai.com as you normally would.
  3. The script works automatically in the background. There is no configuration needed. Any link you click or copy will be clean.

Compatibility

This script is designed to work on all pages within the following domains:

It is compatible with any modern browser that supports a userscript manager, such as:


Installation

  1. Make sure you have a userscript manager (like Tampermonkey or Violentmonkey) installed in your browser.
  2. Click the "Install this script" button on this Greasy Fork page.
  3. Your userscript manager will show a confirmation screen. Click "Install" to add the script.

Changelog

  • v1.0
    • Initial release.
    • Cleans utm_source from links on click, on page load, and in dynamic content.
    • Cleans the browser's address bar URL on load.