Collapse code blocks with symmetrical dual controls, download functionality, double-click toggle, and typing animation - Auto-copy disabled - Fixed event handler error
Tampermonkey Userscript for Code Management
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.
Transform messy code blocks into clean, manageable sections.
📦 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
📜 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
🎓 Learning Sessions
→ Keep code organized while learning from Claude
📊 Data Analysis
→ Manage code snippets and results cleanly
🟡 Active Phase (Generating)
🔴 Complete Phase (Ready)
Automatic Detection:
Step-by-step process:
🔍 Auto-detects new code
→ Script monitors for new code blocks
⌨️ Watches typing status
→ Waits for Claude to finish generating
📦 Auto-collapses when complete
→ Minimizes block to save space
🎛️ Dual controls appear
→ Buttons ready on both sides
✅ One-click actions
→ Copy/download/expand instantly
💫 Visual feedback
→ Confirms successful actions
📏 Reduced Scrolling
→ Save 60-80% vertical space in long conversations
🎯 Improved Focus
→ Keep attention on current discussion, not past code
⚡ Faster Workflow
→ Symmetrical controls accessible from either side
🛡️ Safe Operations
→ Typing detection prevents premature actions
📁 Better Organization
→ Clean, manageable code sections
💾 Quick Saving
→ Download code with one click
⚡ Fastest Toggle:
📋 Copy Code:
💾 Download Code:
⏸️ Wait for Completion:
🎨 Use Dual Controls:
Access buttons from whichever side is convenient
⏱️ Monitor Animation:
Wait for gradient to stop before critical actions
💾 Save Immediately:
Download important code right away
🖱️ Double-Click Power:
Fastest way to expand/collapse blocks
📂 Organize Downloads:
Files auto-named with language and timestamp
📏 Minimum Code Length
→ Default: 20 characters (adjustable)
⏱️ Typing Check Interval
→ Default: 300ms (customizable)
📦 Auto-Collapse Delay
→ Default: 500ms (modifiable)
🖱️ Double-Click Timing
→ Default: 300ms (adjustable)
🎨 Animation Speed
→ Gradient timing configurable
Claude.ai conversations with multiple code blocks become overwhelming:
Intelligent code management that provides:
👨💻 Software Developers
→ Managing multiple code snippets in Claude conversations
🎓 Students Learning to Code
→ Keeping lessons organized and accessible
✍️ Technical Writers
→ Documenting code examples from Claude
👀 Code Reviewers
→ Systematically reviewing generated code
📊 Data Scientists
→ Managing analysis code and results
🔧 DevOps Engineers
→ Working with configuration and script files
Transform your Claude.ai code management with intelligent collapsing, dual controls, and one-click downloads.
🌐 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
⚡ Performance: Lightweight, real-time detection
🎨 Interface: Non-intrusive, symmetrical design
✓ Programming Languages:
✓ Markup Languages:
✓ Other Formats:
📏 Minimum Length: 20 characters (configurable)
⚡ Detection Speed: Real-time monitoring
🎯 Recognition: Language, titles, comments
🔄 Update Frequency: 300ms intervals
🎛️ Dual Button Layout:
📋 Available Actions:
💫 Visual Feedback:
🔍 Real-Time Monitoring:
⏱️ Smart Timing:
📦 Automatic Minimization:
🎯 Smart Behavior:
📝 Automatic Filenames:
javascript_code_20241108-143000.txt
python_script_20241108-143015.txt
html_document_20241108-143030.txt
🎨 Naming Pattern:
🐛 Bug Reports:
💡 Feature Requests:
⭐ Reviews:
📦 Collapse Strategy:
Let blocks auto-collapse to maintain clean workspace
💾 Save Important Code:
Download critical code immediately after generation
🖱️ Master Double-Click:
Practice double-click toggle for fastest navigation
⚖️ Use Both Sides:
Access controls from whichever side is convenient
⏱️ Watch Animations:
Wait for static header before important actions
📂 Organize Downloads:
Create project folders for downloaded code
📋 For Reviews:
📚 For Learning:
💻 For Development:
Thank you for using Code Block Collapser for Claude.ai!
Keep your Claude conversations clean and organized with intelligent code management.
Happy coding! 💻✨
Last Updated: November 2025
Version: 24
Compatible with: Tampermonkey on all major browsers
Works on: claude.ai and all subdomains