🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

ChatGPT | TOC

Backend navigation with dynamic resizing, distinct icons, and bold-header support.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Autor
piknockyou
Denně instalací
1
Celkem instalací
12
Hodnocení
0 0 0
Verze
2.6
Vytvořeno
01. 12. 2025
Aktualizováno
01. 12. 2025
Size
16,7 KB
Licence
MIT
Spustit na

ChatGPT Backend TOC

A lightweight Userscript that adds a collapsible Table of Contents sidebar to ChatGPT.

🚀 Why this script?

Most navigation extensions try to read the headers from the current webpage HTML. However, ChatGPT uses "lazy loading" (virtualization), meaning messages scroll off-screen are often removed from the code to save memory. This causes other extensions to "lose" parts of the conversation.

This script is different. It fetches the conversation data directly from ChatGPT's internal Backend API. This means:

  • It loads the entire conversation map instantly.
  • It never misses a header, even in extremely long chats.
  • It forces the browser to jump to the correct message ID, triggering the render on demand.

✨ Features

  • 100% Complete: Navigates the full history, not just what is currently visible.
  • Deep Navigation: Detects Markdown headers (#) and Bold Text as clickable sub-sections.
  • Smart Scrolling: Calculates the correct scroll position so text doesn't hide behind the top header bar.
  • Clean UI:
    • Resizable sidebar (drag the edge).
    • Distinct icons for User (Gray) vs. AI (Green).
    • Expand/Collapse arrows for nested content.
    • Long titles auto-expand when you widen the sidebar.

Credits

Heavily inspired by the Scroll Extension by Asker Kurtelli. This version was ported to a Userscript to utilize direct API fetching and reduce the need for a full browser extension.