Adding a Geolocator to Whois

159 views
Skip to first unread message

R3bify

unread,
Feb 16, 2014, 12:15:47 PM2/16/14
to ajax...@googlegroups.com
I added this functionality to my chat, I thought maybe others would like it as well.

in the file chat/js/chat.js
Find:
replaceCommandWhois: function(textParts) {
return '<span class="chatBotMessage">'
+ this.lang['whois'].replace(/%s/, textParts[1]) + ' '
+ textParts[2]
+ '</span>';
},

and change it to:
replaceCommandWhois: function(textParts) {
return '<span class="chatBotMessage">'
+ this.lang['whois'].replace(/%s/, textParts[1]) + ' '
+ '<a title="Geolocation" target="_blank" href="http://www.infosniper.net/index.php?ip_address=' + textParts[2] + '">'
+ textParts[2]
+ '</a>'
+ '</span>';
},

I picked a free geolocation service that has (seemingly) unlimited free use. And shows location on Google Maps. 

Frug

unread,
Feb 16, 2014, 12:41:26 PM2/16/14
to ajax...@googlegroups.com
nice
Reply all
Reply to author
Forward
0 new messages