Monitor external ip and warn ik changed

Update:
A little improvement.
While the filter slice(2, 15) is not flexible, I found a way to ensure the IP only is returned, no matter the number of digits:

var response = args[0];
// A) while the - symbol is (while the returned data doesn't change)
// the first one, and close to the actual IP address,
// we select the string following the - symbol. 
// B) when the IP has less than 12 digits, remove trailing HTML code "</"
var myIP = '' + response.split("-")[1].slice(2).split("<")[0];

console.log('args: ', args[0]);

return myIP;



So recognizable :stuck_out_tongue_winking_eye: I don’t know how many days I’ve spend in total to find out about a missing } . ) or the like. My urge to get it working helps, but oh I have given up on many scripts as well :rofl:

1 Like