Moorer icon

Beam Pro WebSocket Capture for Chrome

Moorer | PRO | 11/20/16 12:43:20 AM UTC | 0 ⭐ | 200 👁️ | Never ⏰ | []
JavaScript |

790 B

|

None

|

0 👍

/

0 👎

// ==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);
        };
    })();
 
})();

Comments