(function() {
    var __WS_send = WebSocket.prototype.send;
    window.__WS_send = WebSocket.prototype.send;
    WebSocket.prototype.send = function(data) {
        console.log(this.url);
        try {
            var re = /((?:[0-9]{1,3}(?:\.|\-)){1,3}[0-9]{1,3})(?:.*?)?(\:[0-9]{1,5})/;
            var match = re.exec(this.url);
            console.log("http://agar.io/?sip=" + match[1].replace(/-/g, '.') + match[2]);
        } catch (err) {
            console.error(err.message);
        }
        try {
            __WS_send.apply(this, [data]);
            WebSocket.prototype.send = __WS_send;
        } catch (err) {
            window.__WS_send.apply(this, [data]);
            WebSocket.prototype.send = window.__WS_send;
        }
    }
})();
(function() {
    var __WS_send = WebSocket.prototype.send;
    window.__WS_send = WebSocket.prototype.send;
    WebSocket.prototype.send = function(data) {
        console.log(this.url);
        try {
            var ip = /((?:[0-9]{1,3}(?:\.|\-)){1,3}[0-9]{1,3})/.exec(this.url);
            var port = /\:[0-9]{1,5}/.exec(this.url) || ':80';
            console.log("http://agar.io/?sip=" + ip[1].replace(/-/g, '.') + port);
        } catch (err) {
            console.error(err.message);
        }
        try {
            __WS_send.apply(this, [data]);
            WebSocket.prototype.send = __WS_send;
        } catch (err) {
            window.__WS_send.apply(this, [data]);
            WebSocket.prototype.send = window.__WS_send;
        }
    }
})();
Append port 80 when a port is not provided
Append port 80 when a port is not provided
