Commit 6a8fb8fe authored by Marcel Stör's avatar Marcel Stör
Browse files

Fix fly-out menu content and add temporary debugger

parent 046ad545
......@@ -8,6 +8,11 @@ var nodemcu = nodemcu || {};
$(document).ready(function () {
hideNavigationForAllButSelectedLanguage();
addLanguageSelectorToRtdFlyOutMenu();
document.addEventListener("DOMSubtreeModified", function(e) {
// Notify of change!
debugger;
console.warn("change!", e);
}, false);
});
function hideNavigationForAllButSelectedLanguage() {
......@@ -55,10 +60,11 @@ var nodemcu = nodemcu || {};
}
function createLanguageLinkFor(languageCode, isCurrentlySelected) {
var strong;
// split[0] is an '' because the path starts with the separator
var pathSegments = window.location.pathname.split('/');
var dd = document.createElement("dd");
var href = document.createElement("href");
href.setAttribute('a', '/' + pathSegments[0] + '/' + pathSegments[1] + '/' + languageCode);
var href = document.createElement("a");
href.setAttribute('href', '/' + pathSegments[1] + '/' + pathSegments[2] + '/' + languageCode);
href.appendChild(document.createTextNode(languageCode));
dd.appendChild(href);
if (isCurrentlySelected) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment