Update TGBeta.ps1
This commit is contained in:
10
TGBeta.ps1
10
TGBeta.ps1
@@ -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}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user