mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-12 01:50:52 +01: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.map": "assets/javascripts/bundle.d23ec273.min.js.map",
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.f0e39e8b.min.js",
|
||||
"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.map": "assets/javascripts/vendor.11f47dfd.min.js.map",
|
||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.fae956e7.min.js",
|
||||
|
@ -183,7 +183,7 @@
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<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 = {} -%}
|
||||
{%- for key in [
|
||||
"clipboard.copy",
|
||||
|
@ -23,7 +23,6 @@
|
||||
import { EMPTY, Observable, noop, of } from "rxjs"
|
||||
import {
|
||||
concatMap,
|
||||
filter,
|
||||
map,
|
||||
skip,
|
||||
switchMap,
|
||||
@ -74,7 +73,6 @@ export function patchScripts(
|
||||
els$
|
||||
.pipe(
|
||||
switchMap(els => of(...els)),
|
||||
filter(el => !!el.src || /(^|\/javascript)$/i.test(el.type)),
|
||||
concatMap(el => {
|
||||
const script = createElement("script")
|
||||
if (el.src) {
|
||||
@ -83,9 +81,7 @@ export function patchScripts(
|
||||
|
||||
/* Complete when script is loaded */
|
||||
return new Observable(observer => {
|
||||
script.onload = () => {
|
||||
observer.complete()
|
||||
}
|
||||
script.onload = () => observer.complete()
|
||||
})
|
||||
|
||||
/* Complete immediately */
|
||||
|
Loading…
Reference in New Issue
Block a user