* fix: closes #6784

* #6784 also fix homepage + subfolder installs

* #6784 fixes suburls as well (ex. /tags/x and /groups/y)

* #6784 more elegant solution @pitaj

and the last time I touch this function, lol

* #6784 regis, final answer

I lied in that last commit
v1.18.x
Andrew Rodrigues 6 years ago committed by Barış Soner Uşaklı
parent 325b0293b8
commit 7fb29f4272

@ -283,12 +283,12 @@ app.cacheBuster = null;
}; };
function highlightNavigationLink() { function highlightNavigationLink() {
var path = window.location.pathname + window.location.search; $('#main-nav li')
$('#main-nav li').removeClass('active'); .removeClass('active')
if (path) { .find('a')
$('#main-nav li').removeClass('active').find('a[href="' + path + '"]').parent() .filter(function (i, x) { return window.location.pathname.startsWith(x.getAttribute('href')); })
.addClass('active'); .parent()
} .addClass('active');
} }
app.createUserTooltips = function (els, placement) { app.createUserTooltips = function (els, placement) {

Loading…
Cancel
Save