Fix: retirer applyTranslations du MutationObserver (boucle infinie)
applyTranslations modifie le DOM -> declenche MutationObserver -> re-appelle applyConfig + applyTranslations -> boucle infinie. Le re-apply reste dans le callback fetch sidebar de chaque page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -71,9 +71,5 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
badge.style.display = (config.WIFI_status === 'hotspot') ? '' : 'none';
|
badge.style.display = (config.WIFI_status === 'hotspot') ? '' : 'none';
|
||||||
});
|
});
|
||||||
|
|
||||||
// 5. Re-apply i18n translations for dynamically loaded elements (sidebar, topbar)
|
|
||||||
if (window.i18n && typeof window.i18n.applyTranslations === 'function') {
|
|
||||||
window.i18n.applyTranslations();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user