您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Deletes the current Gemini conversation on both mobile and desktop layouts. Uses simplified polling and timing; focuses and highlights the confirm button without automatic click on both layouts. On desktop, after confirm is clicked, conditionally opens side nav if its content width ≤72px, without adding duplicate listeners. The confirm button is now scoped under message-dialog.
Version: 1.7.7 🎉🎉🎉
A Tampermonkey userscript that adds a keyboard shortcut and button to delete the current Google Gemini conversation. Supports both mobile and desktop layouts, focuses and highlights the confirmation button (instead of auto-clicking), and, on desktop, toggles the side navigation when its content width is 72px or less. ✨✨✨
Ctrl + Shift + Backspace
opens the conversation actions menu, clicks “Delete,” and focuses/highlights the “Confirm” button (mobile or desktop).Ctrl + Shift + S
clicks the final action button (e.g., “New Chat”).Ctrl + Shift + ?
displays an alert with the current URL and whether mobile/desktop menu buttons are present and visible.<bard-sidenav>
width. If the inner content width is ≤ 72px, automatically clicks the side-nav toggle button (button[data-test-id="side-nav-menu-button"]
).message-dialog button[data-test-id="confirm-button"]
to avoid conflicts with other confirm buttons (e.g., “Start Research”).https://gemini.google.com/app
.Ctrl + Shift + Backspace
: 1. Click the “More” menu button.
2. Click “Delete.”
3. Focus and highlight the “Confirm” button under `<message-dialog>`. The user must press Enter or click manually.
1. Click the selected conversation’s menu button (`conversations-list div.selected button`).
2. Click “Delete” from the pop-up menu.
3. Focus and highlight the “Confirm” button under `<message-dialog>`.
4. After the user clicks “Confirm,” wait 200 ms, then check `<bard-sidenav>` inner content width (clientWidth minus padding). If ≤ 72px, click `button[data-test-id="side-nav-menu-button"]` to open the side navigation.
Ctrl + Shift + S
to click any final action button (e.g., “New Chat”).Ctrl + Shift + ?
to view script status. 🚀🚀🚀No additional configuration is required. All selectors and timing constants are defined in the script:
POLLING_INTERVAL
: 100 ms between element checks.MAX_POLLING_TIME
: 1000 ms maximum wait per element.POST_CONFIRM_DELAY
: 200 ms wait after confirm click before toggling side nav on desktop.!important
to override Angular Material CSS. ✨✨✨message-dialog button[data-test-id="confirm-button"]
to avoid selecting other confirm buttons (e.g., “Start Research”). 🚀🚀🚀dataset.sideNavListenerAdded
) to prevent duplicate side-nav listeners.dataset.sideNavListenerAdded
when dialog closes.{ once: true }
. ✨✨✨<bard-sidenav>
inner width ≤ 72px.sleep(100)
waits; immediately poll for next element.@run-at document-idle
to ensure script runs after DOM is ready.querySelector
call.conversations-list div.selected button
, then “Delete,” then “Confirm.”MIT License. See LICENSE for full text.
Takashi Sasasaki
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址