diff options
| author | Michael Howell <michael@notriddle.com> | 2023-04-14 16:09:20 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-04-15 13:15:48 -0700 |
| commit | 0c61f58c11742452d2f51a893eb27e002f35667e (patch) | |
| tree | 197ce1012b13a34238065ea0c9249a8714891d8d /src | |
| parent | 84dd17b56a931a631a23dfd5ef2018fd3ef49108 (diff) | |
| download | rust-0c61f58c11742452d2f51a893eb27e002f35667e.tar.gz rust-0c61f58c11742452d2f51a893eb27e002f35667e.zip | |
rustdoc: stop passing a title to `replaceState` second argument
As described on [MDN's replaceState page], this parameter is not currently used, and the empty string is "safe against future changes to the method." [MDN's replaceState page]: https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/static/js/main.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 6f5987e68bf..93d657fd605 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -275,8 +275,7 @@ function preLoadCss(cssUrl) { document.title = searchState.titleBeforeSearch; // We also remove the query parameter from the URL. if (browserSupportsHistoryApi()) { - history.replaceState(null, window.currentCrate + " - Rust", - getNakedUrl() + window.location.hash); + history.replaceState(null, "", getNakedUrl() + window.location.hash); } }, getQueryStringParams: () => { @@ -378,8 +377,7 @@ function preLoadCss(cssUrl) { searchState.clearInputTimeout(); switchDisplayedElement(null); if (browserSupportsHistoryApi()) { - history.replaceState(null, window.currentCrate + " - Rust", - getNakedUrl() + window.location.hash); + history.replaceState(null, "", getNakedUrl() + window.location.hash); } ev.preventDefault(); searchState.defocus(); |
