This UserScript solves the problem of "Virtual Scrolling" in Google AI Studio, allowing you to export your full chat history with Gemini.
- ⚡ XHR Mode (Instant): Intercepts network requests to capture data instantly without scrolling.
- 🧠 Smart Auto-Scrolling: Fallback DOM-based scrolling to load all content (solving the DOM detachment issue).
- 🔄 Session Isolation: Automatically detects URL changes and resets the exporter to prevent data contamination.
- 📊 Real-time Badge: A red badge on the export button shows the number of captured turns in real-time.
- 📄 Multiple Formats: Supports Markdown (ZIP), HTML, and Plain Text exports.
- 🧹 Clean Output: Removes UI garbage and keeps only the dialogue, including "Thinking" processes.
- 🎨 Interactive UI: Beautiful overlay with progress tracking, countdown, and status indicators.
- 🔒 Safety Lock: Allows emergency stop via
ESCkey.
- Install the OrangeMonkey extension.
⚠️ Note: Tampermonkey is currently NOT supported. - 👉 Click here to install
- Open Google AI Studio.
- You will see a "🚀 Export" button on the bottom right.
- Click the Export Button on the bottom right corner.
- Choose your preferred Extraction Mode in Settings (XHR is recommended).
- Select the Export Format (ZIP, HTML, or Text).
- Wait for the process to complete (or watch the badge count up!).
- Once finished, the file will be downloaded automatically.
Tip: Press
ESCkey at any time to stop and save what has been captured so far.
Google AI Studio Chat History
Time: 2025/12/31 20:00:00
Turns: 42
----------------------------------------
## User
Analyze the provided code snippet.
---
## Gemini
Here is the analysis of the code...
[Code block content...]
这个脚本解决了 Google AI Studio 因“虚拟滚动”导致无法获取完整历史记录的问题。
- ⚡ XHR 模式 (极速):拦截网络请求,无需滚动即可瞬间获取完整数据。
- 🧠 智能自动滚动:备用 DOM 滚动机制,确保在各种环境下都能抓取所有历史对话。
- 🔄 会话隔离:自动监测 URL 变化并重置状态,防止不同对话间的数据污染。
- 📊 实时计数徽章:导出按钮上带有红色徽章,实时显示已捕获的对话轮数。
- 📄 多格式支持:支持 Markdown (ZIP)、HTML 以及 纯文本 导出。
- 🧹 数据清洗:自动去除 UI 干扰信息,保留纯净文本,支持“思考过程”导出。
- 🎨 交互式 UI:带有进度显示、倒计时和状态提示的精美界面。
- 🔒 安全机制:支持按
ESC键随时中断并保存。
- 安装 OrangeMonkey 扩展。
⚠️ 注意:暂不支持 Tampermonkey,请使用 OrangeMonkey。 - 👉 点击这里安装
- 打开 Google AI Studio。
- 你会看到右下角出现一个 "🚀 导出" 按钮。
- 点击右下角的 导出按钮。
- 在设置中选择 提取模式(推荐使用 XHR 模式)。
- 选择 导出格式(ZIP、HTML 或 纯文本)。
- 等待处理完成(或者观察徽章计数!)。
- 完成后,文件将自动下载。
提示:随时按
ESC键可停止并保存已抓取的内容。
Google AI Studio 聊天记录
时间: 2025/12/31 20:00:00
回合数: 42
----------------------------------------
## 用户
请分析这段代码。
---
## Gemini
这是对代码的分析...
[代码块内容...]
AGPL-3.0 License
- Supports images and various file types (PDF, CSV, TXT, etc.).
- In ZIP mode, attachments are packaged into folders.
- In HTML/Text mode, attachments are integrated as clickable links.
- Note: Due to site CSP, ZIP packaging may require OrangeMonkey's advanced permissions.
- Architecture: Full refactor into modular classes (
UIManager,ExporterCore, etc.). - XHR Mode: Added instant data extraction via network interception.
- Session Isolation: Added URL monitoring to reset state on conversation switch.
- HTML Export: Added a new polished HTML export format.
- Real-time Badge: Added a turn counter badge to the export button.
- Bilingual Code: Updated all script comments to be bilingual (CN/EN).