From 0024172be65430b4ee9c9a73d6bbb42e8428085f Mon Sep 17 00:00:00 2001 From: ZDDC Date: Sat, 9 May 2026 18:48:57 -0500 Subject: [PATCH] refactor(archive): remove unused debounce helper archive/js/events.js defined a 10-line debounce function inside the events IIFE that was never called anywhere in archive/. Dead code, confirmed by grepping the whole archive/ tree for debounce(. The plan was to extract debounce to shared/util.js so this file and mdedit/js/utils.js could share one implementation, but mdedit's debounce has only one caller (editor.js) so a shared abstraction would be premature. Just delete the dead copy. Co-Authored-By: Claude Opus 4.7 (1M context) --- archive/js/events.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/archive/js/events.js b/archive/js/events.js index 64328cc..4e08c99 100644 --- a/archive/js/events.js +++ b/archive/js/events.js @@ -223,19 +223,6 @@ } } - // Utility: Debounce function - function debounce(func, wait) { - let timeout; - return function executedFunction(...args) { - const later = () => { - clearTimeout(timeout); - func(...args); - }; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - }; - } - // Multi-select handling for folder lists function setupFolderMultiSelect() { let lastSelectedGroupingIndex = -1;