goatCounter: suppress some errors when script is blocked by some adblocker

This commit is contained in:
He4eT 2021-07-19 17:47:12 +05:00
commit 204a513a9a

View file

@ -31,6 +31,8 @@
<script>
window.goatcounter = { no_onload: true }
window.addEventListener('hashchange', _ => {
if (!window.goatcounter.count) return void null
window.goatcounter.count({
path: location.pathname + location.hash
})