js/docs: remove special casing of glossary

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-10-08 14:31:56 +02:00
parent e861522ab9
commit f4e9565b22
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 8 additions and 12 deletions

View File

@ -89,13 +89,11 @@ function walkTree(tree) {
function renderNav(docstoc) {
for (var i = 0; i < docstoc.horizontalnav.length; i++) {
if (docstoc.horizontalnav[i].node !== "glossary") {
currentSection = docstoc.horizontalnav[i].node;
// build vertical nav
var itsHere = findMyTopic(docstoc[docstoc.horizontalnav[i].node]);
if (itsHere || docstoc.horizontalnav[i].path === pageURL) {
walkTree(docstoc[docstoc.horizontalnav[i].node]);
}
currentSection = docstoc.horizontalnav[i].node;
// build vertical nav
var itsHere = findMyTopic(docstoc[docstoc.horizontalnav[i].node]);
if (itsHere || docstoc.horizontalnav[i].path === pageURL) {
walkTree(docstoc[docstoc.horizontalnav[i].node]);
}
// build horizontal nav
outputHorzTabs.push('<li id="' + docstoc.horizontalnav[i].node + '"');
@ -136,12 +134,10 @@ function scrollMenuItem(selector) {
}
function highlightRightNav(heading) {
if (document.location.pathname.indexOf("/glossary/") < 0) {
$("#my_toc a.active").removeClass("active");
$("#my_toc a.active").removeClass("active");
if (heading !== "title") {
$("#my_toc a[href='#" + heading + "']").addClass("active");
}
if (heading !== "title") {
$("#my_toc a[href='#" + heading + "']").addClass("active");
}
}