ChatGPT Export Markdown

Exports ChatGPT chat messages to Markdown with automatic extraction of all grouped citation URLs (+N). Unlike alternatives, reliably expands and exports every source link from grouped references.

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
zayac_volk
Dnevne instalacije
0
Ukupnih instalacija
4
Ocjene
0 0 0
Verzija
4.9.5
Stvoreno
03.11.2025.
Ažurirano
29.11.2025.
Size
45 KB
Licenza
MIT
Primjenjuje se

English description

A script for exporting selected messages from ChatGPT chat to Markdown (UTF-8) format.

Key Features:

  • Extraction of grouped links: The main distinction from similar scripts is its ability to automatically expand and reliably extract all links from grouped citations (displayed as URL+X). The script emulates user actions to collect every source.
  • Complete list of links: Links are inserted both directly into the text at the grouping location (in the format [source] (url1) (url2)) and as a general numbered list ("Links:") at the bottom of each message.
  • URL cleanup: Automatically removes common tracking parameters (refs) from links.
  • Message order: Strictly preserves the order of messages as they appear on the page, independent of the selection order.
  • Formatting: Uses #User_question (N) and #GPT_answer (N) headings to structure the dialogue.

Interface:

The script adds checkboxes to each chat message and a minimalist control panel at the bottom right with two buttons: Select all and Export MD.

  1. Select all: Works as a toggle (All/None).
    • First click selects all loaded messages (text changes to "Select all (off)").
    • Second click deselects all messages (text changes back to "Select all").
  2. Export MD: Starts the link extraction process and saves selected messages to a .md file.

Tested in Opera/Chrome. Created for personal use, but may be useful to others as well.

Описание на русском

ChatGPT Export Markdown

Скрипт для экспорта выделенных сообщений из чата ChatGPT в формат Markdown (UTF-8).

Ключевые особенности:

  • Извлечение сгруппированных ссылок: Главное отличие от аналогов - способность автоматически раскрывать и надежно извлекать все ссылки из сгруппированных цитат (отображаемых как URL+X). Скрипт эмулирует действия пользователя для сбора всех источников.
  • Полный список ссылок: Ссылки вставляются как непосредственно в текст на месте группировки (в формате [источник] (url1) (url2)), так и в общем нумерованном списке Links: внизу каждого сообщения.
  • Очистка URL: Автоматически удаляет распространенные tracking-параметры (refs) из ссылок.
  • Порядок сообщений: Сохраняет сообщения строго в порядке их расположения на странице, независимо от порядка выделения пользователем.
  • Форматирование: Использует заголовки #User_question (N) и #GPT_answer (N) для структурирования диалога.

Интерфейс:

Скрипт добавляет чекбоксы к каждому сообщению в чате и минималистичную панель управления справа снизу с двумя кнопками: Select all и Export MD.

  1. Select all: Работает как переключатель (Все/Ничего).
    • Первое нажатие выделяет все загруженные сообщения (текст меняется на Select all (off)).
    • Второе нажатие снимает все выделения (текст меняется на Select all).
  2. Export MD: Запускает процесс извлечения ссылок и сохраняет выделенные сообщения в .md файл.

Тестировалось в Opera/Chrome. Сделано для себя, может кому пригодится.