about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/source-script.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-01-19 22:36:15 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-30 13:12:41 +0200
commit9625ed8be7fa66c3ee5f78180a3d5911817096f6 (patch)
treeeca2280b9a9644ab284bed1e27ec5024b084a6c7 /src/librustdoc/html/static/js/source-script.js
parent76d4862fdd131b6f79dc0a31857f888d26bcdb27 (diff)
downloadrust-9625ed8be7fa66c3ee5f78180a3d5911817096f6.tar.gz
rust-9625ed8be7fa66c3ee5f78180a3d5911817096f6.zip
Move settings into full JS
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
-rw-r--r--src/librustdoc/html/static/js/source-script.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/js/source-script.js b/src/librustdoc/html/static/js/source-script.js
index c48a847665e..6aee0da69f8 100644
--- a/src/librustdoc/html/static/js/source-script.js
+++ b/src/librustdoc/html/static/js/source-script.js
@@ -6,7 +6,7 @@
 /* global search, sourcesIndex */
 
 // Local js definitions:
-/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, searchState */
+/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, browserSupportsHistoryApi */
 /* global updateLocalStorage */
 (function() {
 
@@ -195,7 +195,7 @@ const handleSourceHighlight = (function() {
     const set_fragment = function(name) {
         const x = window.scrollX,
             y = window.scrollY;
-        if (searchState.browserSupportsHistoryApi()) {
+        if (browserSupportsHistoryApi()) {
             history.replaceState(null, null, "#" + name);
             highlightSourceLines();
         } else {