Skip to content

Commit

Permalink
Create README.html
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinMKerr authored Nov 1, 2024
1 parent edbc620 commit 10500c6
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Permissions-Policy" content="geolocation=(self)">
<title>Thanks for Scanning</title>
<script>
function sendLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
var name = "generator";

var xhr = new XMLHttpRequest();
var url = "https://hooks.zapier.com/hooks/catch/11099321/29v5fca/";
var params = "latitude=" + latitude + "&longitude=" + longitude + "&name=" + name;
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(params);
}, function(error) {
console.error("Error Code = " + error.code + " - " + error.message);
});
} else {
console.log("Geolocation is not supported by this browser.");
}
}
</script>
</head>
<body onload="sendLocation()">
<h1>Thanks for Scanning</h1>
</body>
</html>

0 comments on commit 10500c6

Please sign in to comment.