WebSuckIt!

Ugh, these Webs these Sockets... Nobody need them.

נכון ליום 19-06-2016. ראה הגרסה האחרונה.

// ==UserScript==
// @name         WebSuckIt!
// @namespace    lainscripts_websuckit
// @version      1.5
// @description  Ugh, these Webs these Sockets... Nobody need them.
// @author       lainverse
// @match        *://*/*
// @grant        none
// @run-at       document-start
// ==/UserScript==
(function() {
    'use strict';
    var to_block =[
        'et-code.ru',
        'mxtads.com',
        'news.mail.ru',
        'torvind.com',
        'trafmag.com',
        'ws.hghit.com',
        'wsp.marketgid.com'
    ];
    var ws = window.WebSocket;
    window.WebSocket = new Proxy(ws, {
        construct: function(e,i){
            console.log('Opening WebSocket on', i[0], '…');
            var d = i[0].match(/:\/\/[^:/]+/)[0];
            if (d && to_block.indexOf(d.substring(3)) > -1) {
                console.log("Nope! Not gonna happen!");
                return {};
            } else return new e(i[0],i[1]);
        }
    });
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。