Update donate.html

This commit is contained in:
Adil Sadqi 2023-04-01 20:08:31 +00:00 committed by GitHub
parent 5ea303bc42
commit 4345020b72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions

View File

@ -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>