fix comments on doc multilang

This commit is contained in:
Reckless_Satoshi 2024-03-03 23:59:45 +00:00
parent b9bb216321
commit 680de4b9ba
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -36,17 +36,17 @@
<script> <script>
document.addEventListener('DOMContentLoaded', (event) => { document.addEventListener('DOMContentLoaded', (event) => {
const languageStored = localStorage.getItem('language') || 'en'; const languageStored = localStorage.getItem('language') || 'en';
// load the dropdown menu and get the element for later use /* load the dropdown menu and get the element for later use */
const languageDropdown = loadDropDownMenu(languageStored); const languageDropdown = loadDropDownMenu(languageStored);
const currentUrl = window.location.href; const currentUrl = window.location.href;
// get navigation file depending on localstorage, default navigation file in English /* get navigation file depending on localstorage, default navigation file in English */
let navigationFile = getNavigationFile(languageStored); let navigationFile = getNavigationFile(languageStored);
// generate the navigation menu /* generate the navigation menu */
generateNavigationMenu(navigationFile); generateNavigationMenu(navigationFile);
// match the page with the selected language, if the page is a tutorial or read page, do nothing /* match the page with the selected language, if the page is a tutorial or read page, do nothing */
if(!currentUrl.includes('/watch/') && !currentUrl.includes('/read/')) { if(!currentUrl.includes('/watch/') && !currentUrl.includes('/read/')) {
languageDropdown.value = languageStored; languageDropdown.value = languageStored;
matchPageWithSelection(languageStored, currentUrl); matchPageWithSelection(languageStored, currentUrl);