diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-05-03 14:58:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-03 14:58:56 +0900 |
| commit | 27d7615bb4f20cd3546bf98d7ad2f812d5dc4e3c (patch) | |
| tree | fee4c92152fc9539f06c3f5d0a58115f3159e061 /src/librustdoc/html/static/js/source-script.js | |
| parent | c110cfa161aab391bd37c16a95b8330bfc7e54ce (diff) | |
| parent | 73688e40216f72a57577b39acfb9180322a41362 (diff) | |
| download | rust-27d7615bb4f20cd3546bf98d7ad2f812d5dc4e3c.tar.gz rust-27d7615bb4f20cd3546bf98d7ad2f812d5dc4e3c.zip | |
Rollup merge of #93097 - GuillaumeGomez:settings-js, r=jsha
Switch settings menu to full js Since the settings can only be set when the JS is enabled, it's not really a problem. It also fixes a debate we had around the themes not being accessible easily before.  You can test it [here](https://rustdoc.crud.net/imperio/settings-js/doc/foo/index.html). r? ``@jsha``
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
| -rw-r--r-- | src/librustdoc/html/static/js/source-script.js | 4 |
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 { |
