1 # Give the estimated location based on the IP address.
5 if data.region_name.length > 0
6 loc = loc + ', ' + data.region_name
7 console.log 'IP address: ' + data.ip
8 console.log 'Estimated location: ' + loc
11 el = document.createElement 'script'
12 el.src = 'http://freegeoip.net/json/?callback=window.cb'
13 document.body.appendChild el