Claude Code Block Collapser v24

Collapse code blocks with symmetrical dual controls, download functionality, double-click toggle, and typing animation - Auto-copy disabled - Fixed event handler error

当前为 2025-11-08 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
carrot4522
评分
0 0 0
版本
24
创建于
2025-11-08
更新于
2025-11-08
大小
26.7 KB
许可证
GNU General Public License v3.0
适用于

Code Block Collapser for Claude.ai v24

📦 Claude Code Block Collapser - Tampermonkey Userscript

📋 Overview

Claude Code Block Collapser enhances code management on Claude.ai by transforming cluttered code blocks into clean, collapsible sections with dual symmetrical controls, ensuring a streamlined workspace while preserving full access to all code.

✨ Key Features

Feature Description
Collapsible Code Blocks Minimize code blocks to save screen space and reduce visual clutter
Symmetrical Dual Controls Copy, download, expand, and collapse buttons on both left and right sides
One-Click Copy & Download Copy to clipboard or save as .txt files with visual feedback
Double-Click Toggle Quickly expand/collapse by double-clicking headers or content
Typing Animation Visual gradient shows when Claude is actively generating code

🎯 Perfect Use Cases

  • Long Conversations - Focus on current responses while keeping earlier code accessible
  • Code Reviews - Systematically manage multiple code blocks from Claude
  • Multi-File Projects - Handle multiple files efficiently in one conversation

🚀 How It Works

Typing Detection System

🟡 Active Phase: Animated gradient header, buttons disabled until complete 🔴 Complete: Gray header, all controls active and ready to use

Smart Recognition

Detects code blocks 20+ characters, extracts language labels and script titles from comments, supports all major programming languages.

Workflow

Auto-detects new code → Auto-collapses when complete → Dual controls appear → Copy/download/expand with one click → Visual feedback confirms actions

💡 Benefits

Benefit Impact
Reduced Scrolling Save 60-80% vertical space in long conversations
Improved Focus Keep attention on current discussion
Faster Workflow Symmetrical controls accessible from either side
Safe Operations Typing detection prevents premature actions

🔧 Installation

  1. Install Tampermonkey browser extension
  2. Add Claude Code Block Collapser v24 userscript
  3. Visit https://claude.ai - script activates automatically
  4. Code blocks auto-collapse when Claude finishes typing

📝 Usage Tips

  • Double-click headers for fastest toggle
  • Wait for gray header before downloading
  • Access controls from either side
  • Download important code immediately

⚙️ Customization

Configurable settings include minimum code length (20 chars), typing check interval (300ms), auto-collapse delay (500ms), and double-click timing (300ms).

🎓 Why This Matters

Problem: Claude.ai conversations with multiple code blocks become overwhelming. Excessive scrolling, no temporary hiding, no quick downloads, visual clutter.

Solution: Intelligent code management that collapses blocks to save 60-80% space, enables one-click downloads, and uses typing detection to prevent interruptions.

🌟 Ideal For

Software developers, students learning to code, technical writers, code reviewers, data scientists, and DevOps engineers working with Claude.ai.

🔗 Additional Information

Detail Information
Compatible With Chrome, Firefox, Edge, Safari, Opera, Brave
Website Support claude.ai and .claude.ai/
Version v24 - Event handler fixes, auto-copy disabled
License GNU GPL v3.0

📞 Support & Feedback

Found a bug? Report it in the feedback section. Have a feature request? Let me know! Enjoying the script? Leave a review!

Thank you for using Claude Code Block Collapser! 🎉