mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Formatting
This commit is contained in:
parent
de46c4153b
commit
c7bde2d3ff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -249,7 +249,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.cee5e008.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.553b3b51.min.js' | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
{{ script | script_tag }}
|
||||
{% endfor %}
|
||||
|
@ -168,7 +168,7 @@ function resolve(document: Document): Observable<Document> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a map of head elements for lookup and replacement
|
||||
* Inject the contents of a document into the current one
|
||||
*
|
||||
* @param next - Next document
|
||||
*
|
||||
@ -327,8 +327,8 @@ export function setupInstantNavigation(
|
||||
// that are not needed anymore, e.g., when the user clicks multiple links in
|
||||
// quick succession or on slow connections. If the request fails for some
|
||||
// reason, we fall back and use regular navigation, forcing a reload.
|
||||
const document$ = location$
|
||||
.pipe(
|
||||
const document$ =
|
||||
location$.pipe(
|
||||
distinctUntilKeyChanged("pathname"),
|
||||
switchMap(url => requestHTML(url, { progress$ })
|
||||
.pipe(
|
||||
@ -421,15 +421,14 @@ export function setupInstantNavigation(
|
||||
// and forth between pages. Note that this must be debounced and cannot be
|
||||
// done in popstate, as popstate has already removed the entry from the
|
||||
// history, which means it is too late.
|
||||
viewport$
|
||||
.pipe(
|
||||
distinctUntilKeyChanged("offset"),
|
||||
debounceTime(100)
|
||||
)
|
||||
.subscribe(({ offset }) => {
|
||||
history.replaceState(offset, "")
|
||||
})
|
||||
viewport$.pipe(
|
||||
distinctUntilKeyChanged("offset"),
|
||||
debounceTime(100)
|
||||
)
|
||||
.subscribe(({ offset }) => {
|
||||
history.replaceState(offset, "")
|
||||
})
|
||||
|
||||
// Return document
|
||||
// Return document observable
|
||||
return document$
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user