Fixed use of arrow function in inline JavaScript for overrides

This commit is contained in:
squidfunk 2020-08-23 17:20:09 +02:00
parent 7b3ad8c7de
commit 95cc609087
2 changed files with 2 additions and 12 deletions

View File

@ -53,15 +53,5 @@
{% endblock %}
{% block analytics %}
{{ super() }}
<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>
<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>
{% endblock %}

View File

@ -99,7 +99,7 @@
<!-- Track external links -->
<script>
document.addEventListener("DOMContentLoaded", function() {
document.body.addEventListener("click", ev => {
document.body.addEventListener("click", function(ev) {
if (ev.target instanceof HTMLElement) {
var el = ev.target.closest("a[href^=http]")
if (el)