var nodemcu = nodemcu || {}; (function () { 'use strict'; var languageCodeToNameMap = {EN: 'English', DE: 'Deutsch'}; var languageNames = values(languageCodeToNameMap); var defaultLanguageCode = 'EN'; $(document).ready(function () { hideNavigationForAllButSelectedLanguage(); }); function hideNavigationForAllButSelectedLanguage() { // URL is like http://host/EN/build/ -> extract 'EN' var selectedLanguageCode = window.location.pathname.substr(1, 2); if (!selectedLanguageCode) { selectedLanguageCode = defaultLanguageCode; } var selectedLanguageName = languageCodeToNameMap[selectedLanguageCode]; // Finds all subnav elements and hides them if they're /language/ subnavs. Hence, all 'Modules' subnav elements // won't be hidden. //