Загрузка...

Fix transparent chat lolz

Thread in Extentions created by God_likeGL Layer 1 Dec 11, 2024. (bumped Saturday at 12:29 AM) 2,698 views

  1. God_likeGL
    God_likeGL Layer 1 Topic starter Dec 11, 2024 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    фикс этой темы
    Transparent chat
    zDEBRY Extentions Nov 25, 2024
    Сделал прозрачный чат всплывающего чата. Делал для avatarGod_likeGL Layer 1 . Собственно делает чат прозрачным
    Возможно менять прозрачность включать и выключать размытие.
    Image
    Всё написано как менять.
    Вот так выглядит:
    Без размытия Image
    С размытием Image

    Ска...

    [IMG]
    код для тамперманки:
    https://pastes.io/prozrachnyy-chat >> новая версия >> https://pastebin.com/yLNf65id

    тестировать тут https://zelenka.guru/chatbox/
     
    This article was useful for you?
    You can thank the author of the topic by transferring funds to your balance
    Thank the author
    1. aphextwin
    2. God_likeGL Layer 1 Topic starter
      ᓚᘏᗢ avataraphextwin, не знаю - не я автор, я только фиксанул
    3. aphextwin
  2. God_likeGL
    God_likeGL Layer 1 Topic starter Dec 18, 2024 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    ᓚᘏᗢ опять слетело выделение упоминания вас в чате
    пофикшено 18,12,2024
     
  3. God_likeGL
    God_likeGL Layer 1 Topic starter Dec 26, 2024 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    ᓚᘏᗢ очередной раз фикс упоминания в чате
    chat2-message-tagged.lztng-c9cwn9 .chat2-message-block.lztng-c9cwn9
    chat2-message-tagged.lztng-b1l8o4 .chat2-message-block.lztng-b1l8o4
     
    1. View previous comments (1)
    2. God_likeGL Layer 1 Topic starter
      avatarGilgal, ну а что делать?
    3. Gilgal
      avatarGod_likeGL Layer 1 , Разные варианты, Частичные селекторы например
    4. God_likeGL Layer 1 Topic starter
      avatarGilgal, я не шарю((
  4. God_likeGL
    God_likeGL Layer 1 Topic starter Jan 11, 2025 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    очередной раз фикс упоминания в чате
    lztng-b1l8o4
    lztng-1h20j3u
     
    1. God_likeGL Layer 1 Topic starter
  5. equilpres
    Поправь эту ошибку в коде
    [IMG]
     
    1. View previous comments (7)
    2. God_likeGL Layer 1 Topic starter
    3. God_likeGL Layer 1 Topic starter
      avatarequilpres, обновил тему, очень благодарен тебе за помощь
  6. God_likeGL
    God_likeGL Layer 1 Topic starter Jul 2, 2025 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    :senko: апдейт!
    убрал прозрачность плашки блокировки дабы текст был читабельным, вот код:
    JS
    // ==UserScript==
    // @name Lolz Transparent Chat (with Tooltip Exclusion)
    // @namespace http://tampermonkey.net/
    // @version 2.4
    // @description Lolz Transparent Chat с исключением подсказок (tippy)
    // @match https://lzt.market/*
    // @match https://lolz.live/*
    // @match https://zelenka.guru/*
    // @grant none
    // @license MIT
    // ==/UserScript==

    (function() {
    'use strict';

    const blurEnabled = true; // Включить/отключить размытие
    const blurChatFull = true; // Включить скрипт на полной странице чата (lolz.live/chatbox)

    const applyStylesToChat = (chatElement) => {
    if (chatElement) {
    chatElement.style.backgroundColor = 'rgba(0, 0, 0, 0.4)';
    chatElement.style.border = '1px solid rgba(255, 255, 255, 0.2)';

    const childElements = chatElement.querySelectorAll('*');
    childElements.forEach(el => {
    // Исключаем всплывающие подсказки (tippy.js и подобные)
    if (el.closest('[data-tippy-root], [id^="tippy-"]')) return;

    el.style.setProperty('background-color', 'transparent', 'important');
    el.style.border = 'none';
    });

    // Фикс исчезновения чата на телефоне
    const mobileChatPage = chatElement.querySelector('[class^="chat2 chat2-full-inner"]');
    if (mobileChatPage) {
    mobileChatPage.style.backdropFilter = blurEnabled ? 'blur(8px)' : 'none';
    } else {
    chatElement.style.backdropFilter = blurEnabled ? 'blur(8px)' : 'none';
    }

    // Убираем градиент и задаём обводку для сообщений с упоминаниями
    const taggedMessageBlocks = chatElement.querySelectorAll('.chat2-message-tagged .chat2-message-block');
    taggedMessageBlocks.forEach(block => {
    block.style.backdropFilter = 'none';
    });

    const messageBlocks = chatElement.querySelectorAll('.chat2-message-block');
    messageBlocks.forEach(block => {
    if (!block.closest('.chat2-message-tagged')) {
    block.style.setProperty('background-color', 'transparent', 'important');
    block.style.setProperty('border', '1px solid rgba(128, 128, 128, 0.5)', 'important');
    block.style.borderRadius = '5px';
    } else {
    block.style.setProperty('background', 'transparent', 'important');
    block.style.setProperty('border', '3px solid rgba(34, 142, 93, 1)', 'important');
    block.style.borderRadius = '5px';
    }
    });

    const messageHeaders = chatElement.querySelectorAll('.chat2-message-header');
    messageHeaders.forEach(header => {
    header.style.setProperty('background-color', 'transparent', 'important');
    header.style.border = 'none';
    });

    const messageTexts = chatElement.querySelectorAll('.chat2-message-text');
    messageTexts.forEach(text => {
    text.style.setProperty('background-color', 'transparent', 'important');
    text.style.border = 'none';
    });
    }
    };

    const initializeChatStyling = () => {
    const chatElement = document.querySelector('[class^="chat2-floating"]');
    const chatElementFull = document.querySelector('[id="chat2-full"]');

    if (chatElement) {
    applyStylesToChat(chatElement);

    const observer = new MutationObserver(() => {
    applyStylesToChat(chatElement);
    });

    observer.observe(chatElement, {
    childList: true,
    subtree: true
    });
    } else if (chatElementFull && blurChatFull) {
    applyStylesToChat(chatElementFull);

    const observer = new MutationObserver(() => {
    applyStylesToChat(chatElementFull);
    });

    observer.observe(chatElementFull, {
    childList: true,
    subtree: true
    });
    } else {
    setTimeout(initializeChatStyling, 300);
    }
    };

    if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', () => {
    initializeChatStyling();
    });
    } else {
    initializeChatStyling();
    }
    })();
    [IMG]
     
  7. God_likeGL
    God_likeGL Layer 1 Topic starter Jul 4, 2025 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    Апдейт!
    оба варианта упоминания в чате теперь с прозрачным фоном и зелёной обводкой
    JS
    // ==UserScript==
    // @name Lolz Transparent Chat (with Tooltip Exclusion)
    // @namespace http://tampermonkey.net/
    // @version 2.4
    // @description Lolz Transparent Chat с исключением подсказок (tippy)
    // @match https://lzt.market/*
    // @match https://lolz.live/*
    // @match https://zelenka.guru/*
    // @grant none
    // @license MIT
    // ==/UserScript==

    (function() {
    'use strict';

    const blurEnabled = true; // Включить/отключить размытие
    const blurChatFull = true; // Включить скрипт на полной странице чата (lolz.live/chatbox)

    const applyStylesToChat = (chatElement) => {
    if (chatElement) {
    chatElement.style.backgroundColor = 'rgba(0, 0, 0, 0.4)';
    chatElement.style.border = '1px solid rgba(255, 255, 255, 0.2)';

    const childElements = chatElement.querySelectorAll('*');
    childElements.forEach(el => {
    // Исключаем всплывающие подсказки (tippy.js и подобные)
    if (el.closest('[data-tippy-root], [id^="tippy-"]')) return;

    el.style.setProperty('background-color', 'transparent', 'important');
    el.style.border = 'none';
    });

    // Фикс исчезновения чата на телефоне
    const mobileChatPage = chatElement.querySelector('[class^="chat2 chat2-full-inner"]');
    if (mobileChatPage) {
    mobileChatPage.style.backdropFilter = blurEnabled ? 'blur(8px)' : 'none';
    } else {
    chatElement.style.backdropFilter = blurEnabled ? 'blur(8px)' : 'none';
    }

    // Убираем градиент и задаём обводку для сообщений с упоминаниями
    const taggedMessageBlocks = chatElement.querySelectorAll('.chat2-message-tagged .chat2-message-block');
    taggedMessageBlocks.forEach(block => {
    block.style.backdropFilter = 'none';
    });

    const messageBlocks = chatElement.querySelectorAll('.chat2-message-block');
    messageBlocks.forEach(block => {
    if (!block.closest('.chat2-message-tagged')) {
    block.style.setProperty('background-color', 'transparent', 'important');
    block.style.setProperty('border', '1px solid rgba(128, 128, 128, 0.5)', 'important');
    block.style.borderRadius = '5px';
    } else {
    block.style.setProperty('background', 'transparent', 'important');
    block.style.setProperty('border', '3px solid rgba(34, 142, 93, 1)', 'important');
    block.style.borderRadius = '5px';
    }
    });

    const messageHeaders = chatElement.querySelectorAll('.chat2-message-header');
    messageHeaders.forEach(header => {
    header.style.setProperty('background-color', 'transparent', 'important');
    header.style.border = 'none';
    });

    const messageTexts = chatElement.querySelectorAll('.chat2-message-text');
    messageTexts.forEach(text => {
    text.style.setProperty('background-color', 'transparent', 'important');
    text.style.border = 'none';
    });
    // Стилизация reply-блоков пользователя с зелёной обводкой и прозрачным фоном
    const replyElements = chatElement.querySelectorAll('[class*="reply-message-your"]');
    replyElements.forEach(el => {
    el.style.setProperty('background', 'transparent', 'important'); // убираем градиент
    el.style.setProperty('background-color', 'transparent', 'important'); // на всякий случай
    el.style.setProperty('border', '3px solid rgba(34, 142, 93, 1)', 'important');
    el.style.borderRadius = '5px';
    });
    }
    };

    const initializeChatStyling = () => {
    const chatElement = document.querySelector('[class^="chat2-floating"]');
    const chatElementFull = document.querySelector('[id="chat2-full"]');

    if (chatElement) {
    applyStylesToChat(chatElement);

    const observer = new MutationObserver(() => {
    applyStylesToChat(chatElement);
    });

    observer.observe(chatElement, {
    childList: true,
    subtree: true
    });
    } else if (chatElementFull && blurChatFull) {
    applyStylesToChat(chatElementFull);

    const observer = new MutationObserver(() => {
    applyStylesToChat(chatElementFull);
    });

    observer.observe(chatElementFull, {
    childList: true,
    subtree: true
    });
    } else {
    setTimeout(initializeChatStyling, 300);
    }
    };

    if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', () => {
    initializeChatStyling();
    });
    } else {
    initializeChatStyling();
    }
    })();
     
  8. God_likeGL
    God_likeGL Layer 1 Topic starter Jul 7, 2025 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    прокачал, теперь окошко вставки изображения не полностью прозрачное а полупрозрачное!
    [IMG]
     
  9. God_likeGL
    God_likeGL Layer 1 Topic starter Aug 14, 2025 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    1. God_likeGL Layer 1 Topic starter
  10. God_likeGL
    God_likeGL Layer 1 Topic starter Aug 19, 2025 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
    :zxczxcasdasd312312432432asd: Прокачал пару моментов по типу горизонтальной прокрутки шапки чата в мобильной версии + оптимизация кода
    https://pastes.io/prozrachnyy-chat
     
  11. God_likeGL
    God_likeGL Layer 1 Topic starter Oct 17, 2025 Лучшие сервера: lolz.live/threads/5071761/ :+rep: 35,784 Oct 30, 2018
Loading...