mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
fix comments on doc multilang
This commit is contained in:
parent
b9bb216321
commit
680de4b9ba
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user