rustdoc: remove unused classes from sidebar
Since 98f05a0282
removed separate colors
from the currently-selected item, there's no need to have item classes on
sidebar links.
This commit is contained in:
parent
bb93450ec4
commit
b5963f07e6
3 changed files with 67 additions and 69 deletions
|
@ -451,7 +451,6 @@ function loadCss(cssFileName) {
|
|||
const name = item[0];
|
||||
const desc = item[1]; // can be null
|
||||
|
||||
let klass = shortty;
|
||||
let path;
|
||||
if (shortty === "mod") {
|
||||
path = name + "/index.html";
|
||||
|
@ -459,13 +458,12 @@ function loadCss(cssFileName) {
|
|||
path = shortty + "." + name + ".html";
|
||||
}
|
||||
const current_page = document.location.href.split("/").pop();
|
||||
if (path === current_page) {
|
||||
klass += " current";
|
||||
}
|
||||
const link = document.createElement("a");
|
||||
link.href = path;
|
||||
link.title = desc;
|
||||
link.className = klass;
|
||||
if (path === current_page) {
|
||||
link.className = "current";
|
||||
}
|
||||
link.textContent = name;
|
||||
const li = document.createElement("li");
|
||||
li.appendChild(link);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue