👻 Ghost Mode Max.ru

Блокирует статусы "Прочитано" и "Набирает сообщение" в мессенджере Max (Макс).

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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

})();