Skip to content

Commit

Permalink
Revert "Load search index for rustc"
Browse files Browse the repository at this point in the history
  • Loading branch information
Folyd committed Jun 22, 2024
1 parent a14ac8e commit a6983ae
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions extension/script/add-search-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a6983ae

Please sign in to comment.