about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-05-19 14:16:22 -0600
committerGitHub <noreply@github.com>2017-05-19 14:16:22 -0600
commitf3b7b61151f47ce0769cf48cbc4555421fb3e5d1 (patch)
treea93a80b3ead4ad0f18c4fce6102d5f4414ad4bd8
parent4c2273a0815f715437b76786a2e9946abce03728 (diff)
parent1eb6639508ce6874e4d5dbdb02dbb6111565d902 (diff)
downloadrust-f3b7b61151f47ce0769cf48cbc4555421fb3e5d1.tar.gz
rust-f3b7b61151f47ce0769cf48cbc4555421fb3e5d1.zip
Rollup merge of #42080 - pravic:jquery-removal-fix, r=frewsxcv
Fix regression introduced by jQuery removal

Fixes #42078.
Follows #41307.

r? @steveklabnik
cc @frewsxcv
-rw-r--r--src/librustdoc/html/static/main.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index c115a6ccba6..f09ce1cc648 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -215,14 +215,14 @@
         } else if (ev.target.tagName === 'SPAN' && hasClass(ev.target.parentNode, 'line-numbers')) {
             var prev_id = 0;
 
-            function set_fragment(name) {
+            var set_fragment = function (name) {
                 if (browserSupportsHistoryApi()) {
                     history.replaceState(null, null, '#' + name);
                     window.hashchange();
                 } else {
                     location.replace('#' + name);
                 }
-            }
+            };
 
             var cur_id = parseInt(ev.target.id, 10);
 
@@ -685,7 +685,7 @@
         }
 
         function escape(content) {
-            let h1 = document.createElement('h1');
+            var h1 = document.createElement('h1');
             h1.textContent = content;
             return h1.innerHTML;
         }