mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed sequential execution of scripts when using instant loading
This commit is contained in:
parent
9ab9508f9b
commit
935c384789
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
material/assets/javascripts/bundle.f0e39e8b.min.js.map
Normal file
1
material/assets/javascripts/bundle.f0e39e8b.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.d23ec273.min.js",
|
"assets/javascripts/bundle.js": "assets/javascripts/bundle.f0e39e8b.min.js",
|
||||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.d23ec273.min.js.map",
|
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.f0e39e8b.min.js.map",
|
||||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.11f47dfd.min.js",
|
"assets/javascripts/vendor.js": "assets/javascripts/vendor.11f47dfd.min.js",
|
||||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.11f47dfd.min.js.map",
|
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.11f47dfd.min.js.map",
|
||||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.fae956e7.min.js",
|
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.fae956e7.min.js",
|
||||||
|
@ -183,7 +183,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/vendor.11f47dfd.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/vendor.11f47dfd.min.js' | url }}"></script>
|
||||||
<script src="{{ 'assets/javascripts/bundle.d23ec273.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.f0e39e8b.min.js' | url }}"></script>
|
||||||
{%- set translations = {} -%}
|
{%- set translations = {} -%}
|
||||||
{%- for key in [
|
{%- for key in [
|
||||||
"clipboard.copy",
|
"clipboard.copy",
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
import { EMPTY, Observable, noop, of } from "rxjs"
|
import { EMPTY, Observable, noop, of } from "rxjs"
|
||||||
import {
|
import {
|
||||||
concatMap,
|
concatMap,
|
||||||
filter,
|
|
||||||
map,
|
map,
|
||||||
skip,
|
skip,
|
||||||
switchMap,
|
switchMap,
|
||||||
@ -74,7 +73,6 @@ export function patchScripts(
|
|||||||
els$
|
els$
|
||||||
.pipe(
|
.pipe(
|
||||||
switchMap(els => of(...els)),
|
switchMap(els => of(...els)),
|
||||||
filter(el => !!el.src || /(^|\/javascript)$/i.test(el.type)),
|
|
||||||
concatMap(el => {
|
concatMap(el => {
|
||||||
const script = createElement("script")
|
const script = createElement("script")
|
||||||
if (el.src) {
|
if (el.src) {
|
||||||
@ -83,9 +81,7 @@ export function patchScripts(
|
|||||||
|
|
||||||
/* Complete when script is loaded */
|
/* Complete when script is loaded */
|
||||||
return new Observable(observer => {
|
return new Observable(observer => {
|
||||||
script.onload = () => {
|
script.onload = () => observer.complete()
|
||||||
observer.complete()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/* Complete immediately */
|
/* Complete immediately */
|
||||||
|
Loading…
Reference in New Issue
Block a user