Google AI Studio | Quick Actions Toolbar (Delete + Copy Markdown)

Adds Delete and Copy as Markdown buttons directly to the message hover toolbar

目前為 2025-12-22 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
piknockyou
評價
0 0 0
版本
2.0
建立日期
2025-12-22
更新日期
2025-12-22
尺寸
10.7 KB
授權條款
AGPL-3.0
腳本執行於

Google AI Studio | Quick Actions Toolbar (Delete + Copy Markdown)

Adds one-click Delete and Copy as Markdown buttons directly into each message’s hover toolbar in Google AI Studio—no need to open the ⋮ menu.

Features

  • Inline Quick Actions: Adds two native-style icon buttons to the message hover toolbar:
    • 🗑️ Delete
    • 📝 Copy as Markdown
  • Instant Deletion: Performs deletion synchronously without any visible menu flash.
  • Fast Copy: Copies the current turn to clipboard instantly via GM_setClipboard.
  • Visual Feedback: Copy button briefly shows a success checkmark.
  • SPA-Friendly: Automatically works as new turns appear (AI Studio is a dynamic SPA).
  • More Efficient DOM Scanning: Scans only newly-added DOM subtrees (instead of rescanning the whole page every time) to reduce overhead.

Usage

  1. Hover any chat message to reveal the message action toolbar.
  2. Click:
    • Delete to remove that turn.
    • Copy as Markdown to copy the turn to your clipboard.

Notes

  • “Copy as Markdown” aims to produce a clean, readable export of the turn. Depending on Google UI changes, some formatting (e.g., complex lists/code blocks) may not always be preserved perfectly.
  • Delete is performed by automating the existing UI (programmatically clicking the menu item) so it is safe and compatible with the site's logic.

Configuration

Timing values are configurable at the top of the script:

  • SCAN_DEBOUNCE_MS – how often the script scans for new toolbars during UI updates
  • COPY_FEEDBACK_MS – how long the success icon stays visible