// ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://beam.pro/* // @grant none // ==/UserScript== (function() { 'use strict'; (function () { WebSocket.prototype._send = WebSocket.prototype.send; WebSocket.prototype.send = function (data) { this._send(data); this.addEventListener('message', function (msg) { console.log('>> ' + msg.data); }, false); this.send = function (data) { this._send(data); console.log("<< " + data); }; console.log("<< " + data); }; })(); })();