From 8bf5d27edfae120205dbf33005719aee5696ff12 Mon Sep 17 00:00:00 2001 From: Adriaan <1079135+adriaandotcom@users.noreply.github.com> Date: Wed, 25 Jun 2025 01:19:27 +0200 Subject: [PATCH] fix auto events callback href --- dist/latest/auto-events.js | 4 ++-- src/auto-events.js | 6 ++++-- test/unit/auto-events.test.js | 27 +++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/dist/latest/auto-events.js b/dist/latest/auto-events.js index d365713..b702851 100644 --- a/dist/latest/auto-events.js +++ b/dist/latest/auto-events.js @@ -1,4 +1,4 @@ -/* Simple Analytics - Privacy-first analytics (docs.simpleanalytics.com/script; 2025-06-24; 7048; v12) */ +/* Simple Analytics - Privacy-first analytics (docs.simpleanalytics.com/script; 2025-06-24; 9e4f; v12) */ -function r(t,e){var a,n;t.hasAttribute("data-simple-event")||(a=!1,h.downloads&&/^https?:\/\//i.test(t.href)&&new RegExp("\\.("+(h.downloadsExtensions||[]).join("|")+")$","i").test(t.pathname)?a="download":h.outbound&&/^https?:\/\//i.test(t.href)&&t.hostname!==m.location.hostname?a="outbound":h.emails&&/^mailto:/i.test(t.href)&&(a="email"),a&&(e?(n="saAutomatedLink(this, '"+a+"');",t.hasAttribute("target")&&"_self"!==t.getAttribute("target")||(n+=" return false;"),t.setAttribute("onclick",n)):t.addEventListener("click",function(){g(t,a)})))}function e(){try{for(var t=document.getElementsByTagName("a"),e=0;e { + expect(events[0]).to.deep.include({ name: "outbound_example_com" }); + done(); + }, 5); + }); });