Skip to content

Instantly share code, notes, and snippets.

@volkanunsal
Last active September 9, 2025 01:22
Show Gist options
  • Save volkanunsal/ceaeef0882b04db4c458629c156cce2f to your computer and use it in GitHub Desktop.
Save volkanunsal/ceaeef0882b04db4c458629c156cce2f to your computer and use it in GitHub Desktop.

FastDelete Note for NotebookLM

FastDelete Note is a userscript that adds a convenient "Fast Delete" button to Google NotebookLM. This button allows users to quickly delete notes with fewer clicks, streamlining the note management process.

Key Features

  • Clicks the "Delete" button in confirmation modal automatically, reducing the tedium of managing your notes.

Getting Started

🔧 Installation

  1. Install Tampermonkey browser extension
  2. Click on the "Raw" button of the script below.
  3. Visit notebooklm.google.com to see the magic! ✨
// @ts-nocheck
// ==UserScript==
// @name Fast Delete Note
// @namespace https://github.com/volkanunsal
// @version 2025-09-09
// @description Delete note quickly with fewer clicks.
// @author Volkan Unsal
// @downloadURL https://gist.githubusercontent.com/volkanunsal/ceaeef0882b04db4c458629c156cce2f/raw/fast-delete-note.user.js
// @updateURL https://gist.githubusercontent.com/volkanunsal/ceaeef0882b04db4c458629c156cce2f/raw/fast-delete-note.user.js
// @match https://notebooklm.google.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// ==/UserScript==
"use strict";(()=>{var l=class{constructor(e={}){this.namespace=e.namespace,this.prefix=[this.namespace,e.prefix].filter(Boolean).join(" "),this.enabled=e.enabled!==!1,this.timestamp=e.timestamp!==!1,this.timestampFormat=e.timestampFormat||"locale"}getTimestamp(){let e=new Date;return this.timestampFormat==="ISO"?e.toISOString():e.toLocaleString()}formatMessage(e,...t){let n=[this.prefix];return this.timestamp&&n.push(`[${this.getTimestamp()}]`),n.push(`[${e.toUpperCase()}]`),[n.join(" "),...t]}debug(...e){this.enabled&&console.debug(...this.formatMessage("debug",...e))}info(...e){this.enabled&&console.info(...this.formatMessage("info",...e))}warn(...e){this.enabled&&console.warn(...this.formatMessage("warn",...e))}error(...e){this.enabled&&console.error(...this.formatMessage("error",...e))}log(...e){this.enabled&&console.log(...this.formatMessage("log",...e))}custom(e,...t){this.enabled&&console.log(...this.formatMessage(e,...t))}group(e,t){if(!this.enabled)return t();console.group(`${this.prefix} ${e}`);try{t()}finally{console.groupEnd()}}groupCollapsed(e,t){if(!this.enabled)return t();console.groupCollapsed(`${this.prefix} ${e}`);try{t()}finally{console.groupEnd()}}table(e,t){this.enabled&&(this.info("Table data:"),console.table(e,t))}time(e){this.enabled&&console.time(`${this.prefix} ${e}`)}timeEnd(e){this.enabled&&console.timeEnd(`${this.prefix} ${e}`)}timeLog(e){this.enabled&&console.timeLog(`${this.prefix} ${e}`)}enable(){this.enabled=!0}disable(){this.enabled=!1}setPrefix(e){this.prefix=e}};function u(r={}){return new l(r)}function h({selector:r,onReady:e,onRemoved:t}){let n=new Set,f=()=>typeof r=="function"?r():document.querySelector(r),o=f();o&&o instanceof HTMLElement&&(n.add(o),e(o));let c=new MutationObserver(d=>{d.forEach(m=>{m.addedNodes.forEach(s=>{if(s.nodeType===Node.ELEMENT_NODE){let i=f();i&&i instanceof HTMLElement&&!n.has(i)&&(n.add(i),e(i)),typeof r=="string"&&s instanceof Element&&s.querySelectorAll(r).forEach(a=>{a instanceof HTMLElement&&!n.has(a)&&(n.add(a),e(a))})}}),t&&m.removedNodes.forEach(s=>{s.nodeType===Node.ELEMENT_NODE&&n.forEach(i=>{(s===i||s instanceof Element&&s.contains(i))&&(n.delete(i),t(i))})})})});return c.observe(document.body,{childList:!0,subtree:!0}),()=>{c.disconnect(),n.clear()}}(function(){"use strict";let r=u({prefix:"[FastDelete]",namespace:"UserScript"});function e(t){return document.querySelector(t)}h({selector:"delete-notes",onReady:t=>{if(!(t instanceof HTMLElement))return;r.log("Delete note element is ready:",t);let n=e('delete-notes [aria-label="Confirm deletion"]');n&&n.click()}})})();})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment