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