Open the
$HOME/Library/Widgets/iStat Pro.wdgt/scripts/core.js
script in a text editor, find the
getExtIP()
function and replace the following line:
ipURL = 'http://whatsmyip.islayer.com/?random='+new Date().getTime();
with this (or a similiar "what's my ip" service URL):
ipURL = 'http://www.whatsmyip.us/showipsimple.php?random='+new Date().getTime();
And the following:
if(extIP.length < 20 && ipConnection.status == 200 && extIP.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)){
With these:
ip_regex = "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}";
if(extIP.length < 100000 && ipConnection.status == 200 && extIP.match(new RegExp(ip_regex))){
extIP = extIP.replace(new RegExp("^(.*[^\\d])?(" + ip_regex + ")([^\\d].*)?$"), "$2");
This patch lets you use quite many "what's my IP" services since the the script will take the first IP looking string from the result of the HTTP request.
Recent comments
2 years 29 weeks ago
3 years 50 weeks ago
3 years 50 weeks ago
4 years 4 days ago
4 years 1 week ago
4 years 8 weeks ago
4 years 8 weeks ago
4 years 8 weeks ago
4 years 8 weeks ago
4 years 8 weeks ago