vuchaev2015

Превращает весь форум в вучаевых

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         vuchaev2015
// @license      MIT
// @version      1.0
// @author       k1erry
// @icon         https://i.imgur.com/phojwCv.jpg
// @description  Превращает весь форум в вучаевых
// @match        https://zelenka.guru/*
// @match        https://lzt.market/*
// @namespace    http://example.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const replacementImageURL = 'https://zelenka.guru/data/avatars/l/302/302690.jpg';

    const newStyle = `
        background: linear-gradient(180deg, #FFFFFF 25%, rgba(0, 0, 0, 0.37) 52.08%), radial-gradient(86.67% 86.67% at 50% 50%, #D9D9D9 0%, #767676 34.38%, #3A3A3A 50.51%, #FBFBFB 50.52%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0px -2px 5px rgba(255, 255, 255, 0.54), 0px 2px 5px rgba(0, 0, 0, 0.86);
    `;

    function replaceImagesAndStyles() {
        const allImages = document.querySelectorAll('img');
        allImages.forEach(img => {
            img.src = replacementImageURL;
        });

        const avatars = document.querySelectorAll('.avatar');
        avatars.forEach(avatar => {
            const span = avatar.querySelector('.img');
            if (span) {
                span.style.backgroundImage = `url('${replacementImageURL}')`;
            }

            const img = avatar.querySelector('img');
            if (img) {
                img.src = replacementImageURL;
            }
        });

        const sidebarImages = document.querySelectorAll('img.sidebarUserAvatar');
        sidebarImages.forEach(img => {
            img.src = replacementImageURL;
        });

        const usernames = document.querySelectorAll('.username');
        usernames.forEach(username => {
            username.style.cssText = newStyle;
        });

        const spansWithInlineStyles = document.querySelectorAll('span[style*="color: #ebebff;"]');
        spansWithInlineStyles.forEach(span => {
            span.style.cssText = newStyle;
        });
    }

    const observer = new MutationObserver(replaceImagesAndStyles);
    const config = { childList: true, subtree: true };
    observer.observe(document.body, config);

    replaceImagesAndStyles();
})();