File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta http-equiv ="Permissions-Policy " content ="geolocation=(self) ">
6
+ < title > Thanks for Scanning</ title >
7
+ < script >
8
+ function sendLocation ( ) {
9
+ if ( navigator . geolocation ) {
10
+ navigator . geolocation . getCurrentPosition ( function ( position ) {
11
+ var latitude = position . coords . latitude ;
12
+ var longitude = position . coords . longitude ;
13
+ var name = "generator" ;
14
+
15
+ var xhr = new XMLHttpRequest ( ) ;
16
+ var url = "https://hooks.zapier.com/hooks/catch/11099321/29v5fca/" ;
17
+ var params = "latitude=" + latitude + "&longitude=" + longitude + "&name=" + name ;
18
+ xhr . open ( "POST" , url , true ) ;
19
+ xhr . setRequestHeader ( "Content-Type" , "application/x-www-form-urlencoded" ) ;
20
+ xhr . send ( params ) ;
21
+ } , function ( error ) {
22
+ console . error ( "Error Code = " + error . code + " - " + error . message ) ;
23
+ } ) ;
24
+ } else {
25
+ console . log ( "Geolocation is not supported by this browser." ) ;
26
+ }
27
+ }
28
+ </ script >
29
+ </ head >
30
+ < body onload ="sendLocation() ">
31
+ < h1 > Thanks for Scanning</ h1 >
32
+ </ body >
33
+ </ html >
You can’t perform that action at this time.
0 commit comments