Created
September 13, 2024 13:55
-
-
Save mccombs/f9d97b9a3221fc6e0bd6564f7a82e121 to your computer and use it in GitHub Desktop.
PingPong
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="js" defer> | |
let referrer = document.referrer; | |
let location = window.location; | |
let userAgent = navigator.userAgent; | |
let userAgentData = navigator.userAgentData; | |
console.log(location, userAgent, userAgentData); | |
let person = { | |
referrer: referrer, | |
location: location, | |
ua: navigator.userAgent, | |
uad: navigator.userAgentData, | |
}; | |
await fetch("https://api.ipify.org?format=json").then((res) => { | |
res.json().then((data) => { | |
person.ip = data.ip; | |
}); | |
}); | |
console.log(person); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment