@honeypot-run/core
Advanced tools
Comparing version
@@ -115,2 +115,3 @@ "use strict"; | ||
return new Promise((resolve) => { | ||
var _a; | ||
const script = document.createElement('script'); | ||
@@ -131,2 +132,13 @@ script.async = true; | ||
try { | ||
if (window.honeypot && Array.isArray(window.honeypot.q)) { | ||
const eventNames = window.honeypot.q.map((event) => event[0]); | ||
scriptUrl.searchParams.append('events', JSON.stringify(eventNames)); | ||
} | ||
} | ||
catch (error) { | ||
if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.debug) { | ||
console.error("Error appending event names to the script URL:", error); | ||
} | ||
} | ||
try { | ||
const includeParams = [ | ||
@@ -133,0 +145,0 @@ "hpdebug", |
@@ -112,2 +112,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new Promise((resolve) => { | ||
var _a; | ||
const script = document.createElement('script'); | ||
@@ -128,2 +129,13 @@ script.async = true; | ||
try { | ||
if (window.honeypot && Array.isArray(window.honeypot.q)) { | ||
const eventNames = window.honeypot.q.map((event) => event[0]); | ||
scriptUrl.searchParams.append('events', JSON.stringify(eventNames)); | ||
} | ||
} | ||
catch (error) { | ||
if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.debug) { | ||
console.error("Error appending event names to the script URL:", error); | ||
} | ||
} | ||
try { | ||
const includeParams = [ | ||
@@ -130,0 +142,0 @@ "hpdebug", |
@@ -5,3 +5,3 @@ { | ||
"author": "https://honeypot.run", | ||
"version": "0.2.44", | ||
"version": "0.2.45", | ||
"license": "BUSL-1.1", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
26106
4.46%668
3.73%