UNPKG

decentralized-internet

Version:

An NPM library of programs to create decentralized web and distributed computing projects

1 lines 426 B
function hideAllButCurrent(){document.querySelectorAll("nav > ul > li > ul li").forEach(function(l){l.style.display="none"});var l=window.location.pathname.split("/").pop().replace(/\.html/,"");document.querySelectorAll("nav > ul > li > a").forEach(function(e){var t=e.attributes.href.value.replace(/\.html/,"");l===t&&e.parentNode.querySelectorAll("ul li").forEach(function(l){l.style.display="block"})})}hideAllButCurrent();