documentation.federated.com.../public/js/tabpane-persist.js

20 lines
615 B
JavaScript
Raw Normal View History

2023-05-30 17:55:11 +00:00
if (typeof Storage !== 'undefined') {
const activeLanguage = localStorage.getItem('active_language');
if (activeLanguage) {
document
.querySelectorAll('.persistLang-' + activeLanguage)
.forEach((element) => {
$('#' + element.id).tab('show');
});
}
}
function persistLang(language) {
if (typeof Storage !== 'undefined') {
localStorage.setItem('active_language', language);
document.querySelectorAll('.persistLang-' + language)
.forEach((element) => {
$('#' + element.id).tab('show');
});
}
}