mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed use of arrow function in inline JavaScript for overrides
This commit is contained in:
parent
7b3ad8c7de
commit
95cc609087
@ -53,15 +53,5 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block analytics %}
|
{% block analytics %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script>
|
<script>document.addEventListener("DOMContentLoaded",function(){document.body.addEventListener("click",function(e){if(e.target instanceof HTMLElement){var t=e.target.closest("a[href^=http]");t&&ga("send","event","outbound","click",t.href)}})})</script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
|
||||||
document.body.addEventListener("click", ev => {
|
|
||||||
if (ev.target instanceof HTMLElement) {
|
|
||||||
var el = ev.target.closest("a[href^=http]")
|
|
||||||
if (el)
|
|
||||||
ga("send", "event", "outbound", "click", el.href)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
<!-- Track external links -->
|
<!-- Track external links -->
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
document.body.addEventListener("click", ev => {
|
document.body.addEventListener("click", function(ev) {
|
||||||
if (ev.target instanceof HTMLElement) {
|
if (ev.target instanceof HTMLElement) {
|
||||||
var el = ev.target.closest("a[href^=http]")
|
var el = ev.target.closest("a[href^=http]")
|
||||||
if (el)
|
if (el)
|
||||||
|
Loading…
Reference in New Issue
Block a user