cleanup: wrap console.log calls behind window.DASHCADDY_DEBUG flag
Wrapped 22 console.log calls across 6 files with a debug() helper that only logs when window.DASHCADDY_DEBUG is true in the browser console. Files: - tour-manager.js: 10 calls - theme-adapter.js: 4 calls - keyboard-shortcuts.js: 4 calls - tooltip-definitions.js: 2 calls - progress-tracker.js: 1 call - live-events.js: 1 call console.error and console.warn calls preserved — those indicate real issues worth seeing in production.
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
const debug = (...args) => {
|
||||
if (window.DASHCADDY_DEBUG) { console.log(...args); }
|
||||
};
|
||||
|
||||
// All modal selectors that can be closed with Escape
|
||||
const MODAL_SELECTORS = [
|
||||
'#app-selector-modal',
|
||||
@@ -39,9 +43,9 @@
|
||||
// Add global keyboard listener
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
|
||||
console.log('[Keyboard Shortcuts] Initialized');
|
||||
console.log('[Keyboard Shortcuts] Press Ctrl+K to open quick search');
|
||||
console.log('[Keyboard Shortcuts] Press Escape to close modals');
|
||||
debug('[Keyboard Shortcuts] Initialized');
|
||||
debug('[Keyboard Shortcuts] Press Ctrl+K to open quick search');
|
||||
debug('[Keyboard Shortcuts] Press Escape to close modals');
|
||||
} catch (e) {
|
||||
console.warn('[Keyboard Shortcuts] Failed to initialize:', e.message);
|
||||
}
|
||||
@@ -599,7 +603,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console.log('[Keyboard Shortcuts] Unknown action:', action);
|
||||
debug('[Keyboard Shortcuts] Unknown action:', action);
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('[Keyboard Shortcuts] Error executing action:', e.message);
|
||||
|
||||
Reference in New Issue
Block a user