diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-04-25 14:34:16 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-04-25 14:50:02 +0200 |
| commit | 33a70981e29119a6fbf22bdca8716825253f5c85 (patch) | |
| tree | 5ddacd38ff59d06054431aa80fd2de652242a22b /src | |
| parent | 13a2615883aa28433383a723a764ca9acb43fd48 (diff) | |
| download | rust-33a70981e29119a6fbf22bdca8716825253f5c85.tar.gz rust-33a70981e29119a6fbf22bdca8716825253f5c85.zip | |
Open all impl blocks by default
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/static/main.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 2e3e148eaf6..707eb5a664b 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -1422,11 +1422,13 @@ function hideThemeButtonState() { // errors in mobile browsers). if (e.tagName === "H2" || e.tagName === "H3") { var nextTagName = e.nextElementSibling.tagName; - if (nextTagName == "H2" || nextTagName == "H3") { + if (nextTagName === "H2" || nextTagName === "H3") { e.nextElementSibling.style.display = "flex"; - } else { + } else if (nextTagName !== "DETAILS") { e.nextElementSibling.style.display = "block"; } + } else if (e.tagName === "DETAILS") { + e.open = true; } }); } |
