Collapse ChatGPT Code Blocks (robust)

Collapse/expand user & assistant code blocks on chat.openai.com/chatgpt.com

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 or Violentmonkey 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!)

Author
Chef D
Daily installs
0
Total installs
1
Ratings
0 0 0
Version
1.2.1
Created
2025-09-24
Updated
2025-09-24
Size
14.6 KB
License
MIT
Applies to

🚀 Collapse ChatGPT Code Blocks

Automatically collapse code blocks in ChatGPT and user messages! Show/hide code with a click, and copy code instantly. Works on chat.openai.com and chatgpt.com — perfect for developers!

✨ Features

  • 🔽 Collapse all code blocks by default
  • 👁️ Toggle to show/hide code easily
  • 📋 Copy user code blocks with one click
  • 🟢 Simple, clean, works automatically

🛠️ How to use

  1. Install Tampermonkey extension.
  2. Add this userscript.
  3. Reload your ChatGPT page and enjoy!



Keywords:
chatgpt, code block, collapse, toggle, hide, show, copy, userscript, tampermonkey, developer, chat.openai.com, chatgpt.com , greasyfork