Reload active tab content on language switch for wiki and users
This commit is contained in:
@@ -54,6 +54,13 @@ document.querySelectorAll('.lang-btn').forEach(btn => {
|
||||
document.body.dataset.lang = lang;
|
||||
document.querySelectorAll('.lang-btn').forEach(b => b.classList.remove('active'));
|
||||
btn.classList.add('active');
|
||||
// Reload active tab content with new language
|
||||
const activeTab = document.querySelector('.notebook .tab.active');
|
||||
if (activeTab) {
|
||||
const tabName = activeTab.dataset.tab;
|
||||
if (tabName === 'users') loadUsers();
|
||||
if (tabName === 'wiki') loadWiki();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user