From 2fd2ed966dd2c3ad7526de55b69feac5df3cab69 Mon Sep 17 00:00:00 2001 From: s1n Date: Mon, 30 Sep 2019 21:28:34 -0700 Subject: test if ip detect works --- ip-detection/js/main.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 ip-detection/js/main.js (limited to 'ip-detection/js') diff --git a/ip-detection/js/main.js b/ip-detection/js/main.js new file mode 100644 index 0000000..9f6c6ec --- /dev/null +++ b/ip-detection/js/main.js @@ -0,0 +1,5 @@ +$.get("http://ipinfo.io", function (response) { + $("#ip").html("IP: " + response.ip); + $("#address").html("Location: " + response.city + ", " + response.region); + $("#details").html(JSON.stringify(response, null, 4)); +}, "jsonp"); \ No newline at end of file -- cgit v1.2.3