mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed search index being loaded when search is disabled
This commit is contained in:
parent
f05c34e30d
commit
5a510cedb3
File diff suppressed because one or more lines are too long
7
material/assets/javascripts/bundle.9b151c6a.min.js.map
Normal file
7
material/assets/javascripts/bundle.9b151c6a.min.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -217,7 +217,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.da29d79a.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.9b151c6a.min.js' | url }}"></script>
|
||||||
{% for path in config["extra_javascript"] %}
|
{% for path in config["extra_javascript"] %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import "focus-visible"
|
import "focus-visible"
|
||||||
import { Subject, defer, merge } from "rxjs"
|
import { NEVER, Subject, defer, merge } from "rxjs"
|
||||||
import {
|
import {
|
||||||
delay,
|
delay,
|
||||||
filter,
|
filter,
|
||||||
@ -91,11 +91,13 @@ const tablet$ = watchMedia("(min-width: 960px)")
|
|||||||
const screen$ = watchMedia("(min-width: 1220px)")
|
const screen$ = watchMedia("(min-width: 1220px)")
|
||||||
const print$ = watchPrint()
|
const print$ = watchPrint()
|
||||||
|
|
||||||
/* Retrieve search index */
|
/* Retrieve search index, if search is enabled */
|
||||||
const config = configuration()
|
const config = configuration()
|
||||||
const index$ = __search?.index || requestJSON<SearchIndex>(
|
const index$ = document.forms.namedItem("search")
|
||||||
`${config.base}/search/search_index.json`
|
? __search?.index || requestJSON<SearchIndex>(
|
||||||
)
|
`${config.base}/search/search_index.json`
|
||||||
|
)
|
||||||
|
: NEVER
|
||||||
|
|
||||||
/* Set up Clipboard.js integration */
|
/* Set up Clipboard.js integration */
|
||||||
const alert$ = new Subject<string>()
|
const alert$ = new Subject<string>()
|
||||||
|
Loading…
Reference in New Issue
Block a user