mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed race condition in instant loading
This commit is contained in:
parent
4e72d31043
commit
6d6811451b
File diff suppressed because one or more lines are too long
2
material/assets/javascripts/bundle.882d8593.min.js
vendored
Normal file
2
material/assets/javascripts/bundle.882d8593.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.1b3af799.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.1b3af799.min.js.map",
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.882d8593.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.882d8593.min.js.map",
|
||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.877163d5.min.js",
|
||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.877163d5.min.js.map",
|
||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.a68abb33.min.js",
|
||||
|
@ -183,7 +183,7 @@
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/vendor.877163d5.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.1b3af799.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.882d8593.min.js' | url }}"></script>
|
||||
{%- set translations = {} -%}
|
||||
{%- for key in [
|
||||
"clipboard.copy",
|
||||
|
@ -2,5 +2,5 @@
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% set analytics = config.google_analytics %}
|
||||
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","{{ analytics[0] }}","{{ analytics[1] }}"),ga("set","anonymizeIp",!0),ga("send","pageview"),document.addEventListener("DOMContentLoaded",function(){document.forms.search&&document.forms.search.query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}),document.addEventListener("DOMContentSwitch",function(){ga("send","pageview",{title:document.title,location:document.location})})</script>
|
||||
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","{{ analytics[0] }}","{{ analytics[1] }}"),ga("set","anonymizeIp",!0),ga("send","pageview"),document.addEventListener("DOMContentLoaded",function(){document.forms.search&&document.forms.search.query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}),document.addEventListener("DOMContentSwitch",function(){ga("send","pageview")})</script>
|
||||
<script async src="https://www.google-analytics.com/analytics.js"></script>
|
||||
|
@ -229,7 +229,6 @@ export function setupInstantLoading(
|
||||
withLatestFrom(document$)
|
||||
)
|
||||
.subscribe(([, { title, head }]) => {
|
||||
document.dispatchEvent(new CustomEvent("DOMContentSwitch"))
|
||||
document.title = title
|
||||
|
||||
/* Replace meta tags */
|
||||
@ -247,6 +246,9 @@ export function setupInstantLoading(
|
||||
replaceElement(prev, next)
|
||||
}
|
||||
}
|
||||
|
||||
/* Finished, dispatch document switch event */
|
||||
document.dispatchEvent(new CustomEvent("DOMContentSwitch"))
|
||||
})
|
||||
|
||||
/* Debounce update of viewport offset */
|
||||
|
@ -48,10 +48,7 @@
|
||||
|
||||
/* Send page view on document switch (instant loading, custom event) */
|
||||
document.addEventListener("DOMContentSwitch", function() {
|
||||
ga("send", "pageview", {
|
||||
title: document.title,
|
||||
location: document.location
|
||||
})
|
||||
ga("send", "pageview")
|
||||
})
|
||||
</script>
|
||||
<script async src="https://www.google-analytics.com/analytics.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user