From 0c61f58c11742452d2f51a893eb27e002f35667e Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 14 Apr 2023 16:09:20 -0700 Subject: [PATCH] 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 --- src/librustdoc/html/static/js/main.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 6f5987e68bf1c..93d657fd60509 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();