From b5963f07e611cf2a09a310eb74c1a93adfaeb9de Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 11 Oct 2022 08:50:41 -0700 Subject: rustdoc: remove unused classes from sidebar Since 98f05a0282625a5fda6e90ebf3b05a4bd7608f65 removed separate colors from the currently-selected item, there's no need to have item classes on sidebar links. --- src/librustdoc/html/static/js/main.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/librustdoc/html') diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 0180c0ead8d..dc5b8acdf53 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -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); -- cgit 1.4.1-3-g733a5