Update donate.html
This commit is contained in:
parent
5ea303bc42
commit
4345020b72
|
@ -15,12 +15,16 @@
|
|||
<p id="location">Loading location...</p>
|
||||
</div>
|
||||
|
||||
<script src="https://api.ipdata.co/?api-key=008abb2ebdef31a11d5ce7693ce42de5a69a66af1e88699a327820b8"></script>
|
||||
<script>
|
||||
var ip = ipdata.ip;
|
||||
var location = ipdata.city + ", " + ipdata.region + ", " + ipdata.country_name;
|
||||
fetch("https://api.ipdata.co?api-key=008abb2ebdef31a11d5ce7693ce42de5a69a66af1e88699a327820b8")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
var ip = data.ip;
|
||||
var location = data.city + ", " + data.region + ", " + data.country_name;
|
||||
document.getElementById("ip").innerHTML = "Your IP address: " + ip;
|
||||
document.getElementById("location").innerHTML = "Your location: " + location;
|
||||
})
|
||||
.catch(error => console.log(error));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue