From cda160414fe65451976a28867527f60e77f2f639 Mon Sep 17 00:00:00 2001 From: Idrees Hassan Date: Sun, 26 Oct 2025 20:47:36 -0400 Subject: [PATCH] Only confirm for non-empty sticky notes --- dist/birb.js | 4 ++-- dist/birb.user.js | 6 +++--- manifest.json | 2 +- src/stickyNotes.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/birb.js b/dist/birb.js index 90ac226..470d79a 100644 --- a/dist/birb.js +++ b/dist/birb.js @@ -878,7 +878,7 @@ if (closeButton) { makeClosable(() => { - if (confirm("Are you sure you want to delete this sticky note?")) { + if (stickyNote.content.trim() === "" || confirm("Are you sure you want to delete this sticky note?")) { onDelete(); noteElement.remove(); } @@ -1605,7 +1605,7 @@ insertModal(`${birdBirb()} Mode`, message); }), new Separator(), - new MenuItem("2025.10.26.536", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.26.536"); }, false), + new MenuItem("2025.10.26.537", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.26.537"); }, false), ]; const styleElement = document.createElement("style"); diff --git a/dist/birb.user.js b/dist/birb.user.js index 708b779..d1c21f2 100644 --- a/dist/birb.user.js +++ b/dist/birb.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Pocket Bird // @namespace https://idreesinc.com -// @version 2025.10.26.536 +// @version 2025.10.26.537 // @description birb // @author Idrees // @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js @@ -892,7 +892,7 @@ if (closeButton) { makeClosable(() => { - if (confirm("Are you sure you want to delete this sticky note?")) { + if (stickyNote.content.trim() === "" || confirm("Are you sure you want to delete this sticky note?")) { onDelete(); noteElement.remove(); } @@ -1619,7 +1619,7 @@ insertModal(`${birdBirb()} Mode`, message); }), new Separator(), - new MenuItem("2025.10.26.536", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.26.536"); }, false), + new MenuItem("2025.10.26.537", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.26.537"); }, false), ]; const styleElement = document.createElement("style"); diff --git a/manifest.json b/manifest.json index 43045e7..cc99bfc 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Pocket Bird", "description": "It's a bird, in your browser. What more could you want?", - "version": "2025.10.26.536", + "version": "2025.10.26.537", "homepage_url": "https://idreesinc.com", "content_scripts": [ { diff --git a/src/stickyNotes.js b/src/stickyNotes.js index 2044365..29e7d8e 100644 --- a/src/stickyNotes.js +++ b/src/stickyNotes.js @@ -111,7 +111,7 @@ export function renderStickyNote(stickyNote, onSave, onDelete) { if (closeButton) { makeClosable(() => { - if (confirm("Are you sure you want to delete this sticky note?")) { + if (stickyNote.content.trim() === "" || confirm("Are you sure you want to delete this sticky note?")) { onDelete(); noteElement.remove(); }