Mamba UnBlure

Убирает blur и открывает профили по нажатию на фото

目前為 2025-05-27 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Mamba UnBlure
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Убирает blur и открывает профили по нажатию на фото
// @author       Vierta
// @match        https://www.mamba.ru/event-list/all
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Создаем стиль для переопределения
    const style = document.createElement('style');
    style.innerHTML = `
        .b1qktkn [data-name=user-photo-no-image],
        .b1qktkn [data-name=user-photo] {
            -webkit-filter: none !important;
            filter: none !important;
        }
        .b1qktkn:after {
            display: none !important;
        }
        .b56amc0, .sc-1xy5yf6-0.dydfsQ {
            display: none !important;
        }
    `;
    document.head.appendChild(style);

    function processPage() {
        // Удаляем VIP-карточки
        document.querySelectorAll('a[data-name="events-item-vip-action"]').forEach(el => el.remove());

        // Обрабатываем ссылки профилей
        document.querySelectorAll('a[data-name="link-hitlist-item-not-open-event-action"][href="/event-list/all/app/storefront/vip/slide/show-hitlist-rating/place/activity"]').forEach(link => {
            const img = link.querySelector('img[data-name="user-photo"]');
            if (img) {
                const match = img.src.match(/\/\d+\/\d+\/\d+\/(\d+)\//);
                if (match?.[1]) {
                    const newHref = `/profile/${match[1]}`;
                    link.href = newHref;
                    link.onclick = e => {
                        e.preventDefault();
                        window.open(newHref, '_blank');
                    };
                }
            }
        });
    }

    // Отслеживание изменений DOM
    new MutationObserver(mutations => {
        if (mutations.some(m =>
                           Array.from(m.addedNodes).some(n =>
                                                         n.nodeType === 1 &&
                                                         (n.matches?.('a[data-name="events-item-vip-action"]') ||
                                                          n.querySelector?.('a[data-name="events-item-vip-action"]'))
                                                        )
                          )) {
            setTimeout(processPage, 50);
        }
    }).observe(document.body, { childList: true, subtree: true });

})();