Update TGBeta.ps1

This commit is contained in:
2025-01-27 22:16:35 -05:00
parent 0152f49d08
commit 3a86bc4037

View File

@@ -1031,14 +1031,22 @@ function GetHtmlContent {
tabButtons.forEach(button => { tabButtons.forEach(button => {
button.addEventListener('click', () => { button.addEventListener('click', () => {
console.log(`Tab button clicked: ${button.dataset.tab}`); // Log which tab button was clicked
tabButtons.forEach(btn => { tabButtons.forEach(btn => {
btn.classList.remove('active'); btn.classList.remove('active');
btn.setAttribute('aria-expanded', 'false'); btn.setAttribute('aria-expanded', 'false');
}); });
tabContents.forEach(tab => tab.classList.remove('active')); tabContents.forEach(tab => tab.classList.remove('active'));
button.classList.add('active'); button.classList.add('active');
button.setAttribute('aria-expanded', 'true'); 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}`);
}
}); });
}); });