diff --git a/extension/script/docs-rs.css b/extension/script/docs-rs.css index 649c861..9235fb2 100644 --- a/extension/script/docs-rs.css +++ b/extension/script/docs-rs.css @@ -63,6 +63,7 @@ div.nav-container form.landing-search-form-nav { border-left: solid #bbb 1px; padding-left: 10px; max-width: 320px; + min-width: 120px; } .rse-doc-toc-item { diff --git a/extension/script/docs-rs.js b/extension/script/docs-rs.js index a246561..9deb187 100644 --- a/extension/script/docs-rs.js +++ b/extension/script/docs-rs.js @@ -11,7 +11,7 @@ let installedVersion = undefined; // Highlight the TOC function highlight() { - let headers = Array.from(document.querySelectorAll("#main>.docblock>.section-header")) + let headers = Array.from(document.querySelectorAll("#main .docblock .section-header")) .filter(header => ["H1", "H2", "H3"].includes(header.tagName)); const scrollHandler = entries => { entries.forEach(entry => { @@ -36,7 +36,7 @@ function highlight() { // Show TOC of docs.rs document.addEventListener("DOMContentLoaded", () => { - let headers = Array.from(document.querySelectorAll("#main>.docblock>.section-header")) + let headers = Array.from(document.querySelectorAll("#main .docblock .section-header")) .filter(header => ["H1", "H2", "H3"].includes(header.tagName)); if (!headers || headers.length < 3) { // Don't show TOC if headers less than 3.