about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-04-14 16:09:20 -0700
committerMichael Howell <michael@notriddle.com>2023-04-15 13:15:48 -0700
commit0c61f58c11742452d2f51a893eb27e002f35667e (patch)
tree197ce1012b13a34238065ea0c9249a8714891d8d /src
parent84dd17b56a931a631a23dfd5ef2018fd3ef49108 (diff)
downloadrust-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.js6
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();