diff options
| author | Michael Howell <michael@notriddle.com> | 2022-10-11 08:50:41 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-10-11 08:50:41 -0700 |
| commit | b5963f07e611cf2a09a310eb74c1a93adfaeb9de (patch) | |
| tree | 565a8748979e254bae7f22049a4b93fa5f5e83a7 /src/librustdoc/html/static/js/main.js | |
| parent | bb93450ec4af83c20e9ba6c8e575aca55423001a (diff) | |
| download | rust-b5963f07e611cf2a09a310eb74c1a93adfaeb9de.tar.gz rust-b5963f07e611cf2a09a310eb74c1a93adfaeb9de.zip | |
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.
Diffstat (limited to 'src/librustdoc/html/static/js/main.js')
| -rw-r--r-- | src/librustdoc/html/static/js/main.js | 8 |
1 files changed, 3 insertions, 5 deletions
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); |
