Fix switchTab function scope for ES6 module compatibility

- Expose switchTab to window object so onclick handlers can access it
- Fixes "switchTab is not defined" error when using type="module"
- Module-scoped functions are not accessible from inline HTML onclick handlers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
brentperteet
2026-02-27 14:01:35 -06:00
parent aa7f720194
commit 7a7a9dfdcc

View File

@@ -958,7 +958,8 @@
// ======================================== // ========================================
// Tab Switching // Tab Switching
// ======================================== // ========================================
function switchTab(tabName) { // Expose switchTab globally so onclick handlers can access it
window.switchTab = function(tabName) {
// Hide all tabs // Hide all tabs
document.querySelectorAll('.tab-content').forEach(tab => { document.querySelectorAll('.tab-content').forEach(tab => {
tab.classList.remove('active'); tab.classList.remove('active');