Fix releases tab not being selected in some cases

This commit is contained in:
Shadowfacts 2016-09-10 09:33:30 -04:00
parent 7ed54d16cf
commit bdf10f3999
No known key found for this signature in database
GPG Key ID: F802198A7D7F309D
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ let repoUrl = $("div.repohead-details-container > h1.public > strong[itemprop=na
}
});
if (location.pathname.endsWith("/releases")) {
let pathParts = location.pathname.split("/");
if (pathParts[pathParts.length - 1] == "releases" || pathParts[pathParts.length - 1] == "tags" || pathParts[pathParts.length - 2] == "releases" || pathParts[pathParts.length - 3] == "releases") {
$("nav.reponav > span:first > a").removeClass("selected");
releasesTab.addClass("selected");
}