ChatGPT Markdown Export

导出 ChatGPT 对话为 Markdown,支持代码块、列表、表格等格式化

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Autor
kiracle
Dnevne instalacije
0
Ukupnih instalacija
0
Ocjene
0 0 0
Verzija
4.0
Stvoreno
26.03.2026.
Ažurirano
26.03.2026.
Size
5,21 KB
Licenza
MIT
Primjenjuje se

ChatGPT Markdown Export

ChatGPT 对话导出工具
将你在 ChatGPT 的对话快速导出为 Markdown (.md) 文件,支持代码块、表格、列表、引用、图片、链接等格式化内容,排版干净、阅读体验佳。适用于 Tampermonkey / Greasemonkey。


功能特色

  • 📝 Markdown 导出:自动将对话整理为 Markdown 文件
  • 🤖 区分角色:用户消息与 ChatGPT 回复清晰分区
  • 💻 代码块保留:支持多语言代码块导出
  • 📊 表格 & 列表:保持原有格式,方便阅读
  • 🔗 链接 & 图片:自动保留 URL 和图片
  • 📐 格式优化:消除多余空行,阅读更舒适
  • 📅 时间戳:文件名和内容中包含导出时间
  • 🔄 自动更新 UI:页面变化不会影响按钮显示

安装说明

  1. 安装 TampermonkeyGreasemonkey
  2. 点击安装脚本:
  3. 安装完成后刷新 ChatGPT 页面

使用方法

  1. 打开 ChatGPT 页面
  2. 页面右上角或导航栏会显示 MD 按钮
  3. 点击 MD 按钮 即可将当前对话导出为 Markdown 文件
  4. 文件名格式:对话标题-YYYY-MM-DDTHH-MM-SS.md
  5. 导出后可直接在 Obsidian、VS Code、GitHub 等工具中打开

注意事项

  • 仅导出当前页面加载的对话,未加载的新消息需滚动加载后再导出
  • 支持最新 ChatGPT Web 版本,若页面结构更新,脚本可能需要更新
  • 对话中包含图片或公式时,Markdown 会保留引用链接,不包含实际图片文件

更新日志示例

v4.0 (2026-03-27)
- 最终优化版
- 空行压缩,列表紧凑
- 保留代码块语言、表格、引用、图片
- 自动时间戳与文件名

v3.0 (2026-03-15)
- Markdown 格式化增强
- 支持代码块、表格和列表
- 自动生成对话标题作为文件名

v2.0 (2026-03-01)
- 修复空文件问题
- 适配新版 ChatGPT DOM