From 7a7a9dfdcc52f5b3c5673d5588321c862270caa7 Mon Sep 17 00:00:00 2001 From: brentperteet Date: Fri, 27 Feb 2026 14:01:35 -0600 Subject: [PATCH] Fix switchTab function scope for ES6 module compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- templates/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 4180ca9..8fba5f2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -958,7 +958,8 @@ // ======================================== // Tab Switching // ======================================== - function switchTab(tabName) { + // Expose switchTab globally so onclick handlers can access it + window.switchTab = function(tabName) { // Hide all tabs document.querySelectorAll('.tab-content').forEach(tab => { tab.classList.remove('active');