ChatGPT Code Block Copy-All Button
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
ChatGPT Code Block Copy-All Button automatically detects code blocks in your ChatGPT conversations and adds a "Copy All" button to each one. Click the button to copy the entire code block content to your clipboard with a single click — no more selecting and copying manually. Visual feedback confirms the copy action, and optional notifications let you know when the code has been successfully copied. The button works with all code blocks, regardless of language or length, making it easy to extract code snippets from your conversations.
WHERE IT RUNS
This extension works exclusively on ChatGPT at chatgpt.com. It functions on conversation pages where code blocks are displayed, including user messages, assistant responses, and any content containing preformatted code. The tool works across all ChatGPT versions and adapts to the dynamic chat interface.
HOW TO USE
Install the extension and start a conversation on ChatGPT. When a message containing a code block appears, a "Copy All" button appears on the code block. Click the button to copy the entire code content to your clipboard — the button briefly changes to "Copied!" with a green indicator. Use the overlay panel to customize the experience: toggle the copy button visibility on or off, toggle notifications on or off, choose the button position (Top-right of code block or Inline above block), and adjust the feedback duration in milliseconds (default 2000ms) to control how long the "Copied!" message stays visible. Click "Refresh Code Blocks" to manually re-scan the page after new content loads. The status area shows how many code blocks are currently detected.
TECHNICAL SECTION — CODE BLOCK DETECTION AND COPY FUNCTIONALITY
The extension uses a multi-strategy detection engine to find code blocks on ChatGPT pages. It queries common code block selectors including pre, .code-block, .hljs, .prism, and pattern-matching class names. For each detected code block, the tool extracts the content from the code element or the block's text content. A "Copy All" button is created using DOM manipulation with inline CSS and inserted at the specified position (top-right or inline). The button uses GM_setClipboard to copy the code content to the system clipboard. Visual feedback is provided by changing the button text and border color, and GM_notification is used for optional notifications. The button position and feedback duration are configurable via settings, and a MutationObserver monitors the DOM for new code blocks.
THE PANEL — DRAG / PER-SITE POSITION / SNAP / COLLAPSE / RESIZE / ESCAPE
The overlay panel is fully interactive and designed for seamless multitasking. Drag it anywhere on the screen using the handle at the top of the panel; the position is saved per site so it stays where you left it across sessions. The panel includes a snap-to-edge feature that gently anchors the overlay to the nearest screen edge when released. Click the collapse button to minimize the panel to a compact pill showing the current code block status; expand it again with a single click. Resize the panel vertically by dragging the bottom-right corner to view more controls. Press the Escape key at any time to instantly close the overlay; it reappears on the next page navigation or refresh.
PLEASE NOTE
This extension requires the free BotGentz companion extension to function, as it provides the underlying content script injection and cross-origin communication framework. No personal data, browsing history, or conversation content is stored, transmitted, or shared. All copy operations occur entirely locally in your browser; no information is sent to any external server. Settings are stored locally in your browser using GM_setValue and are never sent to any external server. The extension does not access or store login credentials, financial data, or personally identifiable information. The tool reads code blocks visible on the page and does not access ChatGPT's API or any private data. ChatGPT may update its page structure; the extension includes multiple detection strategies to maintain compatibility, but major redesigns may temporarily affect code block detection.