Created
June 15, 2023 11:21
-
-
Save tecteun/319a81fd77df7152ca38398dd92eefde to your computer and use it in GitHub Desktop.
get ip js
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
var now = Date.now(); | |
var s = document.createElement('script'); s.onload = s.onerror = () => s.parentElement.removeChild(s); | |
window[`_ip_${now}`] = (_) => console.log(_.data.ip); | |
s.src = `https://stat.ripe.net/data/whats-my-ip/data.json?callback=_ip_${now}`; | |
document.body.appendChild(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment