LZT Image Chat Viewer

Данное расширение позволяет просматривать изображения в чате без наведения

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

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

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         LZT Image Chat Viewer
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Данное расширение позволяет просматривать изображения в чате без наведения
// @author       Shark | zelenka.guru/shark
// @match        https://zelenka.guru/chatbox/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=zelenka.guru
// @grant        none
// ==/UserScript==

(function() {
    setInterval(check_imgs, 1);
})();




function check_imgs(){
    let messages = document.querySelectorAll('.chat2-message-text-inner')
    for (let i = 0; i < messages.length; i++) {
        let obj = messages[i];
        let check = obj.querySelectorAll('a')
        if (check){
            for (let b = 0; b < check.length; b++){
                let link = check[b].href;
                if (link.includes('imgur.com')){
                    let img = document.createElement('img');
                    img.src = link;
                    check[b].remove();
                    obj.append(img);
                }
            }
        }
    }
}