PublishingJS:TheNewSocial
console.log( 'Hello from PublishingJS namespace!' )
const nav_links = document.querySelectorAll('.toclevel-1 a');
window.onhashchange = function() {
for (let i = 0; i < nav_links.length; i++) {
if (nav_links[i].href.match(/(#.*)/)[1] == window.location.hash) {
nav_links[i].className = 'selected';
} else {
nav_links[i].className = '';
}
}
};