diff --git a/TGBeta.ps1 b/TGBeta.ps1 index 2b5c6f2..ad4b7a5 100644 --- a/TGBeta.ps1 +++ b/TGBeta.ps1 @@ -1031,14 +1031,22 @@ function GetHtmlContent { tabButtons.forEach(button => { button.addEventListener('click', () => { + console.log(`Tab button clicked: ${button.dataset.tab}`); // Log which tab button was clicked tabButtons.forEach(btn => { btn.classList.remove('active'); btn.setAttribute('aria-expanded', 'false'); }); tabContents.forEach(tab => tab.classList.remove('active')); + button.classList.add('active'); button.setAttribute('aria-expanded', 'true'); - document.getElementById(button.dataset.tab).classList.add('active'); + const targetTab = document.getElementById(button.dataset.tab); + console.log(`Activating tab: ${button.dataset.tab}`); + if (targetTab) { + targetTab.classList.add('active'); + } else { + console.error(`Tab not found: ${button.dataset.tab}`); + } }); });