clockech-script
Advanced tools
Comparing version 2.1.5 to 2.1.6
17
index.js
@@ -39,3 +39,18 @@ !(function () { | ||
window.addEventListener("beforeunload", function (e) { | ||
const data = { | ||
id, | ||
last_click: new Date().toISOString(), | ||
}; | ||
fetch(api + "/api/update", { | ||
method: "PUT", | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
body: JSON.stringify(data), | ||
}) | ||
.then((response) => response.json()) | ||
.catch((error) => { | ||
console.error("Error on send data:", error); | ||
}); | ||
}); | ||
@@ -42,0 +57,0 @@ |
{ | ||
"name": "clockech-script", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "Clockech script for tracking analytics", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
206720
4973
3