☰

πŸ‘» Ghost Mode Max.ru

Π‘Π»ΠΎΠΊΠΈΡ€ΡƒΠ΅Ρ‚ статусы "ΠŸΡ€ΠΎΡ‡ΠΈΡ‚Π°Π½ΠΎ" ΠΈ "НабираСт сообщСниС" Π² мСссСндТСрС Max (Макс).

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         πŸ‘» Ghost Mode Max.ru
// @namespace    http://tampermonkey.net/
// @version      0.1 beta
// @description  Π‘Π»ΠΎΠΊΠΈΡ€ΡƒΠ΅Ρ‚ статусы "ΠŸΡ€ΠΎΡ‡ΠΈΡ‚Π°Π½ΠΎ" ΠΈ "НабираСт сообщСниС" Π² мСссСндТСрС Max (Макс).
// @author       Gemini
// @license MIT
// @match        https://web.max.ru/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const STYLES = {
        title: "color: #ff0055; font-size: 16px; font-weight: bold;",
        block_read: "background: #222; color: #ff0055; font-size: 12px; padding: 4px; border-radius: 4px;",
        block_type: "background: #222; color: #00ffff; font-size: 12px; padding: 4px; border-radius: 4px;",
    };

    console.log("%cπŸ‘» Ghost Mode: Π Π΅ΠΆΠΈΠΌ ΠΏΠΎΠ»Π½ΠΎΠΉ нСвидимости Π°ΠΊΡ‚ΠΈΠ²ΠΈΡ€ΠΎΠ²Π°Π½...", STYLES.title);

    const OriginalWebSocket = window.WebSocket;
    const originalSend = OriginalWebSocket.prototype.send;

    OriginalWebSocket.prototype.send = function(data) {
        try {
            if (typeof data === 'string') {
                // 1. Π‘Π»ΠΎΠΊΠΈΡ€ΡƒΠ΅ΠΌ "ΠŸΡ€ΠΎΡ‡ΠΈΡ‚Π°Π½ΠΎ" (Opcode 50)
                if (data.includes('"opcode":50')) {
                    console.log("%c🚫 Π‘Π›ΠžΠš: ΠžΡ‚Ρ‡Π΅Ρ‚ ΠΎ ΠΏΡ€ΠΎΡ‡Ρ‚Π΅Π½ΠΈΠΈ ΡƒΠ±ΠΈΡ‚ (Opcode 50).", STYLES.block_read);
                    return; // πŸ›‘ НС отправляСм!
                }

                // 2. Π‘Π»ΠΎΠΊΠΈΡ€ΡƒΠ΅ΠΌ "НабираСт сообщСниС..." (Opcode 65)
                if (data.includes('"opcode":65')) {
                    console.log("%c🀫 Π‘Π›ΠžΠš: Бтатус 'ΠŸΠ΅Ρ‡Π°Ρ‚Π°Π΅Ρ‚...' скрыт (Opcode 65).", STYLES.block_type);
                    return; // πŸ›‘ НС отправляСм!
                }
            }
        } catch (err) {
            console.error("Pyrite Error:", err);
        }

        // ВсС ΠΎΡΡ‚Π°Π»ΡŒΠ½Ρ‹Π΅ ΠΏΠ°ΠΊΠ΅Ρ‚Ρ‹ (Π²Ρ…ΠΎΠ΄, ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΠ° самого сообщСния ΠΈ Ρ‚.Π΄.) пропускаСм
        return originalSend.apply(this, arguments);
    };

})();