From a6983ae342568fb3ab8ecb312fcce584257e66a1 Mon Sep 17 00:00:00 2001 From: Folyd Date: Fri, 21 Jun 2024 22:53:30 -0700 Subject: [PATCH] Revert "Load search index for rustc" abc2ec49a9ef388bffc88a955cad9fccd538e10c --- extension/script/add-search-index.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/extension/script/add-search-index.js b/extension/script/add-search-index.js index 280339ce..e3479882 100644 --- a/extension/script/add-search-index.js +++ b/extension/script/add-search-index.js @@ -85,22 +85,15 @@ } if (searchIndexJs) { - if (location.pathname.startsWith("/nightly/nightly-rustc/")) { - loadSearchIndex("/nightly/nightly-rustc/search-index.js"); - } else { - loadSearchIndex(searchIndexJs); - } + let script = document.createElement('script'); + script.src = searchIndexJs; + script.onload = sendSearchIndex; + document.head.append(script); } else { console.error("Sorry, no search index found."); } } - function loadSearchIndex(searchIndexJs) { - let script = document.createElement('script'); - script.src = searchIndexJs; - script.onload = sendSearchIndex; - document.head.append(script); - } // [rustdoc] Use Map instead of Object for source files and search index #118910 // https://github.com/rust-lang/rust/pull/118910