A lightweight Chrome extension that exports TabBitBrowser AI chat conversations to Markdown with one click.
- One-Click Copy — Copy the entire conversation (all questions + answers) to clipboard as Markdown
- Markdown Preview — Preview the generated Markdown before copying
- Download as .md — Save the conversation as a
.mdfile - Multi-Turn Support — Handles multi-turn conversations correctly
- Robust Extraction — 3-layer DOM parsing fallback strategy for reliable extraction
- Zero Dependencies — Pure vanilla JavaScript, no external libraries required (~580 lines total)
- Google Chrome or any Chromium-based browser (Edge, Arc, Brave, etc.)
- TabBitBrowser account with access to chat pages
-
Clone the repository
git clone https://github.com/zccyman/TabBitBrowser-Chat-Export.git
-
Open Chrome Extensions page — Navigate to
chrome://extensions/ -
Enable Developer Mode — Toggle the Developer mode switch in the top-right corner
-
Load the extension — Click Load unpacked and select the
tabbit-chat-export/subfolder (containingmanifest.json) -
Pin the extension (optional) — Click the puzzle piece icon in the toolbar, find TabBit Chat Export, and pin it
- Open TabBitBrowser and navigate to a chat page (
/chat/{uuid}) - Click the TabBit Chat Export icon in the Chrome toolbar
- Use the popup to:
- Copy — Copies all conversation as Markdown to clipboard
- Preview — Shows a preview of the Markdown output
- Download — Saves the conversation as a
.mdfile
TabBitBrowser-Chat-Export/
├── LICENSE # MIT License
├── README.md # English documentation
├── README_CN.md # Chinese documentation
└── tabbit-chat-export/ # Extension source code
├── manifest.json # Chrome Manifest V3 config
├── content.js # Content script — 3-layer DOM extraction engine
├── popup.html # Popup UI (inline CSS)
├── popup.js # Popup logic — extraction, clipboard, download
├── styles.css # Content script styles (floating button, notifications)
└── icon.png # Extension icon
TabBitBrowser is built with Next.js + React Server Components (RSC). Each message container has explicit data-message-type ("user" / "assistant") and data-message-index attributes. The extension uses a 3-layer extraction strategy:
| Layer | Strategy | Description |
|---|---|---|
| 1 | Message Type Attribute | Queries [data-message-type] elements, sorts by data-message-index |
| 2 | ActionBar Anchor | Finds AI responses via [data-message-action-bar], walks to [data-message-type] container, pairs with preceding user message |
| 3 | User Bubble + ActionBar | Locates .theme-user-message for user messages and [data-message-action-bar] for AI responses, sorts by page position |
| Permission | Reason |
|---|---|
activeTab |
Access the current tab's DOM for extraction |
scripting |
Inject content script when automatic injection fails |
*://*.tabbitbrowser.com/* |
Only operates on TabBitBrowser domains |
The extension uses a robust 3-stage injection strategy:
- Attempts to communicate with an already-injected content script via
ping - Falls back to
chrome.scripting.executeScriptfor manual injection - Final fallback executes extraction directly in the page context via
executeScriptwith inline function
git clone https://github.com/zccyman/TabBitBrowser-Chat-Export.git
cd TabBitBrowser-Chat-Export
# Edit source files, then reload extension in chrome://extensions/- Popup: Right-click extension icon → "Inspect popup"
- Content script: DevTools → Console on the chat page
- Extension errors: Check
chrome://extensions/for error logs
- Ensure the page has fully loaded before clicking the extension
- Verify the URL contains
/chat/(the extension only works on chat pages) - Try refreshing the page and clicking again
- The extension only works on
https://web.tabbitbrowser.com/chat/*pages - Navigate to a chat conversation first, then click the extension
- Check that the extension has host permissions for
tabbitbrowser.com - Try removing and re-loading the extension
- Check the DevTools console for errors
MIT © 2026 zccyman