Gemini Conversation Delete Shortcut

Deletes the current Gemini conversation with a keyboard shortcut or button, provides a Tampermonkey menu command and a Ctrl+Shift+? shortcut to show script status, and a Ctrl+Shift+S shortcut to click the final action button.

目前为 2025-05-09 提交的版本。查看 最新版本

作者
TakashiSasaki
评分
0 0 0
版本
1.6.7
创建于
2025-04-19
更新于
2025-05-09
大小
13.5 KB
许可证
MIT
适用于

✨ Gemini Conversation Delete Shortcut ✨

📝 Description

This Tampermonkey script streamlines the process of deleting the currently displayed conversation on Google Gemini (https://gemini.google.com/app and https://gemini.google.com/app/*). It offers a primary shortcut (Ctrl + Shift + Backspace) or a manual button to automate the deletion sequence up to the confirmation step.

The main automation sequence will:

  1. Open the conversation actions menu (the three-dots button, typically visible in narrower/mobile views).
  2. Click the Delete option in the menu.
  3. Focus and highlight the Confirm button in the deletion dialog, prompting you to manually confirm (by pressing <kbd>Enter</kbd> or clicking).

Key additional functionalities include:

  • A Ctrl + Shift + S shortcut to click the "final" button (e.g., "New Chat" button) that might appear after a conversation is deleted.
  • A Tampermonkey menu command Show delete shortcut status (also accessible via Ctrl + Shift + ?) to display an alert dialog showing:
    • The script version.
    • The current page URL.
    • The number of conversation headers detected.
    • The current visibility status of the conversation actions menu button.

This makes it easy to verify script operation and UI element recognition.

⚙️ Features

  • Main Deletion Shortcut (Ctrl + Shift + Backspace): Automates opening the menu, clicking "Delete", and then focuses and highlights the "Confirm" button in the deletion dialog, requiring your explicit confirmation.
  • Manual Deletion Button (🗑️): An in-page 🗑️ button is injected next to the conversation's More menu. This button is only visible when the More menu button itself is visible (typically in narrower window widths / mobile-like views) and performs the same action as the main shortcut.
  • Final Button Shortcut (Ctrl + Shift + S): After you've confirmed deletion, this shortcut can be used to click the subsequent button that often appears (e.g., "New Chat").
  • Status Check Shortcut (Ctrl + Shift + ?): Quickly opens the status dialog.
  • Responsive UI Awareness:
    • The main deletion sequence (via shortcut or manual button) only activates if the conversation actions menu (three-dots button) is visible.
    • The initial automation sequence (opening menu, clicking delete, focusing confirm) is intended for narrower window widths (≤ 960px) where the mobile-style menu is active. If the window is wider, it will notify you.
  • Robust Polling: Waits for necessary UI elements (menu, delete button, confirm button) to appear, retrying for a few seconds.
  • Tampermonkey Menu Status: Access the status dialog via the Tampermonkey extension menu ▶️ Show delete shortcut status.
  • Dynamic Button Insertion: The manual 🗑️ button's visibility adapts to page changes and window resizing.
  • User Feedback: Provides alerts if required UI elements are not found or not visible when shortcuts are used.
  • Console Logs: Detailed logs for debugging button insertion, automation steps, and status checks.
  • Wider URL Matching: Works on both https://gemini.google.com/app/* and https://gemini.google.com/app.

🚀 Installation & Usage

  1. Install Tampermonkey in your browser (Chrome, Edge, Firefox, Opera, etc.).
  2. Install this script from GreasyFork by clicking the Install button.
    • For Chromium-based browsers, you might need to ensure Tampermonkey has permission to run or that Developer Mode for extensions is enabled if you encounter issues.
  3. Open a Gemini conversation at https://gemini.google.com/app or a specific conversation URL.
  4. For the main deletion shortcut/button:
    • Ensure your browser window width is 960px or less so that Gemini’s mobile-friendly conversation actions menu (three-dots) is visible.
    • Press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Backspace</kbd> or click the yellow 🗑️ button (if visible).
    • The script will proceed to the confirmation dialog, and the "Confirm" button will be focused and highlighted (e.g., in green).
    • You must then press <kbd>Enter</kbd> or click the highlighted "Confirm" button to actually delete the conversation.
  5. After deletion (optional):
    • If a button like "New Chat" appears, you can press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd> to click it.
  6. Check script status:
    • At any time, press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>?</kbd>.
    • Or, right-click the Tampermonkey extension icon ▶️ User Script Commands ▶️ Show delete shortcut status.

👨‍💻 Developer

Takashi Sasaki

🌐 Homepage

https://x.com/TakashiSasaki

📄 License

MIT

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址