about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/main.js
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2024-09-02 19:42:28 -0700
committerMichael Howell <michael@notriddle.com>2024-09-10 17:56:06 -0700
commit5b1b2e97e36c4966b9c6c30d5679f6da76503fc7 (patch)
treec547e08dcc1f152f023b0b308fb87964f7926fb4 /src/librustdoc/html/static/js/main.js
parentd05323c7b4ebeaeaffe3ea8e0d02a8b01db67ddd (diff)
downloadrust-5b1b2e97e36c4966b9c6c30d5679f6da76503fc7.tar.gz
rust-5b1b2e97e36c4966b9c6c30d5679f6da76503fc7.zip
rustdoc: make the header show all three buttons
This tweaks it to use less space for the breadcrumbs.
Diffstat (limited to 'src/librustdoc/html/static/js/main.js')
-rw-r--r--src/librustdoc/html/static/js/main.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js
index 53326f0fcad..3e8c903afcb 100644
--- a/src/librustdoc/html/static/js/main.js
+++ b/src/librustdoc/html/static/js/main.js
@@ -19,6 +19,10 @@ function resourcePath(basename, extension) {
 
 function hideMain() {
     addClass(document.getElementById(MAIN_ID), "hidden");
+    const toggle = document.getElementById("toggle-all-docs");
+    if (toggle) {
+        toggle.setAttribute("disabled", "disabled");
+    }
 }
 
 function showMain() {
@@ -31,6 +35,10 @@ function showMain() {
         }
         mainHeading.appendChild(searchState.rustdocToolbar);
     }
+    const toggle = document.getElementById("toggle-all-docs");
+    if (toggle) {
+        toggle.removeAttribute("disabled");
+    }
 }
 
 window.rootPath = getVar("root-path");