Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehook authored May 5, 2022
1 parent b942b2d commit cff9649
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,5 @@ <h2>My name is Luke Hook</h2>

<p>It will also serve as my online CV - because why not.</p>

<p>If for some peculiar reason you're unsure where you're browsing from - click the button below to find out.</p>

<button onclick="check()">Click me</button>

<p id="result"></p>
<script type="text/javascript">
check = async () => fetch("/api/ip").then(r=>r.json()).then(data => {
const country = data.countryCode;
const ip = data.connectingIP;
document.getElementById("result").textContent = `You are currently browsing from IP ${ip} in ${country}.`;
});
</script>
</body>
</html>

0 comments on commit cff9649

Please sign in to comment.