]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: Update document title when displaying search results
authorJohannes Oertel <johannes.oertel@uni-due.de>
Thu, 18 Jun 2015 15:11:44 +0000 (17:11 +0200)
committerJohannes Oertel <johannes.oertel@uni-due.de>
Thu, 18 Jun 2015 16:39:31 +0000 (18:39 +0200)
Fixes #26360.

src/librustdoc/html/static/main.js

index 7f8f40ff08a4d71e108b024adccc00b2b7be80aa..fb8f511795e87d01d084460dd6ebed083b9184bb 100644 (file)
                 return;
             }
 
+            // Update document title to maintain a meaningful browser history
+            $(document).prop("title", "Results for " + query.query + " - Rust");
+
             // Because searching is incremental by character, only the most
             // recent search query is added to the browser history.
             if (browserSupportsHistoryApi()) {